git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stale connection hanging at broker during consumer crash


Stale connection hanging at broker during consumer crash :

Step1 :
When a consumer is getting attached with ActiveMQ broker, the consumer count
is getting increased with one , which is verified through “dstat” command .
Also the “netstat” from client machine shows one connection establishment
with broker. 

Netstat:
tcp        0      0     x.x.x.x:61617         x.x.x.x:44332        
ESTABLISHED 18625/java

dstat value is:
Name                                                               Queue
Size  Producer #  Consumer #   Enqueue #   Dequeue #   Forward #    Memory %
consumer.xyz.virtualTopic.abc.productUpdateNotificationEvent.1_0           8      
0        1            10          2            0            0


Step2 :
Kill the client connection and no such connection in netstat from client
machine. But still the connection hanging with broker and dstat showing the
same result as before. 

Netstat:
-NA-

dstat value is:
Name                                                                 Queue
Size  Producer #  Consumer #   Enqueue #   Dequeue #   Forward #    Memory %
consumer.xyz.virtualTopic.abc.productUpdateNotificationEvent.1_0           8          
0          1            10        2          0            0

Step 3: 
Few of the message (multiples of 1000) not getting de-queue even after the
new client getting connected. So the number of messages and number of
consumers is getting increased on every attempt of client termination. When
we try to change the "prefetchPolicy.queuePrefetch" property on consumer
side, its reflecting so the number of messages are hanging (as configured in
property . Eg. If we set value as "prefetchPolicy.queuePrefetch=10", then 10
messages are hanging on the queue)

Step 4 : 
After re-starting the broker , all the pending messages are getting
de-queued, Where one client is up and running .

Please suggest how to solve this problem. 




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html