2 Replies Latest reply on Oct 19, 2004 11:35 AM by damo9f

    What happens past "TimeToLive"

    Greg McCreath Newbie

      Hi all, what happens in the Jboss JMS implementation when a message remains in a destination past its Time to live setting. Is it DLQ'd?

      If not is there an appropriate JMS pattern to handle .. err ... handling timed-out messages (my search begins ...)

      G.

        • 1. Re: What happens past "TimeToLive"
          Elias Ross Master


          The message is quietly dropped.

          I was thinking of adding an expiration handler to JBoss, but decided against it, because it is a hard feature to get right. And it didn't really add any benefit to my application. What I do is set an application message property (e.g. "APP_MESSAGE_EXPIRY") and test this in my MDB onMessage method.

          Even if JBoss did something like what Weblogic does to expired JMS messages (log, redirect to a new queue, drop), I don't think any of those features would be much of an improvement over what I did.

          If you decide to add such a feature, do note that there are many places a message can expire. A message can expire on the client side as well as the server, especially if it is rolled back. I've been praying somebody would clean up the Session code so I could better approach the coe.

          • 2. How to tell if the message expired, and plug for logging it
            damo9f Newbie


            If you think this is why your messages are not getting through, you can see the expiration occur at trace level (at least in 3.2.5).

            add:
            < category name="org.jboss.mq">
            < priority value="TRACE" class="org.jboss.logging.XLevel"/>
            < /category>

            (also remove any INFO or other filter on the appender you want to see this in)

            BTW, Logging would be nice, rather than silent failure. Especially since we have seen odd expiration due to clocks being different on the client and server machines, which has got to be pretty common.