<div dir="ltr">Thanks Simon for this info.<div><br></div><div>What I was trying to achieve is, ensure the messages are available in the queues on both Node A and B.</div><div>So what I understand from the description is, federation does not simulate the mirrored queues behavior.</div>
<div><br></div><div>I need to create queue with the same name/different name and bind them to the same exchange. That way when a message is published to the exchange, and if I've set the exchange federation policy, then the message will be routed to respective queues.</div>
<div><br></div><div>Mirroring ensures the same message is available on all cluster nodes.</div><div><br></div><div>Is there a way I can simulate mirroring using federation?</div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Feb 7, 2014 at 4:19 AM, Simon MacMullen <span dir="ltr"><<a href="mailto:simon@rabbitmq.com" target="_blank">simon@rabbitmq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So with the configuration you have described, you will be federating both your exchange and queue. That might not be what you want.<br>
<br>
Federated exchanges *copy* messages across the network, one per binding.<br>
<br>
Federated queues *move* messages to where the consumers are.<br>
<br>
It's possible that what you've done is created a federated exchange and a federated queue, and only bound them together at one of the nodes?<br>
<br>
If you want messages to end up on both nodes then you want to only federate the exchange, not the queue; create queues at each node and bind them to the federated exchange.<br>
<br>
Also as Arun said, the config you've given references an upstream-set "test" which doesn't appear to exist - create it or use "all".<br>
<br>
And yes, federation works for all exchange types.<br>
<br>
Checking federation status (<a href="http://www.rabbitmq.com/federation-reference.html#status" target="_blank">http://www.rabbitmq.com/<u></u>federation-reference.html#<u></u>status</a>) is likely to prove illuminating.<br>
<br>
Cheers, Simon<div><div class="h5"><br>
<br>
On 06/02/2014 11:07PM, Rahul Jain wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi,<br>
<br>
I've been trying to setup a 2-way federation for my 2 nodes A and B.<br>
<br>
I ran the following commands on Node A:<br>
<br>
|sudo rabbitmqctl set_parameter federation-upstream rabbit2 '{"uri":"amqp://<Node B IP>"}'<br>
sudo rabbitmqctl set_parameter federation local-nodename '"rabbit1"'<br>
sudo rabbitmqctl set_policy federate-me "^test\." '{"federation-upstream-set":"<u></u>test"}'|<br>
<br>
<br>
commands on Node B:<br>
<br>
|sudo rabbitmqctl set_parameter federation-upstream rabbit2 '{"uri":"amqp://<Node A IP>"}'<br>
sudo rabbitmqctl set_parameter federation local-nodename '"rabbit2"'<br>
sudo rabbitmqctl set_policy federate-me "^test\." '{"federation-upstream-set":"<u></u>test"}'|<br>
<br>
<br>
Now I created a fanout exchange and queue on Node A, namely<br>
test.fanout-Exchange and test.fanout-Queue, using the RabbitMQ console.<br>
<br>
When I publish a message using RabbitMQ console of Node A, I see the<br>
message reaches the queue on Node A alone, and not on Node B.<br>
<br>
Any clues?<br>
<br>
<br></div></div><div class="im">
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
<br>
</div></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, Pivotal<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Regards,<div>Rahul</div></div>
</div>