JMS queue with multiple consumers

后端 未结 2 1740
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-03 14:23

I have a JBoss-6 server with HornetQ and a single queue:

  
      

         


        
2条回答
  •  广开言路
    2020-12-03 15:04

    I am sorry but I cannot understand what exactly the problem is. We've used hornetq in 2.0.0.GA version and 2.2.2.Final. In both cases, queue-based load balancing works fine. If you will define multiple consumers for one queue and all of them are active, messages will be distributed between them automatically. First message to consumer A, second to consumer B, third to consumer C and so on. This is how queues with multiple consumers works - it's free load balancing :) That's normal that when you shut down one consumer, others would receive more messages.

提交回复
热议问题