How to monitor unroutable messages etc

52 views
Skip to first unread message

John F

unread,
Nov 6, 2025, 10:26:22 AMNov 6
to rabbitmq-users
Hi!

I'm trying to set up a RabbitMQ instance where I want to be able to:

a) publish a message to exchange "ingest".
b) subscribe to a queue "ingest.new" that receives ALL messages having one of many specified routing keys.
c) subscribe to a queue "ingest.observability" that gets ALL messages published to exchange "ingest" (a) because it has a routing key of "#".
d) subscribe to a queue "ingest.unroutable" that gets ALL messages that could not be routed to queue "ingest.new" (b).

I've tried to create an alternate exchange (AE) to exchange "ingest" called "ingest.unroutable" but messages with an unknown routing key is only send to queue "ingest.observability".

I've tried to create a policy as well but that didn't work well.

I would like to have all messages published to exchange "ingest" to be copied to exchange "ingest.observability" so that I can bind a queue to it for ALL messages.
Then I want all unroutable messages in exchange "ingest" to be put into exchange "ingest.unroutable" sot hat I can bind a queue to it for ALL those messages.

Is this possible?

Michal Kuratczyk

unread,
Nov 7, 2025, 2:46:59 AMNov 7
to rabbitm...@googlegroups.com
Unroutable messages are messages that don't match any bindings, so if you want all messages to be routed to queue.observability,
then by definition you won't have any unroutable messages. What you can do is this:

1. ingest could be a fanout exchange with two exchanges bound to it, say "bcc" and "ingest.new"
2. bcc exchange is a fanout exchange with queue.observability bound to it
3. ignest.new is the exchange that does most of you logic and has the alternate exchange configured
    - whatever you bind to ingest.new will go to the right queue(s)
    - what doesn't match any bindings will go to the alternate exchange
4. the alternate exchange is a fanout exchange with queue.unroutable bound to it


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/rabbitmq-users/64b25b9e-c7cd-48b6-9c52-25b43660a9d5n%40googlegroups.com.


--
Michal
RabbitMQ Team

John F

unread,
Nov 7, 2025, 4:37:28 PM (14 days ago) Nov 7
to rabbitmq-users
Thanks Michal!

This was exactly what I needed. Don't know why I didn't consider this scenario.

Thanks,
John
Reply all
Reply to author
Forward
0 new messages