camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bob_sheknowdas <bob....@googlemail.com>
Subject Load Balancing Fluent Builders vs Spring
Date Mon, 16 Jan 2017 20:17:49 GMT
Hi,

im trying to set up a load balancer using Apache Camel.

Everything works fine, if I use the spring configuration:

    <route id="route2">
      <from uri="servlet:///api2/data/?matchOnUriPrefix=true"/>
	  <loadBalance>
		<failover roundRobin="true" maximumFailoverAttempts="3"/>
		<to
uri="http://localhost:8080/api2/data/?bridgeEndpoint=true&amp;throwExceptionOnFailure=false"/>
	  </loadBalance>
    </route>

But if I try to use the RouteBuilder class i get Errors:

   
from("servlet:///api2/data/?matchOnUriPrefix=true").loadBalance().failover(3,
false, true)
       
.to("http://localhost:8080/api2/data/?bridgeEndpoint=true&amp;throwExceptionOnFailure=false");

The Error is an Http 500, so not really specific.
Has anyone an Idea, why that is?


Possible workaround:
I wanted to use the RouteBuilder class since I want to read in possible
target servers from a properties file. If anyone knows a way to do that via
spring I would be most happy to learn from you : )



--
View this message in context: http://camel.465427.n5.nabble.com/Load-Balancing-Fluent-Builders-vs-Spring-tp5792636.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message