activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgreiner <jd...@hotmail.com>
Subject Unexpected Pending Messages Values
Date Fri, 08 Jun 2012 19:16:32 GMT
I've found several posts about this issue, but only a few answers, and I was
not able to resolve my problem with those answers.

I'm trying to understand why the pending message count on the ActiveMQ admin
page can have a positive value (approx 50,000 in our case) while it appears
the queue is empty.   No messages are passed to the consumers (which log at
start of processing a message), the dequeue count does not increase. 
Clicking on the queue in the admin page shows no messages.  If I kill the
consumer app and restart it, the Consumers value goes down to 1 and does not
increase to the allocated 10.  This is normal if there are no messages to
send to the consumer.    Everything appears as though there are no messages
being added or removed from queue and that the queue is empty -- except that
the Pending value on the admin page shows ~50,000.   

Earlier, I had used the Purge command while installing new producer/consumer
apps.  Immediately after this I started getting negative Pending values. 
After killing the producer/consumer apps again and restarting the broker,
the enqueued/dequeued counts were reset to zero and I no longer got negative
pending values, but I saw the above behavior.  (I may have had the same
behavior before -- I would not know.)

In addition to understanding what is happening, I then want to figure out
how to properly reset the whole system, and then learn if there is anything
we shoudl be doing in our code to prevent the above situation. 

The application has (for this test) one producer process that added approx
300,000 messages to the queue and then it was killed (after the enqueued
value stopped changing).   There was one consumer process that had 10
consumers reading from that queue. 

>From examining the code, all exceptions in the message handler should be
caught, logged and not re-thrown, and there are no explicit calls to
rollback(), so all messages should be ack'ed.  

The prefetch is set to 10.  


Environment: 
-CentOS 6.2
-Java 1.6.0_30
-ActiveMQ 5.6.0 
-Using persistent queues via spring
-Transactions enabled -- session-managed auto ack



--
View this message in context: http://activemq.2283324.n4.nabble.com/Unexpected-Pending-Messages-Values-tp4653116.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message