wagslane / go-rabbitmq

A wrapper of streadway/amqp that provides reconnection logic and sane defaults
https://blog.boot.dev/golang/connecting-to-rabbitmq-in-golang-easy/
MIT License
752 stars 126 forks source link

Add cluster support via Resolver #163

Closed wazsone closed 4 weeks ago

wazsone commented 1 month ago

This adds support for RabbitMQ clusters to connect up to one of a number of servers.

It does this through a Resolver interface which has a single method called Resolve() which can return a list of servers. There is a standard implementation included called StaticResolver that will just take a list of URLS to connect to and optionally shuffle that list.

This interface approach allows for implementers of the library to extend for service discovery or other advanced typologies.

Fixes: https://github.com/wagslane/go-rabbitmq/issues/148

Revived this PR https://github.com/wagslane/go-rabbitmq/pull/156

chrisjoyce911 commented 1 month ago

This works well for me , would be great to see it merged

nemith commented 4 weeks ago

I wish you would have attributed the change to me properly, but glad this made it in.

wagslane commented 4 weeks ago

I wish you would have attributed the change to me properly, but glad this made it in.

Sorry? I just merged the PR because it looked good... your PR was closed. OP referenced (linked) your PR in his original comment not sure what else should have been done