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

泪湿孤枕 提交于 2019-12-13 07:40:49

问题


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.


来源:https://stackoverflow.com/questions/38435610/activemq-one-pending-message-but-queue-is-empty-activemq-5-12-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!