DMS for RocketMQ
Add a DMS for RocketMQ event source to an event stream.
Prerequisites
- You have purchased a RocketMQ instance in DMS for RocketMQ.
- When the source is DMS for RocketMQ, only FunctionGraph (function computing) can be selected for the target.
Creating a DMS for RocketMQ Event Source
- Log in to the EG console.
- In the navigation pane, choose Event Streams > Serverless Event Streams.
- Click Create Serverless Event Stream, click the
icon in the upper left corner, enter the event stream name and description, and click OK.
- Click the event source.
- Configure the event source by referring to Table 1.
Table 1 DMS for RocketMQ parameters Parameter
Description
Event Provider
Select DMS for RocketMQ.
Instance
Select an instance.
Group
Enter a group ID.
Topic
Enter a topic.
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.
- Ensure that the ACL status of the created RocketMQ instance is the same as that of the RocketMQ event source.
tag
Enter one or more tags.
Consumption Timeout (ms)
Enter an integer ranging from 1,000 to 900,000.
Consumption Mode
Select Concurrently or Orderly.
Consumption Threads
Enter an integer ranging from 20 to 64.
Max. Messages
Enter an integer ranging from 1 to 32.
Max. Retries
Enter the maximum number of retries.
- –1: unlimited retry; 0: no retry.
- If the RocketMQ version is 4.x, each message can be retried for a maximum of 16 times by default. Table 2 describes the retry interval.
Retry Interval (ms)
Enter an integer ranging from 1,000 to 30,000.
Table 2 RocketMQ 4.x retry interval Retry
Interval
Retry
Interval
1
10 seconds
9
7 minutes
2
30 seconds
10
8 minutes
3
1 minute
11
9 minutes
4
2 minutes
12
10 minutes
5
3 minutes
13
20 minutes
6
4 minutes
14
30 minutes
7
5 minutes
15
1 hour
8
6 minutes
16
2 hours
Table 3 Combination of production and consumption sequence Production Sequence
Consumption Sequence
Effect
Orderly (message group)
Orderly
Messages preserve exact send order during consumption within a group.
Orderly (message group)
Concurrently
Messages are processed as close to order as possible.
Disorderly (without message group)
Orderly
Consumption follows Apache RocketMQ storage queue order which may differ from send order.
Disorderly (without message group)
Concurrently
Messages are processed as close to order as possible.
- Click Next. The rule configuration page is displayed. For details about how to configure rules, see Filter Rule Parameters.
- 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 DMS for RocketMQ and Event Target is set to FunctionGraph, Execute can be set to Synchronously or Asynchronously.
- 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. That is, if a message fails to be consumed, the message will not be retried and the consumer continues to consume new messages.
- 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot