[rabbitmq-discuss] Issue with RabbitMQ 2-way federation setup
Simon MacMullen
simon at rabbitmq.com
Fri Feb 7 10:19:04 GMT 2014
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
More information about the rabbitmq-discuss
mailing list