camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mnl <mnlgoya...@gmail.com>
Subject Using apache camel failover loadbalancer
Date Thu, 03 Mar 2016 06:44:01 GMT
I am new to camel and trying to use failover loadbalancer. I have list of
endpoints (say, A, B, C) which can be used to send message such that if one
fails the endpoint next in the list can be tried. lets say B was success.
After successful send, B will receive an exchange which can be used to know
the status of the message sent earlier.
I have tried various versions for loadbalancer as:

Case-1

from(fromEndpoint)
.errorHandler(defaultErrorHandler)
.loadbalance().failover()
.to(smppEndpointList)
.process(getSendProcessor);

> This fails to use the processor returned by the getSendProcessor() and
> overall the flow fails.

Now I change the above version to this.

Case-2 

from(fromEndpoint)
.errorHandler(defaultErrorHandler)
.to(smppEndpointList)
.process(getSendProcessor)
.loadbalance().failover();

> Here if the smppEndpointList has only one endpoint then the call is
> successful but in case of multiple endpints in the list it fails. Also
> from further debugging I found that the processor returned by
> getSendProcessor is not used over here

Case-3

from(fromEndpoint)
.errorHandler(defaultErrorHandler)
.process(getSendProcessor)
.loadbalance().failover()
.to(smppEndpointList);

> This also fails as the processor returned by getSendProcessor is not used.

Can some one please suggest the correct implementation. I am stuck over this
for long.
Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/Using-apache-camel-failover-loadbalancer-tp5778537.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message