This section describes how to create an SMN trigger and publish a message to trigger a function.
For details about the SMN event source, see section "Supported Event Sources".
After the SMN trigger is created, a subscription is generated for the corresponding topic on the SMN console.
On the SMN console, publish a message to the smn-test topic. For details, see Publishing a Text Message.
Table 1 describes the parameters required for publishing a message.
Parameter |
Description |
---|---|
Subject |
Enter SMN-Test. |
Message Format |
Select Text. |
Message |
Enter {"message":"hello"}. |
After a message is published, the function is triggered automatically. For details about example events, see section "Supported Event Sources".