4 Replies Latest reply on Mar 14, 2008 1:42 PM by Fabio R

    FailOver on componentes

    Fabio R Newbie

      Hi,

       

      How I can do failover when messages are processing in a JBI component?

      If the JVM finalize when a message is processing in the XSL component for exemple.

      How I can configure the ESB to restart the process on the point it stops?

      Is JCAFlow the solution for this? I tried if JMS, but it makes failover only on the exchanges.

       

      Thank´s,

      Fabio

        • 1. Re: FailOver on componentes
          Guillaume Nodet Newbie

          I think the best way to achieve recovery in JBI is to use a JMS endpoint in your flow. 

          The way to achieve that is to put a JMS provider and a JMS consumer between your components.   The JMS consumer need to be transacted so that if anything bad occur in the second component, it will be able to rollback the transaction and the message will be redelivered later.

           

          <jms:provider 
              service="my:qos"
              endpoint="provider"
              destinationName="my.queue"
              connectionFactory="#connectionFactory" />
          
          <jms:consumer 
              service="my:qos" 
              endpoint="consumer" 
              destinationName="my.queue" 
              connectionFactory="#connectionFactory" 
              concurrentConsumers="8" 
              transacted="xa"></jms:consumer> 
          

           

          • 2. Re: FailOver on componentes
            Fabio R Newbie

            Ok, but in my configuration I can have a lot of components (more than 100) and using this way I can have overhead on execution.

            What I would like to do is configuring transactions as depicted at:

             

             

            I did the same configuration I found in:

            http://open.iona.com/docs/esb/3.3/deploy_guide/DeployESBFlowsJCA.html#DeployESBFlowsJCAExample

             

            But I continue to lose messages on the component. I think that have another place where I need to configure anything else.

            Do you know how I can do this? Or where I can find a sample configuration?

             

            Thank's

            Fabio

            • 3. Re: FailOver on componentes
              Guillaume Nodet Newbie

              Ok, but in my configuration I can have a lot of components (more than 100) and using this way I can have overhead on execution.

               

              You need to understand that using the JCA flow will add much more overhead that what I briefly explained.  The only downside of using explicit JMS endpoints instead of the JCA flow is that is has to be done explicitely.

               

              What I would like to do is configuring transactions as depicted at:

               

              I did the same configuration I found in:

              http://open.iona.com/docs/esb/3.3/deploy_guide/DeployESBFlowsJCA.html#DeployESBFlowsJCAExample

               

              Such mechanism will provide you the desired QoS but at a much higher overhead: if you use an InOut exchange, the JBI exchange will be persisted 3 times between each component.  So if you have three components involved, it makes 6 JMS messages persisted.

               

              On the other side, if you use a single transaction with a synchronous JMS consumer (which is depicted on the following picture, the message will only be persisted once, independant of the number of components involved.

               

              But I continue to lose messages on the component. I think that have another place where I need to configure anything else.

              Do you know how I can do this? Or where I can find a sample configuration?

               

              Did you set the persistent="true" flag on the JBI container ? You can change that in the conf/servicemix.xml, on the <jbi:container/> element.

              • 4. Re: FailOver on componentes
                Fabio R Newbie

                You're right, I forgot to put persistent="true". Now it´s working fine. I did with JCAFlow because is more easy to change it now.

                 

                Thank you.