title: ActiveMQ : Message listener not processing all entries in queue
body: <p>We have a requirement where in I'll be deploying an application on n number of servers, say S1, S2 ,....Sn.There is an activeMQ queue defined on one of the servers , say S1.I have configured my servers to produce messages and place them in the same queue which is configured in S1. While all the servers are configured to use the same queue for storing the produced messages, my requirement is to have only one of the n servers process all the messages from the queue , again let's say S1.So while all the servers ranging from S1,S2,...Sn can produce and store them on the queue configured on S1,only S1 should process all of them.Hence I have disabled the "MessageListener" part of all the servers except S1. For some reason though, S1 doesn't process everything. I sense that the queue is distributing the messages in a round robin fashion in spite of the other Listeners being disabled. S1 processes every alternate message in a case where two servers are accessing a queue. Any help to resolve this issue would be greatly appreciated.</p>
  
  <p>Note: If it might help,I'm using Spring JMS template and complete Spring XML based configuration for JMS.</p>
  
  <p>Here is my XML configuration snippet                             </p>
  
  <pre><code>&lt;bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"&gt;
  &lt;property name="brokerURL" value="tcp://ipaddress:61617"/&gt;
  &lt;/bean&gt;
  &lt;bean id="cscoDest" class="org.apache.activemq.command.ActiveMQQueue"&gt;
  &lt;constructor-arg value="STOCKS.CSCO" /&gt;
  &lt;/bean&gt;
  &lt;!--The message listener--&gt;
  &lt;bean id="portfolioListener" class="my.test.jms.Listener"&gt;
  &lt;/bean&gt;
  &lt;!--Spring DMLC--&gt;
  &lt;bean id="cscoConsumer" class="org.springframework.jms.listener.DefaultMessageListenerContainer102"&gt;
  &lt;property name="connectionFactory" ref="jmsConnectionFactory" /&gt;
  &lt;property name="destination" ref="cscoDest" /&gt;
  &lt;property name="messageListener" ref="portfolioListener" /&gt;
  &lt;/bean&gt;
  &lt;!--Spring JMS Template--&gt;
  &lt;bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate"&gt;
  &lt;property name="connectionFactory" ref="jmsConnectionFactory" /&gt;
  &lt;/bean&gt;
  &lt;bean id="stockPublisher" class="my.test.jms.SpringPublisher"&gt;
  &lt;property name="template" ref="jmsTemplate" /&gt;
  &lt;property name="destinations"&gt;
  &lt;list&gt;
  &lt;ref local="cscoDest" /&gt;
  &lt;/list&gt;
  &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>The above configuration is present in all of my servers.I'm disabling the 'portfolioListener' bean and it's property mapping in 'cscoConsumer' in all the servers except one which is S1 according to the above example.But still messages are being skipped in a round robin fashion.</p>