You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by raymond <rd...@domingo.nl> on 2010/06/21 17:26:51 UTC

error handling during failover

Hello,

I have a simple route using failover:

        <route>
            <from
               
uri="cxf://http://localhost:8181/echoServer/echo?wsdlURL=/etc/bus-connector/echo.wsdl&amp;serviceName={http://www.telecats.nl/nl.tc.rd.exp.echoService}EchoService&amp;portName={http://www.telecats.nl/nl.tc.rd.exp.echoService}EchoServiceImplPort&amp;dataFormat=MESSAGE"
/>

            <loadBalance>
                <failover>
                    <exception>java.lang.Throwable</exception>
                </failover>
                <to
                   
uri="cxf://http://localhost:8182/echoServer/echo?wsdlURL=file:/etc/bus-connector/echo.wsdl&amp;serviceName={http://www.telecats.nl/nl.tc.rd.exp.echoService}EchoService&amp;portName={http://www.telecats.nl/nl.tc.rd.exp.echoService}EchoServiceImplPort&amp;dataFormat=MESSAGE"
/>
                <to
                   
uri="cxf://http://localhost:8183/echoServer/echo?wsdlURL=file:/etc/bus-connector/echo.wsdl&amp;serviceName={http://www.telecats.nl/nl.tc.rd.exp.echoService}EchoService&amp;portName={http://www.telecats.nl/nl.tc.rd.exp.echoService}EchoServiceImplPort&amp;dataFormat=MESSAGE"
/>
            </loadBalance>
        </route>

When failover kicks in because my first endpoint (TO) is down:
1 - I would like to receive an email when my system uses the failover
2 - I shouldn't be spammed everytime it fails over, just furst time would be
nice
3 - If also my second endpoints (at 8183) fails, I would like to send a
different message.

I have looked in to onException and doTry but some guidence would be verry
helpfull.
What is the way to go when I would like to implement this in my
camelContext.xml (spring) file ?

have fun,
Raymond Domingo
Telecats
-- 
View this message in context: http://camel.465427.n5.nabble.com/error-handling-during-failover-tp510440p510440.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: error handling during failover

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Sometimes its easier just to implement a custom Processor or Bean and
then do the failover in there. Then you can handle the situations to
send different emails whatever happened.



On Mon, Jun 21, 2010 at 5:26 PM, raymond <rd...@domingo.nl> wrote:
>
> Hello,
>
> I have a simple route using failover:
>
>        <route>
>            <from
>
> uri="cxf://http://localhost:8181/echoServer/echo?wsdlURL=/etc/bus-connector/echo.wsdl&amp;serviceName={http://www.telecats.nl/nl.tc.rd.exp.echoService}EchoService&amp;portName={http://www.telecats.nl/nl.tc.rd.exp.echoService}EchoServiceImplPort&amp;dataFormat=MESSAGE"
> />
>
>            <loadBalance>
>                <failover>
>                    <exception>java.lang.Throwable</exception>
>                </failover>
>                <to
>
> uri="cxf://http://localhost:8182/echoServer/echo?wsdlURL=file:/etc/bus-connector/echo.wsdl&amp;serviceName={http://www.telecats.nl/nl.tc.rd.exp.echoService}EchoService&amp;portName={http://www.telecats.nl/nl.tc.rd.exp.echoService}EchoServiceImplPort&amp;dataFormat=MESSAGE"
> />
>                <to
>
> uri="cxf://http://localhost:8183/echoServer/echo?wsdlURL=file:/etc/bus-connector/echo.wsdl&amp;serviceName={http://www.telecats.nl/nl.tc.rd.exp.echoService}EchoService&amp;portName={http://www.telecats.nl/nl.tc.rd.exp.echoService}EchoServiceImplPort&amp;dataFormat=MESSAGE"
> />
>            </loadBalance>
>        </route>
>
> When failover kicks in because my first endpoint (TO) is down:
> 1 - I would like to receive an email when my system uses the failover
> 2 - I shouldn't be spammed everytime it fails over, just furst time would be
> nice
> 3 - If also my second endpoints (at 8183) fails, I would like to send a
> different message.
>
> I have looked in to onException and doTry but some guidence would be verry
> helpfull.
> What is the way to go when I would like to implement this in my
> camelContext.xml (spring) file ?
>
> have fun,
> Raymond Domingo
> Telecats
> --
> View this message in context: http://camel.465427.n5.nabble.com/error-handling-during-failover-tp510440p510440.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus