Basic 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 APIs.

    Each message can contain up to 512 KB of data.

  • Attributes

    Each message can optionally have one or more attributes. Each message attribute consists of a name and a value in the key-value format. Attributes are part of the message and are sent and retrieved along with it.

    Attributes allow consumers to decide how to process the messages before processing the message body.

  • Message queue

    A message queue is a container that receives and stores message files. By default, 30 queues can be created under a project. Different messages in one queue can be retrieved by multiple consumers at the same time.

    • Standard queue: The queue mode can be partition-level first in first out (FIFO) or global FIFO. Partition-level FIFO queues have higher concurrency performance than global FIFO queues, but do not guarantee the FIFO order of all messages.
    • Advanced queue: Open-source Kafka clients can be used to create and retrieve messages. The queue mode can be high throughput or high reliability. In high throughput mode, all message replicas are flushed to a disk asynchronously to ensure high performance. In high reliability mode, all message replicas are flushed to a disk synchronously to ensure message reliability.
    • RabbitMQ queue: RabbitMQ queues are created in RabbitMQ instances, which are physically isolated. You can customize the computing capabilities and storage space of RabbitMQ instances based on service requirements.
  • Dead letter message

    Dead letter messages are messages that cannot be correctly retrieved.

    DMS can process messages that are not correctly retrieved. If a message fails to be retrieved for a preset number of times, it will be sent to the dead letter queue and retained 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. Consumers in a consumer group cannot retrieve dead letter messages of other consumer groups.

    Dead letter messages from standard queues in global FIFO mode are sent to the dead letter queue in the FIFO order.

    Advanced queues do not support dead letter messages.

  • Producer

    A producer, also called a message sender, sends messages to specific queues.

  • Consumer

    A consumer, also called a message receiver, retrieves messages from queues. After acknowledging a message, a consumer cannot retrieve the same message again.

  • Consumer group

    Consumer groups classify different types of message consumers. A maximum of three consumer groups can be created in each queue.

    Messages in a queue can be retrieved once by each consumer group. Messages acknowledged by a 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 a queue at the same time.

  • Resetting the message retrieval start position

    You can reset the position from which to sequentially retrieve messages sent from producers to DMS. You can choose to start retrieving messages from the beginning of a queue, from the end of a queue, or from a specified point in time within the message retention period (by default, 72 hours for standard queues).

  • Message filtering

    DMS allows you to use labels to filter the messages you want to retrieve from the chosen queue.

    Messages can be sent to the chosen queues regardless of whether the messages have labels or not.

    If the Message Labels field in the Retrieve Message dialog box is left unspecified, all types of messages in the chosen queue will be retrieved. If this field is assigned a non-empty value, only messages with the specified message labels will be retrieved.

  • Delay message delivery

    Messages can be delivered after a specified delay time.

    This feature can be enabled only for standard queues (in partition-level FIFO or global FIFO mode), and cannot be enabled for advanced queues.

  • Message redelivery

    Standard queues support message redelivery with the SDK. If a message fails to be retrieved, it can be flagged as redelivery and dumped to the message queue. Consumers can retrieve the message later. Messages can be retrieved at least 30 seconds after being redelivered. When you acknowledge message retrieval, you can choose to flag messages as success, failure, or redelivery.

  • Message broadcasting

    Standard queues support message broadcasting with the SDK. All consumers in a consumer group can consume the same message.

    You can configure whether to automatically acknowledge message retrievals.

    Consumers can choose any of the following message consumption modes:

    • Multicast: After a message is successfully consumed, other consumers in the same consumer group can no longer consume the message.
    • Broadcast from the earliest message: All consumers in a consumer group can consume the first message and subsequent messages in the queue.
    • Broadcast from the previous consumption position: If a fixed Consumer id is set, all consumers in a consumer group can consume all the messages that are never consumed in the queue from the specified retrieval position.
    • Broadcast from the latest message: All consumers in a consumer group can consume new incoming messages in the queue.