3 Replies Latest reply on Apr 11, 2002 2:38 AM by Peter Antman

    Dropping Messages until server restart

    Jonathan Tew Newbie

      I've been testing out the JbossMQ code base from CVS as of about a week ago and have encountered the following scenario.

      I've written a JMS client that is listening to a queue. The session is trasacted with AUTO_ACKNOWLEDGEMENT set. When I receive a message if I call session.rollback() the message is redelivered again as I would expect. If I call session.commit() the message is removed from the queue as I would expect. The problem arises when the JVM die or is killed before commit() or rollback() is called. The queue shows a depth of zero and the message is not redelivered. I can tell the message is still in the queue because the file associated with it is still on the disk. When I restart the server then queue depth will read 1 and the message will get delivered to the client.

      It would seem to me that JBossMQ should detect that the client died without committing the transaction and return the message to the queue immediately for another JMS client to handle. Am I missing something in this picture?

      Thanks,
      Jonathan