You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "S. Ali Tokmen" <sa...@bull.net> on 2008/12/03 10:34:21 UTC

Alternative routes

Hello

I would like to define the following architecture:

    * I have two Web services: one master and one fallback
    * The master Web service is the one that needs to be called
    * If the master is down, CAMEL should call the fallback

How do I define this? I've found about 
http://activemq.apache.org/camel/load-balancer.html but that balances 
load (instead of using the fallback only in emergencies).

Thanks

-- 

S. Ali Tokmen
savas-ali.tokmen@bull.net

Office: +33 4 76 29 76 19
GSM:    +33 66 43 00 555

Bull, Architect of an Open World TM
http://www.bull.com



Re: Alternative routes

Posted by James Strachan <ja...@gmail.com>.
2008/12/3 Claus Ibsen <cl...@gmail.com>:
> Hi
>
> Interesting use-case. Kinda like a failover transport for endpoints.
>
> I think you could impl. it with the loadbalancer, extending
> QueueLoadBalancer and override the process method where you will do
> - try .. catch exception
> - exchange.isFailed() (* might needed)
> to determine if there was an error with the exchange and then find the
> fallback processor and let it try it.
>
> I actually think this might be a good loadbalancer to have in
> camel-core. We just need to work on the configuration so you can set
> the designated target, and the failover. And maybe you have multiple
> failovers.
>
> Any thoughts from others?

Agreed - we should add some kind of FailoverLoadBalancer which could
filter errors/exceptions to determine if it should fail over to
another endpoint. (Not all errors/exceptions would be down to a WS
being down - it could be application errors and so forth).

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Re: Alternative routes

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

Created ticket to track this new feature:
https://issues.apache.org/activemq/browse/CAMEL-1142

/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/



On Wed, Dec 3, 2008 at 11:12 AM, James Strachan
<ja...@gmail.com> wrote:
> 2008/12/3 S. Ali Tokmen <sa...@bull.net>:
>> Hello
>>
>> Claus Ibsen a écrit :
>>>
>>> Hi
>>>
>>> Interesting use-case. Kinda like a failover transport for endpoints.
>>>
>>
>> Ah... And interesting we didn't have it yet :) I'm wondering if it's part of
>> EIP.
>>>
>>> I actually think this might be a good loadbalancer to have in
>>> camel-core. We just need to work on the configuration so you can set
>>> the designated target, and the failover. And maybe you have multiple
>>> failovers.
>>>
>>
>> Yes, multiple failovers is definitely a must. If I understand correctly, the
>> current loadbalancer will just fail when the selected route fails, am I
>> right?
>
> The current LoadBalancer implementations just pick and endpoint to
> load to; what we need is another implementation that essentially adds
> a custom ErrorHandler to force a redelivery to another endpoint on
> certain failures
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://fusesource.com/
>

Re: Alternative routes

Posted by James Strachan <ja...@gmail.com>.
2008/12/3 S. Ali Tokmen <sa...@bull.net>:
> Hello
>
> Claus Ibsen a écrit :
>>
>> Hi
>>
>> Interesting use-case. Kinda like a failover transport for endpoints.
>>
>
> Ah... And interesting we didn't have it yet :) I'm wondering if it's part of
> EIP.
>>
>> I actually think this might be a good loadbalancer to have in
>> camel-core. We just need to work on the configuration so you can set
>> the designated target, and the failover. And maybe you have multiple
>> failovers.
>>
>
> Yes, multiple failovers is definitely a must. If I understand correctly, the
> current loadbalancer will just fail when the selected route fails, am I
> right?

The current LoadBalancer implementations just pick and endpoint to
load to; what we need is another implementation that essentially adds
a custom ErrorHandler to force a redelivery to another endpoint on
certain failures

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Re: Alternative routes

Posted by Claus Ibsen <cl...@gmail.com>.
/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/



On Wed, Dec 3, 2008 at 11:08 AM, S. Ali Tokmen
<sa...@bull.net> wrote:
> Hello
>
> Claus Ibsen a écrit :
>>
>> Hi
>>
>> Interesting use-case. Kinda like a failover transport for endpoints.
>>
>
> Ah... And interesting we didn't have it yet :) I'm wondering if it's part of
> EIP.
Yeah there must be a pattern for this.

>>
>> I actually think this might be a good loadbalancer to have in
>> camel-core. We just need to work on the configuration so you can set
>> the designated target, and the failover. And maybe you have multiple
>> failovers.
>>
>
> Yes, multiple failovers is definitely a must. If I understand correctly, the
> current loadbalancer will just fail when the selected route fails, am I
> right?
There is no failover in the current loadbalancers, they are just
selecting which endpoint(s) to send to.



>
> Cheers
>
> S. Ali Tokmen
> savas-ali.tokmen@bull.net
>
> Office: +33 4 76 29 76 19
> GSM:    +33 66 43 00 555
>
> Bull, Architect of an Open World TM
> http://www.bull.com
>
>
>

Re: Alternative routes

Posted by "S. Ali Tokmen" <sa...@bull.net>.
Hello

Claus Ibsen a écrit :
> Hi
>
> Interesting use-case. Kinda like a failover transport for endpoints.
>   
Ah... And interesting we didn't have it yet :) I'm wondering if it's 
part of EIP.
> I actually think this might be a good loadbalancer to have in
> camel-core. We just need to work on the configuration so you can set
> the designated target, and the failover. And maybe you have multiple
> failovers.
>   
Yes, multiple failovers is definitely a must. If I understand correctly, 
the current loadbalancer will just fail when the selected route fails, 
am I right?

Cheers

S. Ali Tokmen
savas-ali.tokmen@bull.net

Office: +33 4 76 29 76 19
GSM:    +33 66 43 00 555

Bull, Architect of an Open World TM
http://www.bull.com



Re: Alternative routes

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

Interesting use-case. Kinda like a failover transport for endpoints.

I think you could impl. it with the loadbalancer, extending
QueueLoadBalancer and override the process method where you will do
- try .. catch exception
- exchange.isFailed() (* might needed)
to determine if there was an error with the exchange and then find the
fallback processor and let it try it.

I actually think this might be a good loadbalancer to have in
camel-core. We just need to work on the configuration so you can set
the designated target, and the failover. And maybe you have multiple
failovers.

Any thoughts from others?



/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/



On Wed, Dec 3, 2008 at 10:34 AM, S. Ali Tokmen
<sa...@bull.net> wrote:
> Hello
>
> I would like to define the following architecture:
>
>   * I have two Web services: one master and one fallback
>   * The master Web service is the one that needs to be called
>   * If the master is down, CAMEL should call the fallback
>
> How do I define this? I've found about
> http://activemq.apache.org/camel/load-balancer.html but that balances load
> (instead of using the fallback only in emergencies).
>
> Thanks
>
> --
>
> S. Ali Tokmen
> savas-ali.tokmen@bull.net
>
> Office: +33 4 76 29 76 19
> GSM:    +33 66 43 00 555
>
> Bull, Architect of an Open World TM
> http://www.bull.com
>
>
>