title: How activemq wildcard consumers work?
body: <p>I am using ActiveMQ 5.8 with wildcard consumers configured in camel route.</p>
  
  <p>I am using default ActiveMQ configuration, so I have defaults as below</p>
  
  <pre><code>prefetch = 1
  dispatch policy= Round Robin
  </code></pre>
  
  <p>Now I start a consumer jvm with 5 consumers each for 2 queues. both the queue has same type of message and same number of messages.</p>
  
  <p>Consumers are doing nothing but printing the message (so no db blocking or slow consumer issue)</p>
  
  <p><strong>EDIT</strong>
  I have set preFetch to 1 for each of the queue</p>
  
  <p>What I observe is one of the queue getting drained faster than other.</p>
  
  <p>What I expect is both the queue getting drained at equal pace, kind of load balance.</p>
  
  <p>One surprising observation is
  Though activemq webconsole shows 5 consumers for each of those queues</p>
  
  <p><img src="https://i.stack.imgur.com/Biegs.png" alt="enter image description here"></p>
  
  <p>When I debug my consumer, I see only 5 threads / consumers from camel flow for a wildcard queue *.processQueue
  <img src="https://i.stack.imgur.com/P65Nh.png" alt="enter image description here"></p>
  
  <p>What will be cause of above behavior?
  How do I make sure that all the queue drain at equal pace?</p>
  
  <p>Did anyone has experience to share on writting custom dispatch policy or overriding defaults of activemq?</p>