title: Artemis qpid consumer Not able to make connection with the broker
body: <p>Below is the configuration of Qpid client, using Camel context to connect Artemis broker.</p>
  <p>The context files are getting started as expected, but the qpid client in this case not able to connect to the Apache Artemis 2.14.0 broker.</p>
  <p>The qpid client is not able to connect the broker server, and there is Thread Blocking. I am not sure what is actually happening on the client side.</p>
  <p>But we noticed that for one of another service, we use a single spring camel context file with all the queues and references which works as expected.</p>
  <p>The producer uses a producerTemplate to push the message data using camelContextAware implementation.</p>
  <p>is there any possibility that the producer and consumer on the queue might be conflicting here?</p>
  <p>All i see is some thread blocks on the consumer side.</p>
  <p>common-context.xml</p>
  <pre class="lang-xml prettyprint-override"><code>...
   &lt;bean id=&quot;jmsConnectionFactory&quot; class=&quot;org.apache.qpid.jms.JmsConnectionFactory&quot;&gt;
              &lt;property name=&quot;remoteURI&quot; value=&quot;failover:(amqp://host1:5672,amqp://host2:5672)&quot;/&gt;
      &lt;/bean&gt;
   &lt;bean id=&quot;pooledConnectionFactory&quot; class=&quot;org.messaginghub.pooled.jms.JmsPoolConnectionFactory&quot;
                      init-method=&quot;start&quot; destroy-method=&quot;stop&quot; &gt;
          &lt;property name=&quot;maxConnections&quot; value=&quot;3&quot; /&gt;
          &lt;property name=&quot;connectionFactory&quot; ref=&quot;jmsConnectionFactory&quot; /&gt;
   &lt;/bean&gt;
   &lt;bean id=&quot;jmsConfig&quot; class=&quot;org.apache.camel.component.jms.JmsConfiguration&quot;&gt;
          &lt;property name=&quot;connectionFactory&quot; ref=&quot;pooledConnectionFactory&quot; /&gt;
          &lt;property name=&quot;concurrentConsumers&quot; value=&quot;3&quot; /&gt;
   &lt;/bean&gt;
   &lt;bean id=&quot;env-queue&quot; class=&quot;org.apache.camel.component.amqp.AMQPComponent&quot;&gt;
          &lt;property name=&quot;configuration&quot; ref=&quot;jmsConfig&quot; /&gt;
   &lt;/bean&gt;
  ...
  </code></pre>
  <p>service-context.xml
  Note: There were two camel context in this single xml file even then all the context got , using camel 2.20.0 version</p>
  <pre class="lang-xml prettyprint-override"><code>...
  &lt; import resource=&quot;classpath:/common-context.xml&quot;/&gt;
  ...
  &lt;route id=&quot;messageProcessor&quot; shutdownRoute=&quot;Default&quot; shutdownRunningTask=&quot;CompleteAllTasks&quot;&gt;
      &lt;from uri=&quot;env-queue:queue:order-demo-queue&quot; id=&quot;OrderInfo&quot;/&gt;
      &lt;camel:setProperty propertyName=&quot;orderType&quot;&gt;
         &lt;camel:jsonpath trim=&quot;true&quot;&gt;$.orderType&lt;/camel:jsonpath&gt;
      &lt;/camel:setProperty&gt;
  ...
  </code></pre>
  <p>logs:</p>
  <pre><code>2020-10-05 23:25:21,078: Thread-1 DEBUG (DefaultCamelContext.java:3993) - Starting consumer (order: 1000) on route: messageProcessor
  2020-10-05 23:25:21,079: Thread-1 DEBUG (DefaultManagementAgent.java:470) - Registered MBean with ObjectName: org.apache.camel:context=orderventprocesor,type=consumers,name=JmsConsumer(0x3fed52a3)
  2020-10-05 23:25:21,079: Thread-1 DEBUG (DefaultConsumer.java:144) - Starting consumer: Consumer[env-queue://queue:order-demo-queue]
  2020-10-05 23:25:21,138: Thread-1 DEBUG (FailoverProvider.java:153) - Initiating initial connection attempt task
  2020-10-05 23:25:21,140: FailoverProvider: async work thread DEBUG (FailoverProvider.java:744) - Connection attempt:[1] to: amqp://host1:5672 in-progress
  2020-10-05 23:25:21,145: Thread-1 DEBUG (AbstractJmsListeningContainer.java:382) - Established shared JMS Connection
  2020-10-05 23:25:21,145: Thread-1 DEBUG (AbstractJmsListeningContainer.java:549) - Resumed paused task: org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker@51524bce
  2020-10-05 23:25:21,146: Thread-1 DEBUG (AbstractJmsListeningContainer.java:549) - Resumed paused task: org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker@708b22ca
  2020-10-05 23:25:21,147: Thread-1 DEBUG (AbstractJmsListeningContainer.java:549) - Resumed paused task: org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker@314f82d7
  2020-10-05 23:25:21,148: Thread-1 DEBUG (AbstractJmsListeningContainer.java:549) - Resumed paused task: org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker@73719eb3
  2020-10-05 23:25:21,148: Thread-1 DEBUG (AbstractJmsListeningContainer.java:549) - Resumed paused task: org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker@30beb728
  2020-10-05 23:25:21,155: FailoverProvider: async work thread INFO (FailoverProvider.java:751) - Connection attempt:[1] to: amqp://host1:5672 failed
  2020-10-05 23:25:21,156: FailoverProvider: async work thread DEBUG (FailoverProvider.java:744) - Connection attempt:[1] to: amqp://host2:5672 in-progress
  2020-10-05 23:25:21,157: FailoverProvider: async work thread INFO (FailoverProvider.java:751) - Connection attempt:[1] to: amqp://host2:5672 failed
  2020-10-05 23:25:21,167: FailoverProvider: async work thread DEBUG (FailoverProvider.java:744) - Connection attempt:[2] to: amqp://host1:5672 in-progress
  
  </code></pre>
  <p>thread dump (some thing like below)</p>
  <pre><code>Camel (orderventprocesor) thread #5 - JmsConsumer[order-demo-queue]&quot; #45 daemon prio=5 os_prio=0 tid=0x00007faf395b3000 nid=0x58e3 waiting for monitor entry [0x00007faf1290c000]
  INFO   | jvm 1    | 2020/10/06 00:01:38 |    java.lang.Thread.State: BLOCKED (on object monitor)
  INFO   | jvm 1    | 2020/10/06 00:01:38 |       at org.springframework.jms.listener.AbstractJmsListeningContainer.getSharedConnection(AbstractJmsListeningContainer.java:492)
  INFO   | jvm 1    | 2020/10/06 00:01:38 |       - waiting to lock &lt;0x00000007ba976500&gt; (a java.lang.Object)
  INFO   | jvm 1    | 2020/10/06 00:01:38 |       at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.initResourcesIfNecessary(DefaultMessageListenerContainer.java:1170)
  INFO   | jvm 1    | 2020/10/06 00:01:38 |       at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1149)
  INFO   | jvm 1    | 2020/10/06 00:01:38 |       at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1142)
  INFO   | jvm 1    | 2020/10/06 00:01:38 |       at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1039)
  INFO   | jvm 1    | 2020/10/06 00:01:38 |       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  INFO   | jvm 1    | 2020/10/06 00:01:38 |       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  INFO   | jvm 1    | 2020/10/06 00:01:38 |       at java.lang.Thread.run(Thread.java:748)
  </code></pre>
  <p>Updated:</p>
  <p>When i change the remoteUri to simple <code>amqp://localhost:5672</code> i see an exception on the netty-resolver</p>
  <pre><code> java.lang.NoClassDefFoundError: &quot;io/netty/resolver/AddressResolverGroup&quot;
  </code></pre>
  <p>After including the netty-resolver 4.1.51 jar, now i see below exception.</p>
  <pre><code>2020-10-09 15:11:04.944 Camel (orderventprocesor) thread #6 - JmsConsumer[order-demo-queue] ERROR JmsConnection:165 - Failed to connect to remote at: amqp://localhost:5672
  2020-10-09 15:11:04.946 Camel (orderventprocesor) thread #6 - JmsConsumer[order-demo-queue] ERROR DefaultJmsMessageListenerContainer:934 - Could not refresh JMS Connection for destination 'order-demo-queue' - retrying using FixedBackOff{interval=5000, currentAttempts=0, maxAttempts=unlimited}. Cause: io.netty.util.concurrent.MultithreadEventExecutorGroup.newChild(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Lio/netty/util/concurrent/EventExecutor;
  javax.jms.JMSException: io.netty.util.concurrent.MultithreadEventExecutorGroup.newChild(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Lio/netty/util/concurrent/EventExecutor;
      at org.apache.qpid.jms.provider.ProviderException.toJMSException(ProviderException.java:34)
      at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:80)
      at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:112)
      at org.apache.qpid.jms.JmsConnection.connect(JmsConnection.java:176)
      at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:212)
      at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:199)
      at org.messaginghub.pooled.jms.JmsPoolConnectionFactory.createProviderConnection(JmsPoolConnectionFactory.java:651)
      at org.messaginghub.pooled.jms.JmsPoolConnectionFactory$1.makeObject(JmsPoolConnectionFactory.java:108)
      at org.messaginghub.pooled.jms.JmsPoolConnectionFactory$1.makeObject(JmsPoolConnectionFactory.java:105)
      at org.apache.commons.pool2.impl.GenericKeyedObjectPool.create(GenericKeyedObjectPool.java:1041)
      at org.apache.commons.pool2.impl.GenericKeyedObjectPool.addObject(GenericKeyedObjectPool.java:1221)
      at org.messaginghub.pooled.jms.JmsPoolConnectionFactory.createJmsPoolConnection(JmsPoolConnectionFactory.java:705)
      at org.messaginghub.pooled.jms.JmsPoolConnectionFactory.createConnection(JmsPoolConnectionFactory.java:237)
      at org.messaginghub.pooled.jms.JmsPoolConnectionFactory.createConnection(JmsPoolConnectionFactory.java:232)
      at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:180)
      at org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:413)
      at org.springframework.jms.listener.AbstractJmsListeningContainer.refreshSharedConnection(AbstractJmsListeningContainer.java:398)
      at org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:915)
      at org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:890)
      at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1061)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:748)
  Caused by: org.apache.qpid.jms.provider.exceptions.ProviderIOException: io.netty.util.concurrent.MultithreadEventExecutorGroup.newChild(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Lio/netty/util/concurrent/EventExecutor;
      at org.apache.qpid.jms.provider.exceptions.ProviderExceptionSupport.createOrPassthroughFatal(ProviderExceptionSupport.java:46)
      at org.apache.qpid.jms.provider.amqp.AmqpProvider.connect(AmqpProvider.java:308)
      at org.apache.qpid.jms.JmsConnection.connect(JmsConnection.java:162)
      ... 19 more
  Caused by: java.lang.AbstractMethodError: io.netty.util.concurrent.MultithreadEventExecutorGroup.newChild(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Lio/netty/util/concurrent/EventExecutor;
      at io.netty.util.concurrent.MultithreadEventExecutorGroup.&lt;init&gt;(MultithreadEventExecutorGroup.java:84)
      at io.netty.util.concurrent.MultithreadEventExecutorGroup.&lt;init&gt;(MultithreadEventExecutorGroup.java:58)
      at io.netty.util.concurrent.MultithreadEventExecutorGroup.&lt;init&gt;(MultithreadEventExecutorGroup.java:47)
      at io.netty.channel.MultithreadEventLoopGroup.&lt;init&gt;(MultithreadEventLoopGroup.java:50)
      at io.netty.channel.nio.NioEventLoopGroup.&lt;init&gt;(NioEventLoopGroup.java:70)
      at io.netty.channel.nio.NioEventLoopGroup.&lt;init&gt;(NioEventLoopGroup.java:65)
      at io.netty.channel.nio.NioEventLoopGroup.&lt;init&gt;(NioEventLoopGroup.java:56)
      at org.apache.qpid.jms.transports.netty.NettyTcpTransport.connect(NettyTcpTransport.java:151)
      at org.apache.qpid.jms.provider.amqp.AmqpProvider.connect(AmqpProvider.java:230)
      ... 20 more
  2020-10-09 15:11:09.949 Camel (orderventprocesor) thread #6 - JmsConsumer[order-demo-queue] ERROR JmsConnection:165 - Failed to connect to remote at: amqp://localhost:5672
  2020-10-09 15:11:09.950 Camel (orderventprocesor) thread #6 - JmsConsumer[order-demo-queue] ERROR DefaultJmsMessageListenerContainer:934 - Could not refresh JMS Connection for destination 'order-demo-queue' - retrying using FixedBackOff{interval=5000, currentAttempts=1, maxAttempts=unlimited}. Cause: io.netty.util.concurrent.MultithreadEventExecutorGroup.newChild(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Lio/netty/util/concurrent/EventExecutor;
  javax.jms.JMSException: io.netty.util.concurrent.MultithreadEventExecutorGroup.newChild(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Lio/netty/util/concurrent/EventExecutor;
      at org.apache.qpid.jms.provider.ProviderException.toJMSException(ProviderException.java:34)
      at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:80)
      at org.apache.qpid.jms.exceptions.JmsExceptionSupport.create(JmsExceptionSupport.java:112)
      at org.apache.qpid.jms.JmsConnection.connect(JmsConnection.java:176)
      at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:212)
      at org.apache.qpid.jms.JmsConnectionFactory.createConnection(JmsConnectionFactory.java:199)
      at org.messaginghub.pooled.jms.JmsPoolConnectionFactory.createProviderConnection(JmsPoolConnectionFactory.java:651)
      at org.messaginghub.pooled.jms.JmsPoolConnectionFactory$1.makeObject(JmsPoolConnectionFactory.java:108)
      at org.messaginghub.pooled.jms.JmsPoolConnectionFactory$1.makeObject(JmsPoolConnectionFactory.java:105)
      at org.apache.commons.pool2.impl.GenericKeyedObjectPool.create(GenericKeyedObjectPool.java:1041)
      at org.apache.commons.pool2.impl.GenericKeyedObjectPool.addObject(GenericKeyedObjectPool.java:1221)
      at org.messaginghub.pooled.jms.JmsPoolConnectionFactory.createJmsPoolConnection(JmsPoolConnectionFactory.java:705)
      at org.messaginghub.pooled.jms.JmsPoolConnectionFactory.createConnection(JmsPoolConnectionFactory.java:237)
      at org.messaginghub.pooled.jms.JmsPoolConnectionFactory.createConnection(JmsPoolConnectionFactory.java:232)
      at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:180)
      at org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:413)
      at org.springframework.jms.listener.AbstractJmsListeningContainer.refreshSharedConnection(AbstractJmsListeningContainer.java:398)
      at org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:915)
      at org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:890)
      at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1061)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:748)
  Caused by: org.apache.qpid.jms.provider.exceptions.ProviderIOException: io.netty.util.concurrent.MultithreadEventExecutorGroup.newChild(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Lio/netty/util/concurrent/EventExecutor;
      at org.apache.qpid.jms.provider.exceptions.ProviderExceptionSupport.createOrPassthroughFatal(ProviderExceptionSupport.java:46)
      at org.apache.qpid.jms.provider.amqp.AmqpProvider.connect(AmqpProvider.java:308)
      at org.apache.qpid.jms.JmsConnection.connect(JmsConnection.java:162)
      ... 19 more
  Caused by: java.lang.AbstractMethodError: io.netty.util.concurrent.MultithreadEventExecutorGroup.newChild(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Lio/netty/util/concurrent/EventExecutor;
      at io.netty.util.concurrent.MultithreadEventExecutorGroup.&lt;init&gt;(MultithreadEventExecutorGroup.java:84)
      at io.netty.util.concurrent.MultithreadEventExecutorGroup.&lt;init&gt;(MultithreadEventExecutorGroup.java:58)
      at io.netty.util.concurrent.MultithreadEventExecutorGroup.&lt;init&gt;(MultithreadEventExecutorGroup.java:47)
      at io.netty.channel.MultithreadEventLoopGroup.&lt;init&gt;(MultithreadEventLoopGroup.java:50)
      at io.netty.channel.nio.NioEventLoopGroup.&lt;init&gt;(NioEventLoopGroup.java:70)
      at io.netty.channel.nio.NioEventLoopGroup.&lt;init&gt;(NioEventLoopGroup.java:65)
      at io.netty.channel.nio.NioEventLoopGroup.&lt;init&gt;(NioEventLoopGroup.java:56)
      at org.apache.qpid.jms.transports.netty.NettyTcpTransport.connect(NettyTcpTransport.java:151)
      at org.apache.qpid.jms.provider.amqp.AmqpProvider.connect(AmqpProvider.java:230)
      ... 20 more
  </code></pre>