7 Replies Latest reply on Nov 6, 2008 10:23 AM by beve

    Automatic retry mechanism

    stlecho

      Hi,

      In the application we are developing, we are contacting external Webservices.

      When these Webservices are - for some reason - not available, we would like to automatically retry to contact the Webservice after a pre-defined number of minutes. When the Webservice is at that point in time available, the call will succeed. If the Webservice is still not available, a second retry should be issued. This retry mechanism will stop when a pre-defined maximum number of retries is attained.

      In another non-ESB based application we have build, we've implemented this automatic retry mechanism with a JMS-based approach.
      This application sends XML Messages to a Queue, a Message-Driven Bean picks the message up and tries immediately to contact the external webservice. If this call fails, specific meta-data - linked to the automatic retry mechanism - are added to the original XML message and this message is injected again in the Queue.

      Is this type of functionality - out-of-the-box or by custom-build extension - supported by JBossESB ?

      Regards, Stefan Lecho.

        • 1. Re: Automatic retry mechanism
          marklittle

          I would expect the RDLVQ capability to kick-in here, but haven't checked the WS integration code. Maybe TomF can comment?

          • 2. Re: Automatic retry mechanism
            tfennelly

            At present it just fails the pipeline (fairly sure of that) and I don't think the pipeline processor sends the failed message to the RDLVQ??

            AFAIK, the RDLVQ capability we have only applies to message aware deliveries via the ServiceInvoker. Kurt?

            • 3. Re: Automatic retry mechanism
              kconner

              This is correct, the pipeline handles an error by sending a fault to the caller or by storing the message in the DeadLetterService. The caller can then choose to resend if appropriate.

              Only the service invoker handles retransmission.

              • 4. Re: Automatic retry mechanism
                sm0k3rz

                Hi,
                two years have passed from this post and I would like to know if the retry mechanism has been implemented.
                In Our application we need a client web service that when it was posted try n times until back on the web sevices server.
                Because is it important consecutio tempore in our application.

                Regard.

                Davide.

                • 5. Re: Automatic retry mechanism
                  beve

                  Hi,

                  not sure if you have seen the jms_transacted quickstart?
                  I think that this might work for you as I think it would have worked for the original post in this thread, had it been available.

                  Regards,

                  /Daniel

                  • 6. Re: Automatic retry mechanism
                    sm0k3rz

                    Thanks for the answer.
                    Is there a way you can postpone infinite number of times the message, at least until the error, typically an I / O network, is resolved?

                    • 7. Re: Automatic retry mechanism
                      beve

                       

                      Is there a way you can postpone infinite number of times the message, at least until the error, typically an I / O network, is resolved?

                      I'm not sure, but you can set MaxDeliveryAttempts in jbm-queue-service.xml to a large number. Setting it to -1 will cause this value to be taken from the DefaultMaxDeliveryAttempts specified in messaging-service.xml.
                      It is not clear to me if you can specify a value of -1 for this. If that is possible then it should retry forever.

                      For more information about the configuration options for JBoss Messaging take a look at thier user guide:
                      http://www.jboss.org/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.4.0.SP3/html/index.html

                      Regards,

                      /Daniel