This topic describes the terms that are used in Message Queue for Apache RocketMQ to help you better understand and use Message Queue for Apache RocketMQ.

Topic
A topic can be used as a primary classifier to classify messages. For more information, see Best practices of topics and tags.
Message
In Message Queue for Apache RocketMQ, a message is a carrier that is used to transfer information.
Message ID
A globally unique identifier for a message. Message Queue for Apache RocketMQ automatically generates a message ID for each message.
Message key
A message key is a unique identifier that is used to identify the service logic of a message. Message keys are specified by message producers.
Tag
A tag can be used as a secondary classifier to classify messages in a topic. For more information, see Best practices of topics and tags.
Producer
A producer, which is also known as a message publisher, produces and sends messages.
Producer instance
A producer instance refers to a producer client. Different producer instances can run different processes or run on different hosts. Producer instances can run threads in a secure manner. A producer instance can run multiple threads in the same process.
Consumer
A consumer, which is also known as a message subscriber, receives and consumes messages. Consumers can consume messages in two modes:
  • Push: Consumers receive messages that are pushed to them by Message Queue for Apache RocketMQ.
  • Pull: Consumers pull messages from Message Queue for Apache RocketMQ. Only the TCP client SDK for Java supports the pull mode.
    Notice Only Enterprise Platinum Edition instances of Message Queue for Apache RocketMQ support the pull mode.

For more information, see Methods and parameters and Subscribe to messages.

Partition
A topic partition is a physical partition. A topic can contain one or more partitions.
Consumer offset
A topic can contain multiple partitions. The total number of messages in a partition is equal to the value of the maximum offset (MaxOffset) of the partition. The start point of a partition is the value of the minimum offset (MinOffset) of the partition.

In Message Queue for Apache RocketMQ, pull consumers consume messages in a partition in sequence. The number of consumed messages is equal to the value of the consumer offset (ConsumerOffset). Number of messages that are not consumed (queued messages) = MaxOffset - ConsumerOffset

Consumer instance
A consumer instance refers to a consumer client. Different consumer instances can run different processes or run on different hosts. A consumer instance uses a thread pool to consume messages.
Group

A group of producers or consumers. Clients in a producer group or a consumer group produce or consume messages of the same type, and publish or subscribe to messages based on the same logic.

Group ID
A group ID is used to identify a group.
Queue
A topic can use one or more queues to store messages. The number of queues that are supported by a topic is based on the message type and the region where the instance is deployed. For information about the exact number of queues that are supported by a topic, .
Notice You cannot change the number of queues for topics in Standard Edition instances. You can change the number of queues for topics in Enterprise Platinum Edition instances.
Exactly-once delivery semantics
In exactly-once delivery method, a message is sent to a consumer for consumption only once even if the producer sends the message to the Message Queue for Apache RocketMQ broker again. For more information, see Exactly-once delivery semantics.
Clustering consumption
The system distributes messages in a topic to consumers in the same group in a balanced manner. For example, a topic contains nine messages and a consumer group contains three consumers. In clustering consumption mode, each consumer consumes three messages. For more information, see Clustering consumption and broadcasting consumption.
Broadcasting consumption
Each consumer in the same group consumes each message in the topic to which the consumer group subscribes. For example, a topic contains nine messages and a consumer group contains three consumers. In broadcasting consumption mode, each consumer consumes nine messages. For more information, see Clustering consumption and broadcasting consumption.
Scheduled message
After the Message Queue for Apache RocketMQ broker receives a message from the producer, Message Queue for Apache RocketMQ does not immediately push the message to a consumer. Message Queue for Apache RocketMQ pushes the message to a consumer at a specified point in time. This message is a scheduled message. For more information, see Scheduled messages and delayed messages.
Delayed message
After the Message Queue for Apache RocketMQ broker receives a message from the producer, Message Queue for Apache RocketMQ does not immediately push the message to a consumer. Message Queue for Apache RocketMQ pushes the message to a consumer after a specified period of time. This message is a delayed message. For more information, see Scheduled messages and delayed messages.
Transactional message
Message Queue for Apache RocketMQ provides the distributed transaction processing feature that is similar to the XA and Open XA distributed transaction processing modes. This feature helps ensure data consistency in Message Queue for Apache RocketMQ. For more information, see Transactional messages.
Ordered message
Ordered messages are messages that are published and consumed in order. Ordered messages in Message Queue for Apache RocketMQ are classified into globally ordered messages and partitionally ordered messages. For more information, see Ordered messages 2.0.
Globally ordered message
All messages in a specified topic are published and consumed in first-input-first-output (FIFO) order. For more information, see Ordered messages 2.0.
Partitionally ordered message
All messages in a specified topic are distributed to partitions based on a shard key. Messages in each partition are published and consumed in FIFO order. A shard key is the field based on which Message Queue for Apache RocketMQ partitions ordered messages in a topic. A shard key cannot be used as a message key. For more information, see Ordered messages 2.0.
Message accumulation
Messages are stacked in the Message Queue for Apache RocketMQ broker because the consumers are not allocated sufficient resources to consume all messages in a short period of time. In this case, messages that are not consumed are stored on the Message Queue for Apache RocketMQ broker. This is called message accumulation.
Number of queued messages = Number of messages that are being processed by consumers + Number of messages that are in the pending consumption state. The following list describes the metrics:ConceptsThe preceding figure shows the status of messages in a queue of a specific topic.
  • Inflight message: A message that is being processed on the consumer client and for which no success response is returned.
  • Ready message: A message that is ready on the Message Queue for Apache RocketMQ broker and can be consumed by consumers.

    The Ready messages metric reflects the number of messages that have not been processed by consumers.

    • Ready time of a ready message
      • For a normal message, the ready time equals the point in time when the normal message is stored.
      • For a scheduled message, the ready time equals the point in time that is scheduled for the broker to deliver the message. For a delayed message, the ready time equals the point in time when the specified delay period elapses.
      • For a transactional message, the ready time equals the point in time when the transaction is committed.
    • Ready message queuing duration: the offset between the current point in time and the point in time when the earliest message is ready.

      The Ready message queue time metric reflects the delay period for ready messages before they are processed. This metric is important for time-sensitive workloads.

      For example, in the preceding figure, the ready time of the first ready message M1 is 12:00:00, and the ready time of the last ready message M2 is 12:00:30. If the current point in time is 12:00:50, the ready message queuing duration can be calculated based on the following formula: Current point in time (12:00:50) - Ready time of M1 (12:00:00) = 50 seconds.

Message filtering
You can specify tags as filters to filter the types of messages that you want your consumers to consume. Message Queue for Apache RocketMQ filters messages based on specified tags and pushes only the messages that match the filter conditions to the consumers. For more information, see Message filtering.
Message trace
A message trace is a complete trace of a message from the point in time when the message is published by the producer to the point in time when the message is consumed by a consumer. A message trace contains information about a message when the message is on each node, such as the timestamp and the location information. You can obtain information such as the point in time when the message is sent by the producer, the point in time when the Message Queue for Apache RocketMQ broker receives the message, and the point in time when the message is sent to a consumer. For more information, see Query a message trace.
Consumer offset resetting
By default, Message Queue for Apache RocketMQ retains messages for three days. You can specify the consumer offset to allow consumers to consume only the messages that are sent to the Message Queue for Apache RocketMQ broker after a specified point in time. For more information, see Reset consumer offsets.
Dead-letter queue

Dead-letter queues are used to process messages that cannot be consumed. After a consumer fails to consume a message, Message Queue for Apache RocketMQ automatically retries to send the message to the consumer. For more information, see Message retry. If the message cannot be consumed after the maximum number of retries is reached, Message Queue for Apache RocketMQ sends the message to the dead-letter queue of the consumer group.

In Message Queue for Apache RocketMQ, messages that cannot be consumed as expected are dead-letter messages, and queues that are used to store dead-letter messages are dead-letter queues.

For more information, see Dead-letter queues.