[rabbitmq-discuss] Issue with RabbitMQ 2-way federation setup
Rahul
rahulkj at gmail.com
Fri Feb 7 15:29:09 GMT 2014
Thanks Simon for this info.
What I was trying to achieve is, ensure the messages are available in the
queues on both Node A and B.
So what I understand from the description is, federation does not simulate
the mirrored queues behavior.
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.
Mirroring ensures the same message is available on all cluster nodes.
Is there a way I can simulate mirroring using federation?
On Fri, Feb 7, 2014 at 4:19 AM, Simon MacMullen <simon at rabbitmq.com> wrote:
> So with the configuration you have described, you will be federating both
> your exchange and queue. That might not be what you want.
>
> Federated exchanges *copy* messages across the network, one per binding.
>
> Federated queues *move* messages to where the consumers are.
>
> 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?
>
> 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.
>
> 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".
>
> And yes, federation works for all exchange types.
>
> Checking federation status (http://www.rabbitmq.com/
> federation-reference.html#status) is likely to prove illuminating.
>
> Cheers, Simon
>
>
> On 06/02/2014 11:07PM, Rahul Jain wrote:
>
>> Hi,
>>
>> I've been trying to setup a 2-way federation for my 2 nodes A and B.
>>
>> I ran the following commands on Node A:
>>
>> |sudo rabbitmqctl set_parameter federation-upstream rabbit2
>> '{"uri":"amqp://<Node B IP>"}'
>> sudo rabbitmqctl set_parameter federation local-nodename '"rabbit1"'
>> sudo rabbitmqctl set_policy federate-me "^test\."
>> '{"federation-upstream-set":"test"}'|
>>
>>
>> commands on Node B:
>>
>> |sudo rabbitmqctl set_parameter federation-upstream rabbit2
>> '{"uri":"amqp://<Node A IP>"}'
>> sudo rabbitmqctl set_parameter federation local-nodename '"rabbit2"'
>> sudo rabbitmqctl set_policy federate-me "^test\."
>> '{"federation-upstream-set":"test"}'|
>>
>>
>> Now I created a fanout exchange and queue on Node A, namely
>> test.fanout-Exchange and test.fanout-Queue, using the RabbitMQ console.
>>
>> When I publish a message using RabbitMQ console of Node A, I see the
>> message reaches the queue on Node A alone, and not on Node B.
>>
>> Any clues?
>>
>>
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>
>>
> --
> Simon MacMullen
> RabbitMQ, Pivotal
>
--
Regards,
Rahul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140207/0751b339/attachment.html>
More information about the rabbitmq-discuss
mailing list