2 Replies Latest reply on Apr 18, 2007 8:28 AM by weston.price

    Msg expiration doesn't work with a msg listener on a session

    wolfc

      The JCA uses session.setMessageListener which creates a SpyMessageConsumer with sessionConsumer = true.
      Messages are received and added to the SpyMessageConsumer (addMessage).
      If it's a sessionConsumer do special logic (excluding expiration) else put it on queue and receive() does expiration logic.

      I've create a unit test in org.jboss.test.jbossmq.test.JBAS4328TestCase. Can I re-open the issue?

      Either it's a bug in JBossMQ or a semantic error in use of JBossMQ. I still vote for the former, because when the message leaves MQ it has an inproper invariant (message expired (with more than ~100ms)).

        • 1. Re: Msg expiration doesn't work with a msg listener on a ses

          You have not been listening to a word I've been saying.

           // block consuming for 5 seconds
           Thread.sleep(5000);
           processed++;
          


          If you do this, it is a not a problem for the JMS Server.

          The JMS Server has given you a message when it wasn't expired.
          It is your fault that you did not process it until after it expired.

          • 2. Re: Msg expiration doesn't work with a msg listener on a ses
            weston.price

            Actually, Carlo and I had a discussion about this yesterday and I believe the issue is clearer. This post is 'outdated' at this point.

            Ideally the question is do we want to take action when a message has expired en route. As you pointed out in the JIRA we could simply add this as an interceptor as a QOS feature. Similarly, the adatper could do this as well but I am more inclinded to have it outside of the JCA stuff. It really is an interceptor type task.