Updated on 2025-08-07 GMT+08:00

Open-Source RocketMQ

Add an open-source RocketMQ event source to an event stream.

Currently, RocketMQ 4.9.7 and 5.1.4 are supported.

Prerequisites

  • A cluster instance of Open-Source RocketMQ is available.
  • When the source is Open-Source RocketMQ, only FunctionGraph (function computing) can be selected for the target.

Creating an Open-Source RocketMQ Event Source

  1. Log in to the EG console.
  2. In the navigation pane, choose Event Streams > Serverless Event Streams.
  3. Click Create Serverless Event Stream, click the icon in the upper left corner, enter the event stream name and description, and click OK.
  4. Click the event source.
  5. Enter the event source information by referring to Table 1.

    Table 1 Parameters of Open-Source RocketMQ

    Parameter

    Description

    Event Provider

    Open-Source RocketMQ

    Addresses

    Enter one or more connection addresses.

    Group

    Enter a group ID.

    Topic

    Enter a topic.

    VPC

    Select a VPC.

    After an event stream is created, the VPC cannot be modified; otherwise, an error message will be displayed.

    Subnet

    Select a subnet.

    After an event stream is created, the subnet cannot be modified; otherwise, an error message will be displayed.

    SSL

    Specify whether to enable SSL.

    ACL

    Specify whether to enable ACL.

    When ACL is enabled, you need to configure the username and secret key.

    Tag

    Enter one or more tags.

    Consumption Timeout (ms)

    Enter an integer ranging from 1,000 to 900,000.

    Consumption Threads

    Enter an integer ranging from 20 to 64.

    Max. Messages

    Enter an integer ranging from 1 to 32.

  6. Click Next. The rule configuration page is displayed. For details about how to configure rules, see Filter Rule Parameters.
  7. Click Next to complete the rule configuration. You can continue to configure the event target of FunctionGraph by referring to Routing to FunctionGraph.

    When Event Source is set to Open-Source RocketMQ and Event Target is set to FunctionGraph, Execute can be set to Synchronously or Asynchronously.

  8. After the event source and target are configured, click Save in the upper right.

    • The MQ collection function takes effect in minutes after it is started for the first time.
    • In broadcast mode, retry upon consumption failure is not supported. New messages will continue to be consumed.
    • If a message fails to be sent to the target, RocketMQ retries the message. The target must be able to process duplicate events. When the retry upper limit is reached, the source message is added to the dead letter queue of the corresponding topic in RocketMQ, and the EG event is not delivered. For details, see Managing the Dead Letter Queues