Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RabbitMQ: Specify how to populate messaging.destination.name #1531

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

joaopgrassi
Copy link
Member

@joaopgrassi joaopgrassi commented Oct 30, 2024

Fixes #1529

Changes

Specify in more detail how to populate messaging.destination.name for RabbitMQ. I based it on the Default exchange docs. My understanding is that a routing key is always present, even when using the default exchange (empty in this case). The routing key then is the queue name.

For all other cases, I left it as amq.default which is what RabbitMQ uses. I saw reference for it for example here: https://www.rabbitmq.com/docs/access-control

For convenience RabbitMQ maps AMQP 0-9-1's default exchange's blank name to 'amq.default' when performing permission checks.

Merge requirement checklist

docs/messaging/rabbitmq.md Outdated Show resolved Hide resolved
- Otherwise: `amq.default`

**Consumers**
- `{exchange}:{routing key}:{queue}` when all values are present and non-empty.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe check if routing key and queue are the same and populate just one

Copy link
Member Author

@joaopgrassi joaopgrassi Nov 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I looked and it seems when receiving/delivering, only the routing key is present https://www.rabbitmq.com/docs/consumers#message-properties. Also, if I understand it right from some research, the routing key can be then also the same as queue name https://stackoverflow.com/questions/22655735/retrieve-name-of-rabbitmq-queue-where-message-was-consumed-from

So I think you're right, we should be good to keep only the exchange and routing key. PTAL 69b8141

Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 29, 2024
@joaopgrassi joaopgrassi requested a review from a team as a code owner November 29, 2024 07:28
@github-actions github-actions bot removed the Stale label Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

[Messaging RabbitMQ] What to use for destination.name when the default exchange is used (empty string)
2 participants