3 Replies Latest reply on Oct 7, 2010 1:18 AM by jaikiran pai

    MDB Retry

    Kevin Galligan Newbie

      I've spent a surprising amount of time looking around and tried several things, but can't seem to nail this down.


      How do I prevent JBoss from trying to run my JMS/MDB request more than once?  I'm running 4.2.


      I've found several sites that talk about different settings, but I can't seem to find the clear answer.  The last thing I tried recently is...


      msg.setLongProperty("JMS_JBOSS_REDELIVERY_LIMIT", 1);


      It still just keeps trying after a failure.


      Ideally it could be done in code before sending a message, as there are certain messages that are far more critical than others to restrict, but however it would be done is fine.


      Thanks in advance,


        • 1. Re: MDB Retry
          Wolf-Dieter Fink Master

          If you don't want a redelivery in general you can configure the retry for DLQ (DeadLetterQueue), default is 10.

          I set the message selector with a check for redelivery counter (don't know the exactp property ATM).

          In this case I deploy a seccond MDB to handle the redilivered messages.

          • 2. Re: MDB Retry
            Kevin Galligan Newbie

            Yeah, so is there a place that says "Here are the settings for MDB, this is for JMS", etc?  It seems like there are multiple places where these values can be configured, and I only see they have worked/failed at the worst time (in production).  It also seems like this configuration varies between versions, and the web has a wonderful memory of these different configs.


            I have been trying this for a while.  As someone who does occasionally produce open source software, I get annoyed when people complain about open source docs, but, you know.  Its surprisingly opaque on this issue.  I'd think "just do it once" would be pretty simple.

            • 3. Re: MDB Retry
              jaikiran pai Master

              Since each version of JBoss AS ships a different JMS provider, these properties keep changing.


              You are using JBoss AS 4.x,  so this might help http://docs.jboss.org/ejb3/docs/tutorial/mdb/mdb.html (check the  dLQMaxResent activation config property).