2 Replies Latest reply on Jul 31, 2007 3:39 AM by Aslak Knutsen

    DL(Q) Reason

    Aslak Knutsen Master

      I've got a MDB listening on the DLQ for handling the dead messages.
      But I can't find any info on the message beyond the original id and original destination.

      I guess I'm looking for the 'DL Reason', ie:
      - Exception from the container/MDB if any (might be multiple if redelivered)
      - Controlled rollback

      Am I missing something, or is this a feature request?

      -aslak-


        • 1. Re: DL(Q) Reason
          Elias Ross Master


          The DLQ support for MDB really is handled by the EJB container, and is not part of JBoss Messaging itself. There are several pluggable DLQ strategies, see:

          http://docs.jboss.org/jbossas/javadoc/4.0.3SP1/connector/org/jboss/resource/adapter/jms/inflow/dlq/package-summary.html

          It does seem that there is no way to look at the exception/cause of redelivery.

          For MDB, you're actually not supposed to throw exceptions from onMessage(). So, by design you would never know the "cause." If you want to get fancy, track your failures some other way...

          • 2. Re: DL(Q) Reason
            Aslak Knutsen Master

            This might be the wrong forum but..

            I've had a look at the jboss 4.2.0 code and as far as I can see the DLQ handler never receives the exception,
            it only receives the Message again and has to figure out if it should be dlq'ed or not..

            I haven't had a chance to look at Messaging 1.4.0.CR1 source yet, but the release notes says it has fixed a redelivery delay issue.
            http://jira.jboss.com/jira/browse/JBMESSAGING-1005
            It doesn't say how, but maybe there is something in the fix that might help..


            "genman" wrote:

            For MDB, you're actually not supposed to throw exceptions from onMessage(). So, by design you would never know the "cause."


            A MDB is not designed to throw a Application exception, but it is certainly designed to throw a System exception (as any other method).
            When using Container managed MDBs, one of the ways to performing a rollback is actually to throw a System exception.