[rabbitmq-discuss] Alternate Exchanges: How to?

Alfonso Pantoja alfonso.pantoja at gmail.com
Mon Apr 4 15:34:47 BST 2011

On 4 abr, 14:19, Simon MacMullen <si... at rabbitmq.com> wrote:

> Or am I still misunderstanding what you're trying to do?

I will try to explain it :)

We have 2 web platforms and assign 1 RabbitMQ to each platform.
Both Rabbits will be clustered.
Normally when platform A produces messages they will be routed to
Rabbit A but in some cases could happen that data
from platform A needs to reach Rabbit B (this is due to our business
logic and architecture).

Rabbit A has an exchange Ex_PlatformA and Rabbit B has Ex_PlatformB.
When clustered as you said, both exchanges are replicated.
These exchanges bind queues on the same RabbitMQ they are: so
Ex_PlatformA binds only queues in RabbitA while Ex_PlatformB binds
queues in RabbitB.

So a consumer listening messages from a queue in Rabbit A normally
sends messages to queues in Rabbit A (bind to Ex_PlatformA)
but sometimes if the message data belongs to PlatformB (decided by
busness logic) it sends messages to Ex_PlatformB because that message
must be a in queue on Rabbit B.

If Rabbit A and Rabbit B lose their link then I suppose messages from
that consumer (attached to Rabbit A) that is necessary they  reach
Rabbit B won't be delivered because they will be unroutable  (although
Ex_PlatformB exchange is mirrored in Rabbit B, the binding between it
and a queue in Rabbit B is not accessible due to queues are not
replicated) so there is the need to keep unroutable messages somewhere
and maybe alternate exchanges is the solution.



More information about the rabbitmq-discuss mailing list