3 Replies Latest reply on Sep 25, 2007 8:26 AM by noxis

    DefaultMaxDeliveryAttempts doesn't work (JBM 1.4.0.CR2)

    noxis

      Hello.

      DefaultMaxDeliveryAttempts is set to 10 by default.

      Let's test:

      MDB:

      public void onMessage(Message msg) {
       try {
       System.out.println("test");
       mdc.setRollbackOnly();
       } catch (Throwable te) {
       te.printStackTrace();
       mdc.setRollbackOnly();
       }
      }
      



      MyQueue:
      <?xml version="1.0" encoding="UTF-8"?>
      <server>
       <mbean code="org.jboss.jms.server.destination.QueueService" name="jboss.messaging.destination:service=Queue,name=testAttempts" xmbean-dd="xmdesc/Queue-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <depends>jboss.messaging:service=PostOffice</depends>
       <attribute name="RedeliveryDelay">5000</attribute>
       </mbean>
      </server>
      


      Ok, works great - 10 attempts.

      Let's change RedeliveryDelay to 10000. And... only 9 attempts! With RedeliveryDelay = 20000, 5 attempts.

      Is this ok?

      Tested with JBM 1.4.0.CR2, JBAS 4.2.1.GA.