[rabbitmq-discuss] mail loop problem with shovel
Matthew Sackman
matthew at rabbitmq.com
Fri May 13 12:57:28 BST 2011
Hi Pradeep,
On Thu, May 12, 2011 at 04:44:03PM +0530, Pradeep Jindal wrote:
> I have two brokers in different data centers, both the brokers serve the
> same purpose. I wanted to see messages from broker1's "/topic/test" in
> broker2's "/topic/test" and vice-versa. So, i tried configuring shovel
> plugin, but it's going in a loop.
Yes, it will do. Routing keys/binding keys give you conditional
branching, but sadly there's no form of assignment, so it's not
Turing-complete. Bit of a shame really... :(
One solution to this is to use exchange-to-exchange bindings. ASCII art
to the rescue:
/---------------------[ Shovel 2 ]---------------------\
| |
V |
--->[X1]--->[X2]---->[[my queues]] [[my queues]]<---[X2]<---[X1]<---
| ^
| |
\------------------[ Shovel 1 ]-------------------------/
So the point is that the shovel injects msgs into the other broker
_below_ the point at which its own shovel copies msgs out.
Matthew
More information about the rabbitmq-discuss
mailing list