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

How to connect to RabbitMQ cluster? #339

Closed
teran opened this issue Jul 12, 2018 · 4 comments
Closed

How to connect to RabbitMQ cluster? #339

teran opened this issue Jul 12, 2018 · 4 comments

Comments

@teran
Copy link

teran commented Jul 12, 2018

Hello,

I have three nodes of RabbitMQ in cluster and want use them properly according to docs but I cannot find any mentions of how to specify their FQDNs properly, it there a way to use clustered RabbitMQ at all?

Thanks in advance.

@lukebakken
Copy link
Contributor

Did you look at the example code?

Your application will have to choose a node in your cluster and connect to it with this library. If an un-recoverable connection error or other error occurs, your application will have to choose another node and connect to it. streadway/amqp does not provide that for you.

@teran
Copy link
Author

teran commented Jul 12, 2018

@lukebakken huh, so streadway/amqp doesn't handle clustered RabbitMQ backends, thanks!

@teran teran closed this as completed Jul 12, 2018
@lukebakken
Copy link
Contributor

Some AMQP clients support that (like the RabbitMQ Java client), but most don't and leave "higher level" operations like that up to the application developer or to another library (like EasyNetQ for .NET).

With enough demand and volunteer time, this library could support that as well. Another option is to use haproxy to round-robin connections.

@sirius1024
Copy link

@teran
Try this extension with reconnect and cluster supported:
https://github.com/sirius1024/go-amqp-reconnect

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