A Message Service (MNS) topic trigger can trigger a function to perform custom processing on a message that is published to a topic. This topic describes how to configure an MNS topic trigger. In this example, you can use a trigger to trigger a function when an MNS topic receives a message.


You can configure a trigger for an MNS topic, which is equivalent to registering the function as a subscriber to this MNS topic. When a publisher publishes a message to the MNS topic, the message is passed to the function and used as the event parameter of the function handler to trigger the function.

Configure a trigger

Function Compute allows you to configure a trigger in the following ways: