Filtering Sensitive Information

When a message is created in queue queue-test for consumer group group-dms to consume, the DMS trigger detects the message and generates an event to trigger the function. Then the function runs to determine whether the message contains sensitive information.

Creating a Message

Perform the following steps to create a message:

  1. Log in to the DMS console, and choose Queue Manager in the navigation pane.
  2. Click queue-test, and then click Create Message.
  3. In the Create Message dialog box, enter a message (such as "Well-paid opportunities for working part time") in the Message Body area, as shown in Figure 1.
  4. Click OK.
Figure 1 Creating a message

After creating the message, you can see the number of messages that can be retrieved in the group-dms row, as shown in Figure 2.

Figure 2 Number of messages that can be retrieved

Triggering the Function

When detecting the message, the trigger invokes the function. On the fss_examples_message_filtering page on the FunctionGraph console, as shown in Figure 3, you can view a function running log indicating that the message cannot be published because it contains too many sensitive words.

Figure 3 Log information