Skip to content

Make socket connection to try all DNS record IPs #138

Closed
@ebuildy

Description

@ebuildy

In a HA RabbitMQ cluster, I use DNS round robin technic to load balance the load between nodes and replace HAProxy, for instance:

rabbitmq => 10.0.0.1 10.0.0.2 10.0.0.3

It works like a charm with the Php extension, because here:

https://github.com/alanxz/rabbitmq-c/blob/master/librabbitmq/amqp_socket.c#L449

We can see that all IP adresses from DNS record are "tested", so if a node goes down, no problemo, no error on Php side when connecting.

But, I also use logstash to consume RabbitMQ messages, which uses this library, and apparently, this little trick is not working as I can see on:

https://github.com/rabbitmq/rabbitmq-java-client/blob/master/src/main/java/com/rabbitmq/client/impl/FrameHandlerFactory.java#L28

Do you think this could be a feature here (or I may miss a Java trick here) ?

Thanks you,

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions