Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failover scenarios #128

Closed
andronat opened this issue Jan 14, 2015 · 1 comment
Closed

Failover scenarios #128

andronat opened this issue Jan 14, 2015 · 1 comment

Comments

@andronat
Copy link

Hello, I would like to know if it possible to include an example that demonstrates a failover scenario between multiple Message Queues.

Or someone write some comments on how can this be done?

@squaremo
Copy link
Collaborator

Hi there,

There's no explicit support in amqplib for failover, but it doesn't prevent you using RabbitMQ's clustering and mirrored queues (http://www.rabbitmq.com/ha.html) and so on, either.

In general, there's no one recommended approach to failover.

If you want to do it in Node.JS code a simple way would be to keep a list of nodes, and when your connection is dropped, try to connect to the next node in the list.

People sometimes use HAProxy to direct connections to "live" nodes, in which case all you need to do in your app would be to attempt to reconnect (and possibly re-assert queues and so on).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants