activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milano Nicolum <>
Subject ActiveMQConnection close() hangs on pending message
Date Fri, 20 Jan 2017 15:33:01 GMT
Hi, I'm using ActiveMQ 5.14.3 with Qpid JMS client 0.20.0 in QueueBridge
setup when local and remote queues are connected via JmsConnector. On my
device I have an osgi bundle sending and receiving messages. ActiveMQ
servers as persistence manager (KahaDB) and as entry point for the system,
while Qpid JMS client as actual communication client for connection to MS
Azure's IoT Hub.

This device suffers from quite common losses of network connection. In such
case I try to close the JmsConnector and free all resources belonging to
it. The problem is that when there is a message pending (cannot be
delivered since the network connection is lost) my implementation of
JmsConnector gets stuck on closing local connection.

the closing process hangs on:
FifoMessageDispatchChannel.stop(), line 124
ActiveMQMessageConsumer.stop(), line 1551
ActiveMQSession.stop(), line 1856
ActiveMQConnection.doStop(false), line 586
ActiveMQConnection.close(),line 642

It is clear to me that the session tries to finish its pending receives
first, but is there any way how to shut the connection down in given time?
The way the close() is done means the stopping thread gets stuck before the
ActiveMQConnection.closeTimeout has any chance to get checked...

Thanks for any tips!

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message