9 Replies Latest reply on Oct 25, 2002 10:47 PM by Adrian Brock

    Message acknowledgement and durable subscription

    Bernd Koecke Novice

      Hi,

      I'm using JBoss 3.2 on Linux, Sun JDK 1.3.1_03. I have a problem with a durable topic subscriber. I would like to use the Session.CLIENT_ACKNOWLEDGE mode for the subscriber. So when the subscriber dies while he processes the message he will get this message again after a restart.

      In my testcase I set the acknowledge mode of the durable topic subscriber session to Session.CLIENT_ACKNOWLEDGE and never acknowledge any message. Then I shutdown the receiving client. After resubscribing the receiver I expected that it gets all the messages again. But it doesn't happen. It only works when I call 'recover' on the session without a shutdown of the receiver. But than it isn't a protection against an Exception, shutdown, etc.

      When I use a transacted session it works with the 'commit' method of the session. But I need the session in the message listener to invoke 'commit' or 'rollback'.

      The jms-apidocs say only that the receiver _may_ get the message again and not _must_.

      Do I have to use a transacted session or is it a bug in the implementation? If its a bug I could look into the code and try to find the position.

      Thanks

      Bernd