You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by imranrazakhan <im...@gmail.com> on 2014/10/21 09:55:58 UTC
LoadBalance for pollenrich
Hi,
I have following route and i want to apply loadbalance with failover for
pollenrich in route
from("jpa:com.test.VasRequest?consumeDelete=false&consumer.delay=20000&consumer.namedQuery=selectLoanRequests&persistenceUnit=VasServicePU")
.choice()
.when(simple("${body.VasRequest.getMessage}=='Y'"))
.loadBalance().failover()
.pollEnrich("jpa:VasRequest?consumer.namedQuery=verifyRequests&persistenceUnit=VasServicePU1")
.otherwise()
.to("direct:verifyOffer")
.endChoice()
.to("jpa:com.test.VasResponse?persistenceUnit=VasServicePU")
.end();
Now if i couldnt get response from pollEnrich, i would like to query on
other jpa endpoint, but pollenrich is showing error if i provide other
endpoint by comma separation.
Regards
--
View this message in context: http://camel.465427.n5.nabble.com/LoadBalance-for-pollenrich-tp5757837.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: LoadBalance for pollenrich
Posted by imranrazakhan <im...@gmail.com>.
Hi,
I want to implement something like below, How direct support this, i want to
query second JPA if first database dont respond.
.loadBalance().failover().
pollEnrich("jpa:VasRequest?consumer.namedQuery=verifyRequests&persistenceUnit=VasServicePU1",
"jpa:VasRequest?consumer.namedQuery=verifyRequests&persistenceUnit=VasServicePU2")
--
View this message in context: http://camel.465427.n5.nabble.com/LoadBalance-for-pollenrich-tp5757837p5757926.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: LoadBalance for pollenrich
Posted by Willem Jiang <wi...@gmail.com>.
How about use “direct” endpoint to connect those route?
.loadBalance().failover().to(“direct:jpa”)
…
from(“direct:jpa”).pollEnrich(“jpa:xxx”);
--
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On October 21, 2014 at 3:56:24 PM, imranrazakhan (imranrazakhan@gmail.com) wrote:
> Hi,
>
> I have following route and i want to apply loadbalance with failover for
> pollenrich in route
>
> from("jpa:com.test.VasRequest?consumeDelete=false&consumer.delay=20000&consumer.namedQuery=selectLoanRequests&persistenceUnit=VasServicePU")
> .choice()
> .when(simple("${body.VasRequest.getMessage}=='Y'"))
> .loadBalance().failover()
>
> .pollEnrich("jpa:VasRequest?consumer.namedQuery=verifyRequests&persistenceUnit=VasServicePU1")
> .otherwise()
> .to("direct:verifyOffer")
> .endChoice()
> .to("jpa:com.test.VasResponse?persistenceUnit=VasServicePU")
> .end();
>
> Now if i couldnt get response from pollEnrich, i would like to query on
> other jpa endpoint, but pollenrich is showing error if i provide other
> endpoint by comma separation.
>
> Regards
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/LoadBalance-for-pollenrich-tp5757837.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>