Shovel and routing key

1,207 views
Skip to first unread message

Chris Bryant

unread,
Dec 13, 2016, 4:39:33 PM12/13/16
to rabbitmq-users
I've seen the question before about a dynamic shovel moving a message from one exchange using a routing key and re-publishing to a specific queue on another exchange but the routing key being replaced by the queue name on the target. I don't understand why routing keys would be dropped by the Shovel in this re-publishing, but that is the way it works.

Unfortunately that is a big problem with what I am trying to do with specific routing of messages around a distributed system of exchanges that requires explicit routing to insure messages only touch exchanges for which they are meant. In addition there are some messages that must be routed through some exchanges to the final target exchange. Consumers use routing keys to insure they only consume messages meant for them.

I must keep messages between queues separate as I have different priority consumers with different QoS issues and message rates.

Is there an alternative to Shovels that can move messages between queues on different exchanges based on routing keys in a dynamically reconfigurable system?

Or should I switch this up a level and use multiple exchanges on each server instead of a single exchange with multiple queues?

Michael Klishin

unread,
Dec 13, 2016, 4:46:03 PM12/13/16
to rabbitm...@googlegroups.com
One very common way of publishing "directly" to a queue is to use the default exchange, which
requires that routing key is set to the name of the target queue. When your target is a queue,
plugins often choose that way over declaring their own exchanges and setting up bindings.

I'm afraid we cannot suggest what you should do: we know very little about your system and its
goals.

You can take a look at exchange-to-exchange bindings:
They provide a lot of flexibility at the cost of some extra complexity. My reading of your post suggests
you may be already aware of them/using them.

There is an alternative to Shovel: write your own app in any language you please that does exactly
what you need.
Shovel is a really basic tool: it consumes messages from a source (usually an existing queue; could be a temp queue bound to an existing exchange) and publishes
to the a destination.

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ
Reply all
Reply to author
Forward
0 new messages