Semantic Conventions for RocketMQ

Status: Experimental

The Semantic Conventions for Apache RocketMQ extend and override the Messaging Semantic Conventions that describe common messaging operations attributes in addition to the Semantic Conventions described on this page.

messaging.system MUST be set to "rocketmq".

Apache RocketMQ attributes

Specific attributes for Apache RocketMQ are defined below.

AttributeTypeDescriptionExamplesRequirement Level
messaging.rocketmq.client_groupstringName of the RocketMQ producer/consumer group that is handling the message. The client type is identified by the SpanKind.myConsumerGroupRequired
messaging.rocketmq.consumption_modelstringModel of message consumption. This only applies to consumer spans.clusteringRecommended
messaging.rocketmq.message.delay_time_levelintThe delay time level for delay message, which determines the message delay time.3Conditionally Required: [1]
messaging.rocketmq.message.delivery_timestampintThe timestamp in milliseconds that the delay message is expected to be delivered to consumer.1665987217045Conditionally Required: [2]
messaging.rocketmq.message.groupstringIt is essential for FIFO message. Messages that belong to the same message group are always processed one by one within the same consumer group.myMessageGroupConditionally Required: If the message type is FIFO.
messaging.rocketmq.message.keysstring[]Key(s) of message, another way to mark message besides message id.[keyA, keyB]Recommended
messaging.rocketmq.message.tagstringThe secondary classifier of message besides topic.tagARecommended
messaging.rocketmq.message.typestringType of message.normalRecommended
messaging.rocketmq.namespacestringNamespace of RocketMQ resources, resources in different namespaces are individual.myNamespaceRequired

[1]: If the message type is delay and delivery timestamp is not specified.

[2]: If the message type is delay and delay time level is not specified.

messaging.rocketmq.consumption_model MUST be one of the following:

ValueDescription
clusteringClustering consumption model
broadcastingBroadcasting consumption model

messaging.rocketmq.message.type MUST be one of the following:

ValueDescription
normalNormal message
fifoFIFO message
delayDelay message
transactionTransaction message

messaging.client_id SHOULD be set to the client ID that is automatically generated by the Apache RocketMQ SDK.