ActiveMQ: One Pending Message but Queue is empty -

2019-08-26 01:48发布

问题:

I have the same issue as described here: ActiveMQ: One Pending Message but Queue is empty.

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

  • 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.

The mentioned exsiting issue was solved with an update to ActiveMQ 5.7.0. 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?

回答1:

Issue is solved now. I also asked in the active mq mailing list: http://activemq.2283324.n4.nabble.com/One-Pending-Message-but-Queue-is-empty-ActiveMQ-5-12-0-td4715720.html.

  • First of all we added this method call in our client:

    org.apache.camel.ConsumerTemplate.doneUoW(Exchange exchange)
    

    but it didn't solve the problem finally

  • Furthermore we had load problems in active mq which weren't visible (healthStatus was "good" and jvm values looked also fine).
    • We had too many queues in activeMQ used for logging the old messages.
    • After deletion of them everything works fine now.