2 Replies Latest reply on Apr 17, 2015 8:39 AM by ajinkya bambal

    Messages stuck In Delivery

    Gabriel Popescu Newbie



      We are trying to develop an application in Java that uses JMS queues with HornetQ. We are using JBoss 7.1.1.

      I'll start by saying that i'm not the JBoss administrator, so most of the times i only use the graphical interface. I'm not sure how the messaging system is configured.

      We have 2 queues:

      -Queue1 where a producer sends the messages using SESSION_TRANSACTED. This is the queue from which consumers read messages using AUTO_ACKNOWLEDGE.

      -Queue2 which is the reply queue. Consumers send messsages to this queue using AUTO_ACKNOWLEDGE. This queue also has its consumers using AUTO_ACKNOWLEDGE.

      From time to time, we have messages that remain stuck in delivery mode.

      For example, at the moment Queue1 has Messages Added: 2662406, Messages in Queue:30  and In Delivery: 30. There is no consumer running. I tried restarting the consumers, sometimes it solves the problem but most of the times the messages remain stuck in delivery. The same with Queue2 (there we have 900 messages stuck in delivery).

      Why is this happening? How can we solve it? Is there any way to set a timeout for messages in delivery, so that they are removed from the In Delivery status after a while? We can't afford to lose messages.