Queue federation problem

447 views
Skip to first unread message

Jojo Juju

unread,
Jun 23, 2015, 10:58:09 AM6/23/15
to rabbitm...@googlegroups.com
Hi,

I'm trying to create queue federation between two (2-node) clusters v. 3.3.5

On downstream cluster i've created policy and federation upstream like this:

rabbitmqctl set_policy -p serviceworkbench --priority 1 --apply-to queues fedex "^serviceworkbench$" '{"federation-upstream-set":"all"}'

rabbitmqctl set_parameter -p serviceworkbench federation-upstream federate '{"uri":["amqp://admin:*********@node1.something.com:5672/serviceworkbench","amqp://admin:*********@node2.something:5672/serviceworkbench"],"queue":"serviceworkbench","ack-mode":"no-ack"}'

So that made queue serviceworkbench in upstream cluster federated with queue serviceworkbench in downstream cluster.

Upstream cluster has no consumers and bunch of messages in serviceworkbench queue. Once I create the federation on downstream cluster i expect that messages to be transfered to the downstream cluster.

Downstream cluster log says everything is OK:
=INFO REPORT==== 23-Jun-2015::07:44:25 ===
Federation queue 'serviceworkbench' in vhost 'serviceworkbench' connected to queue 'serviceworkbench' in vhost 'serviceworkbench' on amqp://node1.something.com:5672/serviceworkbench

.... but messages aren't transferred

Messages don't have any routing key and get to the queue through direct exchange

What is wrong here?

Thanks

Alvaro Videla

unread,
Jun 23, 2015, 11:35:41 AM6/23/15
to Jojo Juju, rabbitm...@googlegroups.com
Are you trying to setup queue federation? If that's the case, the federated queue should have consumers running. When those consumers aren't able to keep up with messages, then the federation plugin will start moving messages around. If there are no consumers on the queue, then the Federation plugin won't move messages.

If you just want to move messages from one queue to another, then perhaps try using the Shovel plugin.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jojo Juju

unread,
Jun 23, 2015, 11:47:38 AM6/23/15
to rabbitm...@googlegroups.com, tv.in....@gmail.com
Thanks. Do you mean i need to have consumers on upstream cluster in order to get them to downstream cluster?

Alvaro Videla

unread,
Jun 23, 2015, 11:54:12 AM6/23/15
to Jojo Juju, rabbitm...@googlegroups.com
Yes, as far as I understand the plugin code, if there are no consumers upstream, then federation won't pick messages from said queue.

This is the relevant code: https://github.com/rabbitmq/rabbitmq-federation/blob/master/src/rabbit_federation_queue.erl#L114 'empty' is returned by the queue when there are no consumers. Which is used here https://github.com/rabbitmq/rabbitmq-federation/blob/master/src/rabbit_federation_queue.erl#L108 based on the consumer's priority implementation: https://www.rabbitmq.com/consumer-priority.html

Perhaps one of my colleagues can comment if that's not the case.
Reply all
Reply to author
Forward
0 new messages