diff --git a/.chloggen/rabbitmq-destination-name.yaml b/.chloggen/rabbitmq-destination-name.yaml new file mode 100755 index 0000000000..2d795f1b44 --- /dev/null +++ b/.chloggen/rabbitmq-destination-name.yaml @@ -0,0 +1,4 @@ +change_type: breaking +component: messaging +note: "RabbitMQ: Specify how to populate `messaging.destination.name`" +issues: [1529] diff --git a/docs/messaging/rabbitmq.md b/docs/messaging/rabbitmq.md index c7d95f3a62..c4f5e42166 100644 --- a/docs/messaging/rabbitmq.md +++ b/docs/messaging/rabbitmq.md @@ -40,8 +40,22 @@ The Semantic Conventions for [RabbitMQ](https://www.rabbitmq.com/) extend and ov ## RabbitMQ attributes -In RabbitMQ, the destination is defined by an *exchange* and a *routing key*. -`messaging.destination.name` MUST be set to the name of the exchange. This will be an empty string if the default exchange is used. +### Destination name + +In RabbitMQ, the destination is defined by an *exchange*, a *routing key* and +for consumers, a *queue*. +`messaging.destination.name` MUST be set to: + +#### Producers + +- `{exchange}:{routing key}` when both values are present and non-empty. +If any has an empty value (e.g., the default exchange is used) it SHOULD be omitted. +- Otherwise: `amq.default` + +#### Consumers + +- `{exchange}:{routing key}:{queue}` when all values are present and non-empty. +If any has an empty value (e.g., the default exchange is used) it SHOULD be omitted.