Rabbitmq - shovel failover

172 views
Skip to first unread message

Ryan Bamford

unread,
Jul 28, 2016, 9:28:46 AM7/28/16
to rabbitmq-users
Hi

I have 2 3 node clusters setup and a shovel setup to send messages from a fanout exchange on the first cluster to a direct exchange in the 2nd.

The shovel has been set up on the first cluster with 3 source URI's (the 3 nodes of the first cluster) and 3 destinations (the 3 nodes of the second cluster)

When run all connects fine

The shovel reports as

residing on the first node, 

connecting to the 2nd node in the first cluster as a source

connecting to the 3rd node in the 2nd cluster as the destination

and all connects fine

however if i stop either the 2nd node in the 1st cluster or the 3rd node in the 2nd cluster the connection goes down and never fails over another node  it just reports econnrefused

What am i missing to get this to fail over ??

Any help would be appreciated

Michael Klishin

unread,
Jul 28, 2016, 11:02:00 AM7/28/16
to rabbitm...@googlegroups.com
Shovel can use lists of URIs, see http://www.rabbitmq.com/shovel-static.html.

--
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.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Ryan Bamford

unread,
Jul 28, 2016, 11:50:19 AM7/28/16
to rabbitmq-users
I currently have 3 source and 3 destination URI's for the shovel. 

when i drop the one of the destination nodes it is connected to it never moves to one of the others  


It is dynamically created through the web interface rather than a static in the config. Does make a difference ????

Ryan Bamford

unread,
Jul 29, 2016, 4:49:31 AM7/29/16
to rabbitmq-users
Have tried declaring the shovel as static and no improvement. it still connects to one of the sources and one of the destinations but if either of these goes down it does not fail over   

Ryan Bamford

unread,
Jul 29, 2016, 5:15:02 AM7/29/16
to rabbitmq-users
Additional thing to note, the shovel is running in the first cluster if i take down the node the shovel was running on it re-initialises on a new node .... but still with the same source and destination   

Ryan Bamford

unread,
Jul 29, 2016, 10:42:53 AM7/29/16
to rabbitmq-users
***Fixed*** rabbit 3.6.3

For any people having issues the issue is the random seed

in the file rabbit_shovel_worker.erl wher it selects a random value to select of the passed in URIs the value alway comes back as the same adding the following 

rand_compat:seed(erlang:now()),

above line 233 in the method will seed the rand correctly and cause different values 

Michael Klishin

unread,
Jul 29, 2016, 10:48:20 AM7/29/16
to rabbitm...@googlegroups.com
Ryan,

Thank you for digging in! If you think you've identified something specific
that causes the problem, feel free to file an issue on GitHub:
Reply all
Reply to author
Forward
0 new messages