3 Node Federation : Messages to be handled by other nodes and ignored by local node

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

3 Node Federation : Messages to be handled by other nodes and ignored by local node

Umashanker, Srividhya

Problem to solve :  

a.       I want federation of 3 nodes , messages published on one node to be available on all other nodes as well

b.      The local should not handle it, but all other nodes in the federation should handle it.

 

What did I configure

 

a.       Node 1:  Upstream – node2 , node3

Node 2:  Upstream -  node1, node3

Node 3:  upstream – node1, node2

 

b.      All three nodes have an exchange called  “federated-x”

c.       Federated-q   for federated-x with NO routing key

 

The following is what I tried.

1.       Federate only exchange  -  When I publish on node1’s federated-x,   I listened  on node1, node2, node3’s  federated-q. 

I received the messages on all 3 queues.

2.       Federate only  queue    -  When I publish on node1’s federated-x,   I listened  on node1, node2, node3’s  federated-q. 

a.       Only node1 local receives it.

b.      When node1 is not listening, the 1st consumer alone recives not all

3.       Federate both exchanges and queues – Did not work as expected.

 

Is the above the expected behavior?  Can anyone else suggest me other ways to handle it?

 

I can achieve mostly with exchange federation. But I want the local node to ignore the message. Any other way, than programmatically ignoring it when message comes without x-federation headers?

 

Please help.

 

-Vidhya

 


_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Reply | Threaded
Open this post in threaded view
|

Re: 3 Node Federation : Messages to be handled by other nodes and ignored by local node

michaelklishin

2014-04-19 18:42 GMT+04:00 Umashanker, Srividhya <[hidden email]>:

The following is what I tried.

1.       Federate only exchange  -  When I publish on node1’s federated-x,   I listened  on node1, node2, node3’s  federated-q. 

I received the messages on all 3 queues.

2.       Federate only  queue    -  When I publish on node1’s federated-x,   I listened  on node1, node2, node3’s  federated-q. 

a.       Only node1 local receives it.

b.      When node1 is not listening, the 1st consumer alone recives not all

3.       Federate both exchanges and queues – Did not work as expected.

 

Is the above the expected behavior?  Can anyone else suggest me other ways to handle it?

 

I can achieve mostly with exchange federation. But I want the local node to ignore the message. Any other way, than programmatically ignoring it when message comes without x-federation headers?


As described in http://www.rabbitmq.com/federated-queues.html,
federated queues distributed messages between federated clusters and prefer local consumers.
This sounds like the opposite of what you want.

Federated exchanges replicate message streams to other clusters. How the messages are routed or consumed
is completely up to you. So simply set up a topology in clusters 2 and 3 and have consumers there.

Cluster 1 won't have any queues bound to the federated exchange(s) and won't have any consumers.
--
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

_______________________________________________
rabbitmq-discuss mailing list
[hidden email]
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss