Hi, I'm currently using ActiveMQ 5.14.1 embedded broker connected from
several local queues to MS Azure IoT Hub using JmsConnectionFactory as
foreignConnectionFactory in SimpleJmsQueueConnector. (Using dependency to
qpid jms client 0.11.1) Each queue is connected to the server via its
respective bridge and everything seems to be working fine until I want to
shut down the connection.

If I have network connection, everything is stopped in few seconds. However
if I lose network connection and call SimpleJmsQueueConnector.stop() method,
it hangs on its foreignConnection.close() (JmsConnection). It remains stuck
indefinitely and I have to interrupt the thread responsible for closing of
the connection. Which unfortunately leads to more problems later as there
are remains of the connection in the system.

*Part of the thread dump:*
2016-11-16 09:35:13.275227      - parking to wait for  <0x42e6bc08> (a
java.util.concurrent.CountDownLatch$Sync)
2016-11-16 09:35:13.275654      at
java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
2016-11-16 09:35:13.276143      at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
2016-11-16 09:35:13.276631      at
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:994)
2016-11-16 09:35:13.277058      at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1303)
2016-11-16 09:35:13.277577      at
java.util.concurrent.CountDownLatch.await(CountDownLatch.java:236)
2016-11-16 09:35:13.278676      at
org.apache.qpid.jms.provider.ProviderFuture.sync(ProviderFuture.java:97)
2016-11-16 09:35:13.279103      at
org.apache.qpid.jms.JmsConnection.close(JmsConnection.java:187)
2016-11-16 09:35:13.279622      - locked <0x487b1cb8> (a
org.apache.qpid.jms.JmsQueueConnection)
2016-11-16 09:35:13.280018      at
org.apache.activemq.network.jms.JmsConnector.stop(JmsConnector.java:179)

I believe this problem is tied to the JMS specification and is caused by
MessageConsumer.receive() waiting on some pending receive. I've found some
description of the same or similar issue online, but no specific solution
for it. From what I've read I think the problem might be related to:

http://qpid.2158936.n2.nabble.com/Qpid-JMS-0-9-0-receive-hanging-issue-relates-to-Artemis-works-on-ActiveMQ-td7642585.html
<http://qpid.2158936.n2.nabble.com/Qpid-JMS-0-9-0-receive-hanging-issue-relates-to-Artemis-works-on-ActiveMQ-td7642585.html>
  

and

https://issues.apache.org/jira/browse/QPIDJMS-221
<https://issues.apache.org/jira/browse/QPIDJMS-221>  

Could you please tell me if it's possible to set up my messaging in such a
way which prevents this kind of freeze? How should I defend against this
kind of problems?
Thanks!



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Qpid-JMS-client-JmsConnection-close-hangs-tp7654565.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to