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

topic
A topic is used to classify messages. Topics are the primary classifier of messages. For more information, see Best practices of topics and tags.
message
In ApsaraMQ for RocketMQ, a message is a carrier that is used to transfer information.
message ID
A message ID is the globally unique identifier for a message. ApsaraMQ for RocketMQ automatically generates a message ID for each message.
message key
A message key is a unique identifier that is used to identify the business logic of a message. Message keys are specified by message producers.
tag
A tag is used to further classify messages within a topic. Tags are the secondary classifier of messages. For more information, see Best practices of topics and tags.
producer
A producer, 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 in 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, 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 ApsaraMQ for RocketMQ.
  • Pull: Consumers pull messages from ApsaraMQ for RocketMQ. Only the TCP client SDK for Java supports the pull mode.
    Important Only ApsaraMQ for RocketMQ Enterprise Platinum Edition instances support the pull mode.

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

consumer offset
A topic can contain multiple partitions. The total number of messages in a partition is known as the maximum offset (MaxOffset). The start point of a partition is known as the minimum offset (MinOffset).

In ApsaraMQ for RocketMQ, pull consumers consume messages in a partition in sequence. The number of consumed messages in a partition is known as the consumer offset (ConsumerOffset). Number of unconsumed messages (accumulated messages) = MaxOffset - ConsumerOffset

consumer instance
A consumer instance refers to a consumer client. Different consumer instances can run in 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.
message queue
Also known as topic partition. A topic partition is a physical partition. A topic can contain one or more queues. When you create a topic, the system automatically assigns the queues. You cannot specify custom values for queues.
clustering consumption
The system evenly distributes messages in a topic to consumers in a consumer group. 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 a consumer group consumes each message in a 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 a ApsaraMQ for RocketMQ broker receives a message from a producer, ApsaraMQ for RocketMQ does not immediately deliver the message to a consumer. Instead, ApsaraMQ for RocketMQ delivers the message to a consumer at a specified point in time. Messages of this type are scheduled messages. For more information, see Scheduled messages and delayed messages.
delayed message
After a ApsaraMQ for RocketMQ broker receives a message from a producer, ApsaraMQ for RocketMQ does not immediately deliver the message to a consumer. Instead, ApsaraMQ for RocketMQ delivers the message to a consumer after a specified period of time. Messages of this type are delayed messages. For more information, see Scheduled messages and delayed messages.
transactional message
ApsaraMQ for RocketMQ provides the distributed transaction processing feature that is similar to the eXtended Architecture (XA) and Open XA distributed transaction processing modes. This feature helps ensure data consistency in ApsaraMQ for RocketMQ. For more information, see Transactional messages.
ordered message
Ordered messages are messages that are published and consumed in order. Ordered messages in ApsaraMQ for RocketMQ are classified into globally ordered messages and partitionally ordered messages. For more information, see Ordered messages.
globally ordered message
All messages in a specified topic are published and consumed in first-in first-out (FIFO) order. For more information, see Ordered messages.
partitionally ordered message
All messages in a specified topic are distributed to partitions based on a sharding key. Messages in each partition are published and consumed in FIFO order. A sharding key is the key field based on which ApsaraMQ for RocketMQ partitions ordered messages in a topic. A sharding key cannot be used as a message key. For more information, see Ordered messages.
message accumulation
Messages are stacked in the ApsaraMQ for 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 ApsaraMQ for RocketMQ broker. This is called message accumulation.
Number of accumulated messages = Number of inflight messages + Number of ready messages. The following list describes the metrics.The status of each message in a queue

In the preceding figure, ApsaraMQ for RocketMQ calculates the number of messages and the processing duration at different processing stages. The metrics that are used in this process reflect the processing rate and message accumulation in the queue. By monitoring the metrics, you can determine whether exceptions occur during consumption. The following table describes the details of the metrics and the formulas that are used to calculate the metrics.

CategoryMetricDescriptionCalculation formula
Message quantityInflight messagesThe messages that a consumer client is processing and for which the client has not returned the consumption results. Offset of the latest pulled message - Offset of the latest acknowledged message
Ready messagesThe messages that are visible to consumers and are ready for consumption on a ApsaraMQ for RocketMQ broker. Maximum offset - Offset of the latest pulled message
Consumer lagThe total number of messages that are being processed and ready to be processed. Number of inflight messages + Number of ready messages
DurationReady time
  • For a normal message or ordered message, the ready time is the time when the message is stored to the broker.
  • For a scheduled message, the ready time is the time that is scheduled for the broker to deliver the message. For a delayed message, the ready time is the time when the specified delay period elapses.
  • For a transactional message, the ready time is the time when a transaction is committed.
N/A
Ready message queue timeThe interval between the current point in time and the ready time of the earliest ready message.

This metric indicates how soon a consumer pulls messages.

Current time - Ready time of the earliest ready message
Consumer lag timeThe interval between the ready time of the earliest unacknowledged message and the current time.

This metric indicates how soon a consumer processes messages.

Current time - Ready time of the earliest unacknowledged message
message filter
Consumers can specify tags as filters to obtain the type of message that they want to consume. ApsaraMQ for RocketMQ filters messages based on specified tags and delivers only the messages that match the filter conditions to the consumers. For more information, see Message filtering.
message trace
A message trace includes complete information about a message, such as the timestamp and location of the 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. By viewing a message trace, you can obtain information such as the point in time when the message is sent by the producer, the point in time when the ApsaraMQ for 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, ApsaraMQ for 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 ApsaraMQ for 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, ApsaraMQ for RocketMQ automatically redelivers 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, ApsaraMQ for RocketMQ delivers the message to the dead-letter queue of the consumer group.

In ApsaraMQ for 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.