title: Adding multiple listeners which will listen to different RabbitMQ queue not working
body: <p>I hava following spring xml configuration</p>
  <pre><code>&lt;bean id=&quot;connectionFactory&quot;
            class=&quot;org.springframework.amqp.rabbit.connection.CachingConnectionFactory&quot;&gt;
   &lt;constructor-arg value=&quot;xxxxxxxx&quot;/&gt;
          &lt;property name=&quot;username&quot; value=&quot;xxxxx&quot;/&gt;
          &lt;property name=&quot;password&quot; value=&quot;xxxxx&quot;/&gt;
          &lt;property name=&quot;channelCacheSize&quot; value=&quot;25&quot;/&gt;
          &lt;property name=&quot;virtualHost&quot; value=&quot;/&quot;/&gt;
          &lt;property name=&quot;port&quot; value=&quot;3453&quot;/&gt;
   &lt;/bean&gt;
  
   &lt;rabbit:template id=&quot;tutorialTemplate&quot; connection-factory=&quot;connectionFactory&quot;/&gt;
   &lt;!-- 1st queue --&gt;             
   &lt;rabbit:queue id=&quot;veliteQueue&quot; name=&quot;ES_queue&quot; durable=&quot;true&quot; auto-delete=&quot;false&quot; exclusive=&quot;false&quot;/&gt;
      
   &lt;rabbit:direct-exchange id=&quot;myExchange&quot; durable=&quot;true&quot; name=&quot;ES_exchange&quot;&gt;
       &lt;rabbit:bindings&gt;
          &lt;rabbit:binding queue=&quot;veliteQueue&quot; key=&quot;logstash&quot;&gt;&lt;/rabbit:binding&gt;
       &lt;/rabbit:bindings&gt;
   &lt;/rabbit:direct-exchange&gt;
  
    &lt;!-- 2nd Queue --&gt;
   &lt;rabbit:queue id=&quot;veliteQueue1&quot; name=&quot;ES_queue_Temp&quot; durable=&quot;true&quot; auto-delete=&quot;false&quot; exclusive=&quot;false&quot;/&gt; 
  
    &lt;rabbit:direct-exchange id=&quot;myExchange1&quot; durable=&quot;true&quot; name=&quot;ES_exchange_temp&quot;&gt;
      &lt;rabbit:bindings&gt;
          &lt;rabbit:binding queue=&quot;ES_queue_Temp&quot; key=&quot;logstash_temp&quot;&gt;&lt;/rabbit:binding&gt;
      &lt;/rabbit:bindings&gt;
     &lt;/rabbit:direct-exchange&gt; 
     &lt;!-- 2 Listeners for 2 queue's mentioned above --&gt; 
     &lt;bean id=&quot;aListener&quot; class=&quot;com.vzw.es.cosumer.SpringMessageListener&quot; autowire=&quot;byName&quot;/&gt;
  &lt;bean id=&quot;aListener1&quot; class=&quot;com.vzw.es.cosumer.SpringMessageListener1&quot; autowire=&quot;byName&quot;/&gt;
  
  &lt;rabbit:listener-container id=&quot;myListenerContainer&quot; connection-factory=&quot;connectionFactory&quot; acknowledge=&quot;auto&quot; prefetch=&quot;750&quot; concurrency=&quot;1&quot;&gt;
      &lt;rabbit:listener ref=&quot;aListener&quot; queues=&quot;veliteQueue&quot;/&gt;
      &lt;rabbit:listener ref=&quot;aListener1&quot; queues=&quot;veliteQueue1&quot;/&gt;
  &lt;/rabbit:listener-container&gt;
  </code></pre>
  <p>Now in my Java code I have 2 Listener classes: com.vzw.es.cosumer.SpringMessageListener and com.vzw.es.cosumer.SpringMessageListener1. Now When I am running my main class only 1 listener's onMessage method is getting invoked i.e. SpringMessageListener1, I did check from RabbitMQ prespective and bothe queues have enough messages to consume.</p>
  <p>Also when I comment out the 2nd queue and its listener from xml SpringMessageListener works perfectly.</p>