You need to enable JavaScript to run this app.
Volcano Engine Function as a Service

Volcano Engine Function as a Service

Copy page
Download PDF
Trigger management
Creating RocketMQ triggers
Copy page
Download PDF
Creating RocketMQ triggers
veFaaS can be integrated with Message Queue for RocketMQ of Volcano Engine. You can create a RocketMQ trigger. In this way, veFaaS will consume messages from RocketMQ as a consumer and pass the messages to the user function. This triggers function code execution. You only need to write the function that processes the messages without the need to worry about the details of how veFaaS consumes messages. This topic describes how to create RocketMQ triggers.​
Prerequisites​
  • The VPC access feature has been enabled for the target function, which needs to be deployed in the same VPC as the RocketMQ instance to be used. For detailed operations, see Configuring functions.​
  • After enabling or modifying the VPC access configuration of the function, you need to perform a full release again. For detailed operations, refer to Releasing a function.​
  • A RocketMQ instance, Topic, Consumer Group, and access key have been created. The access key is used for managing the ACL permissions of Message Queue for RocketMQ and must include subscription permissions. For detailed operations, see Getting started with RocketMQ.​
Limits​
  • You can create up to 20 triggers for each function.​
  • The RocketMQ instance and function must be deployed in the same VPC.​
  • To modify the VPC or subnet of a function, you must first disable or delete all MQ triggers.​
  • After a RocketMQ trigger is created, you cannot change its RocketMQ instance, Topic, or Consumer Group.​
Procedure​
  1. Log in to the veFaaS console.​
  1. In the top navigation bar, select the target region.​
  1. In the function list, find the function for which you want to create a trigger and click its name.​
  1. On the function details page, click Create trigger on the Trigger tab.​
  1. In the Create trigger panel, specify the parameters as required.​
  • ​
    Parameter​
    Description​
    Trigger type​
    In this scenario, select Message queue for RocketMQ.​
    Trigger name​
    Specify a custom name for the trigger. Trigger names cannot be repeated under the same function. The trigger name cannot be modified after being created.​
    Instance​
    The RocketMQ instance. veFaaS will act as the specified Consumer Group to consume messages from the specified Topic in the specified RocketMQ instance. Select the RocketMQ instance, Topic, and Consumer Group described in the prerequisites.​
    • Topic: A message topic is a collection of messages of the same type and is the basic unit for message subscription in Message Queue for RocketMQ.​
    • Consumer Group: A consumer group is a group of consumers with the same Group ID. A consumer group enables messages in a Topic to be consumed in parallel.​
    tip​
    • You can only select a RocketMQ instance that is deployed in the same VPC as the function.​
    • To ensure the trigger can consume all messages of the Topic, one Consumer Group is recommended to correspond to exactly one trigger.​
    • The Consumer Group starts consuming from the latest position of the Topic.​
    Number of retries​
    The maximum number of retries when a function has run errors, including user code errors and runtime errors.​
    Message sequence​
    Select whether to strictly consume messages in the order they were published based on your business requirements.​
    • Ordered messages: Strictly consume all messages in the order they were sent by the producer, which is also known as the FIFO order.​
    • Unordered messages: Do not strictly follow the FIFO order. This is suitable for scenarios where message order is not important.​
    Activate now​
    Whether to enable the Trigger while creating it. Only Trigger enabled will work properly.​
    Authentication​
    Enter the AccessKey ID and AccessKey Secret for accessing the RocketMQ instance described in the prerequisites. The access key is used only for message subscription authentication. veFaaS does not store your access key.​
    warning​
    • The access key is used for managing the ACL permissions of Message Queue for RocketMQ, which does not belong to the Volcano Engine root user.​
    • The access key must include subscription permissions.​
    Description​
    Enter remarks as needed.​
    ​
  1. Click Confirm to create the RocketMQ trigger.​
tip​
The creation process may take 1 to 2 minutes. After the trigger is created, you can query the corresponding Consumer client information in the Message Queue for RocketMQ console.​
Validating results​
  • veFaaS console​
  • You can view the information about the created RMQ trigger on the Trigger tab of the current function.​
  • Message Queue for RocketMQ console​
  • In the detailed information of the Consumer Group that corresponds to the RMQ instance, you can view the newly added Consumer client information. This client corresponds to the current function.​
tip​
Status synchronization may take minutes.​
What to do next​
  • For the method of modifying the configurations of a trigger, see Managing triggers.​
Last updated: 2026.08.19 14:06:06