Skip to content

How do you connect to a RabbitMQ cluster with this library? #155

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

Closed
damianof opened this issue May 21, 2015 · 13 comments
Closed

How do you connect to a RabbitMQ cluster with this library? #155

damianof opened this issue May 21, 2015 · 13 comments

Comments

@damianof
Copy link

No description provided.

@PritamUpadhyay
Copy link

+1

@carlhoerberg
Copy link
Contributor

Just follow the README. Do you experience any problem in particular?

@carlhoerberg
Copy link
Contributor

Or is you question if you can specify an array of hostname/ip:s to multiple nodes?

@michaelklishin
Copy link
Contributor

Every client is only connected to a single node. Is your question about automatic connection recovery and list host support, something that several other clients have?

@damianof
Copy link
Author

Ok so I was able to connect to a cluster by setting 'host' option to an array of hosts like ['127.0.0.1:5672', '127.0.0.1:5673'].

However, looking at the code I see it randomly picks one when you connect. But like michaelklishin mention, does this library also support automatic failover if one of them goes down? Or do I have to implement my own connection recovery?

@rusintez
Copy link

rusintez commented Jul 6, 2015

+1

@ralcini
Copy link

ralcini commented Jul 17, 2015

i'm searching into documentation about connecting to a cluster of brokers, but without success.
@damianof : where do you found documentation about "host" option?

@zweifisch
Copy link
Contributor

automatic failover/connection recovery is not supported

@squaremo
Copy link
Collaborator

automatic failover/connection recovery is not supported

That's right -- and there's no form of connect that accepts an array of hosts (perhaps you were thinking of node-amqp, @damianof ?)

I have resisted adding reconnection/failover so far -- see #25 for the most extensive discussion.

@jwalton
Copy link

jwalton commented Aug 21, 2015

@damianof See if https://github.com/benbria/node-amqp-connection-manager works for your use case.

@cressie176
Copy link
Collaborator

Rascal (built on top of amqp.node) might also be of some use. It accepts a list of hosts and will attempt to connect / reconnect to one of them at random, or until all hosts have failed.

@michaelklishin
Copy link
Contributor

@cressie176 please announce it on rabbitmq-users?

@cressie176
Copy link
Collaborator

@michaelklishin done. Thanks for the suggestion.

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

10 participants