1 Reply Latest reply on Aug 22, 2014 3:44 PM by jbertram

    HornetQ - Spreading Consumers/Subscribers Across Cluster

    kluberts

      Hi - we have a four node HornetQ cluster in place which is handling many different consumer/subscribers.  The services that connect to the queues and topics are very busy processes.  They pretty much run all day long non-stop dumping and picking up messages.  What I see is that a process might have up to 6 consumers and all the consumers can potentially wind up on the same 1 or 2 nodes.  Generally the only way I've seen to sort of better spread these is to restart the services and have them create new connections.

       

      Is there anything that I may be able to configure on the HornetQ side to sort of detect this and better spread the consumers/subscribers?

       

      Thanks,

      Ken

        • 1. Re: HornetQ - Spreading Consumers/Subscribers Across Cluster
          jbertram

          There is nothing on the server side that will spread sessions evenly across nodes of the cluster.  However, clients can use a load-balancing policy to facilitate the behavior you're looking for.  See this bit of documentation.

           

          If you detect clumped connections it's probably best to use the HornetQServerControl to close the connections of a particular client (e.g. use the "closeConnectionsForAddress" operation) which would ideally trigger the clients to reconnect (using an appropriate load-balancing policy).