Adding an Event Source

After creating the function, you can add an event source by creating a DMS trigger. Perform the following procedure:

  1. On the fss_examples_message_filtering page, click the Triggers tab and click Create Trigger.
  2. Select DMS for Trigger Type, and set the trigger information, as shown in Figure 1.

    For Queue Name, select queue-test.

    For Consumer Group, select group-dms.

    For Pull Period, enter 5.
    Figure 1 Creating a trigger

  3. Click OK. The trigger is created, as shown in Figure 2.

    Figure 2 DMS trigger

    After the DMS trigger is created, the function polls consumer group group-dms for messages every 5s. When a message is available, a DMS event is generated to trigger the function.