One Pending Message but Queue is empty - ActiveMQ 5.12.0

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

One Pending Message but Queue is empty - ActiveMQ 5.12.0

timguy
I have an issue that pending messages are shown but I can not browser them.


Active MQ shows pending messages for the queue but when I click it it's empty. Queue with pending message empty queue



- Further clients:
    - with hawtio - same behaviour
    - my java consumer
        - does not consume anything
        - after restart, continued to consume

We persist our messages not in default kaha db but in Oracle DB. I could see the pending messages in database in table ACTIVEMQ_MSGS.

After restart of activeMQ all clients worked as expected. In the administration console I could see the messages and the java consumer consumed the messages.

It seems there was once this issue and was solved with an update to ActiveMQ 5.7.0: http://stackoverflow.com/questions/13470017/activemq-one-pending-message-but-queue-is-empty

I checked the activeMQ logs but I didn't found errors or warnings. Producer for the messages was also not changed.

Any idea why I experience these issues?
Reply | Threaded
Open this post in threaded view
|

Re: One Pending Message but Queue is empty - ActiveMQ 5.12.0

bhuman
Hello,
This scenario mostly tell that your consumer consume the message but it didn't ack to the broker.You can regenerate this issue by Junit/Jmeter where you have large number of threads publishing message.

Try to print the MessageId in the logs and check the messageId is the same as activemq's console pending message. If yes it means consumer consumed the message but didn't ack. to broker and it lays always in pending stage even you restart the activemq.
Reply | Threaded
Open this post in threaded view
|

Re: One Pending Message but Queue is empty - ActiveMQ 5.12.0

timguy
Hello bhuman,

thanks. When I find the time I will try to retest the scenario and more focusing on the consumer not on the producer.
But what I don't understand: You wrote that this happens when consumer didn't ack to the broker so why would I need "large number of threads publishing messages"?

" it lays always in pending stage even you restart the activemq. " mhh this not the behavior I have. After restart I still see the same count for pending messaging AND now I can browse them in console or consume them with the client".

I will try to check my consumers transaction length.
Thanks