Distributed Message Service (DMS) is a message middleware service based on distributed, high-availability clustering technology. It provides reliable, scalable, fully managed queues for storing messages.
DMS enables you to create message queues for transmitting messages among application components. With DMS, application components that send messages and components that receive messages do not have to be available at the same time.
DMS uses the following concepts:
Each message can contain up to 512 KB of data, including the message body and attributes.
Each message can optionally have one or more attributes. Each message attribute consists of a name and a value. Attributes are not part of the message body but are sent and retrieved along with it.
A message queue is a container that receives and stores message files. By default, 5 queues can be created under a project. Different messages in one queue can be retrieved by multiple consumers at the same time.
The message body carries the main information of the message. Each message must have exactly one message body.
Dead letter messages are messages that cannot be correctly retrieved. You can select whether to enable the Dead Letter Queue function when creating a queue.
If a message fails to be retrieved for a preset number of times, the message will be sent to the dead letter queue and retained in the dead letter queue for at least 72 hours. You can then retrieve the message from the dead letter queue.
Messages in the dead letter queue are specific to individual consumer groups, and consumer groups cannot retrieve each other's dead letter messages.
Dead letter messages from FIFO queues are sent to the dead letter queue in the FIFO order.
Kafka queues do not support dead letter messages.
A producer, also called a message sender, is the application component that sends messages to specific queues.
A consumer, also called a message receiver, is the application component that retrieves messages from queues. After acknowledging a message, a consumer cannot retrieve the same message again.
A consumer group is used to group consumers. A maximum of three consumer groups can be created in each queue.
Messages in one queue can be retrieved once by each consumer group. Messages acknowledged by one consumer group are no longer available to that consumer group but still available to other consumer groups.
Consumers in the same consumer group can retrieve different messages from one queue at the same time.