6 Replies Latest reply on May 31, 2011 2:33 PM by Clebert Suconic

    Messages getting left on a queue

    Paul Meekin Newbie

      Hi all,


      Brand new to HornetQ and in the middle of a proof of concept using 2.2.2-Final on RedHat 64 bit but I'm encountering an odd problem.


      I pre-load a queue with 20000 messages of size 1000 bytes (that's the message payload) and then run a consumer to simply get the messages in a loop. If I use receiveNoWait() the consumer gets the first 4238 messages and then ends with no message available. I have to then run the program repeatedly for it to eventually empty the queue with each invocation returning a (random?) number of messages before ending again with no message.


      However, if I specify receive() with a Wait time of approx 35 millisecs or longer, the consumer will read all messages from the queue in a single execution.


      The queue is set to page and my Producer is completing with no issues. No other program is reading the queue and the program is not throwing an exception.


      So it looks like the consumer is completing the receive() call even if messages are still available.


      Has anyone else seen this and is there a configuration option I've missed?