2 Replies Latest reply on Jan 9, 2007 4:08 AM by Tim Fox

    JBossMQ delayed redelivery implementation

    Tim Fox Master

      I am looking at porting this to JBM. This seems fairly straightforward, however I have a question regarding the JBoss MQ implementation.

      AFAICT when internalAddMessage() is called on BasicQueue and the scheduledDelivery attribute is set and in the future then a timeout will be added to actually add the message at a future time.

      This will be called when a message is NACKed, which occurs under different situations, in particular when a tx is rolled back.

      Looking at the implementation of session.recover() I can see that it always try to redeliver to local consumers first - in which case a redelivery delay *will not* occur.

      Is this desired behaviour? I would have thought we want a redelivery delay for transaction rollback *and* session recovery, not just transaction rollback.


        • 1. Re: JBossMQ delayed redelivery implementation
          Elias Ross Master

          I came up with this feature. It is an oversight. The feature I did not need to have work with session recovery, just with transactions.

          • 2. Re: JBossMQ delayed redelivery implementation
            Tim Fox Master

            Hmm, ok.

            But even with transaction rollback, local tx rollback just causes session recovery anyway, so the same applies.

            The only time the messages would get nacked back to the queue would be if the orginal local consumer that originally got the message had closed, otherwise it is just recovered directly to the local consumers.

            (JMS1.1 4.4.7).
            * "If a transaction rollback is done, its produced messages are destroyed and its consumed
            * messages are automatically recovered. For more information on session recovery, see Section
            * 4.4.11 'Message Acknowledgment.'"