What Is DMS for RocketMQ?
Distributed Message Service (DMS) for RocketMQ is message-oriented middleware that delivers low latency, high flexibility, high throughput, dynamic expansion, easy management, and abundant messaging functions.
DMS for RocketMQ has the following features:
- Compatibility with open-source RocketMQ clients.
- Abundant messaging functions, including ordered message delivery, delayed messages, scheduled messages, message retry, dead letter messages, and transactional messages, which meet diverse needs in e-commerce and finance scenarios.
- Monitoring and analysis functions, including message tracing, message tracking, trace analysis, dead letter message export, monitoring and alarms, which allow you to monitor your services and keep them up and running.
- Brokers receive and store messages sent by producers or forward messages to consumers. Each broker consists of a master node and two slave nodes.
- NameServers receive and store broker metadata.
- Producers obtain metadata from NameServers and send messages to brokers.
- Consumers obtain metadata from NameServers and then pull messages from brokers.
DMS for RocketMQ supports four messages types.
- Normal messages: Messages that do no have any features of delayed messages, ordered messages, or transactional messages.
- Delayed/Scheduled messages: Messages that are delivered to consumers after a specific period after being sent from producers to DMS for RocketMQ.
- Ordered messages: Messages that are retrieved in the exact order that they are created.
- Transactional message: Messages that achieve eventual consistency, delivering distributed transaction processing similar to X/Open XA.
DMS for RocketMQ provides four advanced features.
- Message filtering: Consumers can tag messages in the subscribed topics to retrieve only the required messages.
- Message retry: DMS for RocketMQ retries sending messages that fail to be retrieved. If the message retrieval still fails after the maximum number of retries is reached, the messages are sent to the dead letter queue.
Table 1 describes the retry mechanism in DMS for RocketMQ.
Table 1 Message retry mechanism
The interval is set by the suspendTimeMillis parameter.
The default interval is 1000 ms, that is, 1s.
The maximum number of retries is set by the setMaxReconsumeTimes method on the consumer. If this parameter is not set, there will be unlimited retries.
The interval varies by the retry number, as shown in Table 2.
Set during consumer group creation.
Value range: 1–16 times
- Delayed messages: After being sent from producers to DMS for RocketMQ, messages are delivered to consumers only after a fixed period. A producer can specify one of the 18 delay levels listed in Table 3.
- Scheduled messages: After being sent from producers to DMS for RocketMQ, messages are delivered to consumers only after a specified time point. In DMS for RocketMQ, you can schedule messages to be delivered at any time within one year. You can also cancel scheduled messages.
This function is supported only for instances created on or after March 30, 2022.
Was this page helpful?Provide feedback
For any further questions, feel free to contact us through the chatbot.Chatbot