Slow consumer terminally blocks both client and broker
------------------------------------------------------
Key: AMQ-1020
URL: https://issues.apache.org/activemq/browse/AMQ-1020
Project: ActiveMQ
Issue Type: Bug
Components: Broker
Affects Versions: 4.0.2
Environment: Broker: Windows XP, Sun JDK1.5 Client: activemq-dotnet
(Trunk)
Reporter: Rob Lugt
I have a multi-threaded client (client1) which is acting as both a publisher
(Topic1) and subscriber (Topic2) using a single session. There is another
client process (client2) which publishes on Topic2.
I have witnessed the following repeatable scenario where both clients get
stuck, which can only be rectified by restarting the broker! :-
Client1 publishes messages to Topic1 (rate = about 30 msgs/sec).
Client2 publishes bursts of messages to Topic2 (rate = 500 msgs/sec)
Client1 is a slow subscriber on Topic2
After running in this scenario for a couple of seconds, Client1 and Client2
become stuck. Looking at a stack trace for Client1 I can see that it's
read_loop is stuck waiting for input, and it's publisher thread is stuck
waiting for an acknowledgement to the synchronous message send (the
acknowledgement never arrives because the broker won't sent any more messages).
Client2 is also stuck waiting for an acknowledgement to a synchronous send.
My perception is that it appears the broker is throttling the connection
because the consumer is running slowly, but for some reason it gets into a
state where all message flow stops (even though the consumer is automatically
acknowledging messages, albeit slowly). Furthermore, if I kill Client1 the
broker doesn't recover (using a JMX console the connection remains visible).
The broker uses a vanilla configuration (i.e. no policies are set for the
topics in quedtion).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira