Client-Side Load Balancing
This topic has not yet been written. The content below is from the topic description.
38.4. Client-Side Load balancing With HornetQ client-side load balancing, subsequent sessions created using a single session factory can be connected to different nodes of the cluster. This allows sessions to spread smoothly across the nodes of a cluster and not be "clumped" on any particular node. The load balancing policy to be used by the client factory is configurable. HornetQ provides two out-of-the-box load balancing policies and you can also implement your own and use that. The out-of-the-box policies are Round Robin. With this policy the first node is chosen randomly then each subsequent node is chosen sequentially in the same order. For example nodes might be chosen in the order B, C, D, A, B, C, D, A, B or D, A, B, C, A, B, C, D, A or C, D, A, B, C, D, A, B, C, D, A. Random. With this policy each node is chosen randomly. You can also implement your own policy by implementing the interface org.hornetq.api.core.client.loadbalance.ConnectionLoadBalancingPolicy