• Distributed Message Service

  1. Help Center
  2. Distributed Message Service
  3. User Guide
  4. Introduction
  5. DMS


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:

  • Message

    Messages are JavaScript object notation (JSON) objects used for transmitting information. They can be sent one by one or in batches. Sending messages in batches can be achieved only through calling DMS application programming interfaces (APIs).

    Each message can contain up to 512 KB of data, including the message body and attributes.

  • Attributes (optional)

    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.

  • Message queue

    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.

  • Message body

    The message body carries the main information of the message. Each message must have exactly one message body.

  • Dead letter message

    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.

  • Producer

    A producer, also called a message sender, is the application component that sends messages to specific queues.

  • Consumer

    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.

  • Consumer group

    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.