AbstractConnectionFactory - addressShuffleMode RANDOM as default #1497
Labels
ideal-for-user-contribution
An issue that would ideal for a user to get started with contributing.
type: enhancement
Expected Behavior
When using a RabbitMQ cluster, client applications using Spring's ConnectionFactory abstraction connect by default to the first host configured in the list of addresses provided. Using a RabbitMQ cluster provides not only fault tolerance in the case of node failures, but also resiliency when client connections are distributed among all nodes. I can't think of a single use-case where it is desired to let all client applications connect to the same node in a cluster. Therefor I would expect the default value of addressShuffleMode in AbstractConnectionFactory to be set to RANDOM so clients randomly choose a node to connect to, resulting in a somewhat even distribution of client connections among nodes in the cluster.
Current Behavior
The default addressShuffleMode is NONE, resulting in all client applications connecting to the first node defined in the addresses.
Context
In our cluster a single node handles almost all of the client connections, resulting in unnecessary load on the node. Additionally, performing an upgrade of that node or observing a crash would result in all client applications losing their connections instead of just a portion.
Happy to make a PR if this sounds feasible.
The text was updated successfully, but these errors were encountered: