4 Replies Latest reply on Nov 25, 2006 11:55 AM by MiriTheQuiet

    RedeliveryLimit not limiting

    Jim Hazen Expert

      I'm trying to use RedeliveryLimit in JBoss 3.2.5. The RedeliveryDelay works as expected, however my message is redelivered past my redeliverylimit. My DLQ does exist, but no messages get sent there. Any suggestions? Below is a header dump from listMessages(). As you can see count > limit.

      Any suggestions?

      Thanks,
      Jim

      [SpyTextMessage {
      Header {
      jmsDestination : QUEUE.HL7MessageQueue
      jmsDeliveryMode : 2
      jmsExpiration : 0
      jmsPriority : 4
      jmsMessageID : ID:13-10903026622481
      jmsTimeStamp : 1090302662248
      jmsCorrelationID: null
      jmsReplyTo : null
      jmsType : null
      jmsRedelivered : true
      jmsProperties : {Endpoint=https://devcia/axis/ICSEndPoint.jws, JMS_JBOSS_REDELIVERY_COUNT=5, JMS_JBOSS_REDELIVERY_LIMIT=1}
      jmsPropReadWrite: false
      msgReadOnly : true
      producerClientId: ID:13

        • 1. Re: RedeliveryLimit not limiting
          Adrian Brock Master

          The redelivery count is only processed by the MDB.

          • 2. Re: RedeliveryLimit not limiting
            Jim Hazen Expert

            I guess I can always perform a check at the application level. Any plans to refactor this logic into the main redelivery mechanism, so everyone can have access to this great feature?

            Thanks for the response,
            Jim

            • 3. Re: RedeliveryLimit not limiting
              MiriTheQuiet Newbie

               

              "CptnKirk" wrote:
              I'm trying to use RedeliveryLimit in JBoss 3.2.5. The RedeliveryDelay works as expected.......


              Hi, could you please tell me how you made the RedeliveryDelay working? I have a Jboss 3.2.7, standalone asynchronous client with CLIENT_ACKNOWLEDGE, RedeliveryDelay attr of my queue is set (10000). After calling session.recover() (...and not acknowledging the received message), the message is redelivered immediately.

              I have been looking through wiki and haven't found anything..some people just say its working, some (1, jboss 4) that its not...:)

              What I do wrong?
              Thx, Mirek

              • 4. Re: RedeliveryLimit not limiting
                MiriTheQuiet Newbie

                 

                "miri" wrote:
                "CptnKirk" wrote:
                I'm trying to use RedeliveryLimit in JBoss 3.2.5. The RedeliveryDelay works as expected.......


                Hi, could you please tell me how you made the RedeliveryDelay working? I have a Jboss 3.2.7, standalone asynchronous client with CLIENT_ACKNOWLEDGE, RedeliveryDelay attr of my queue is set (10000). After calling session.recover() (...and not acknowledging the received message), the message is redelivered immediately.


                ...propably some code would help:

                Client with CLIENT_ACKNOWLEDGE mode
                public void onMessage(Message msg) {
                 //call some logic
                 try {
                 doSomething();
                 } catch (Exception e){
                 //error occured, I want the message to be redelivered after some time...
                 session.recover();
                 //..and exit the onMessage
                 return;
                 }
                }
                

                Queue si configured as follows:
                 <mbean code="org.jboss.mq.server.jmx.Queue"
                 name="jboss.mq.destination:service=Queue,name=queue">
                 <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
                 <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
                 <attribute name="RedeliveryDelay">10000</attribute>
                 </mbean>


                ...also i tried to set the JMS_JBOSS_REDELIVERY_DELAY = 10000.
                ((SpyMessage)msg).setLongProperty(SpyMessage.PROPERTY_REDELIVERY_DELAY,10000);
                

                I can see in logs then that the property is set in the message correctly BUT the message is redelivered immediately again :(

                Any suggestions? Thx much.
                Mirek