camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <>
Subject Re: Cycle polling
Date Tue, 29 May 2012 12:22:11 GMT
Sounds like a good case for the dynamic router:

In the expression you could test if the result is ok and return null if 
it is ok. As long as it is not ok you would return the endpoint uri of 
the second service.
If the expression is too complicated you can use a bean for it.


from("direct:beginPollQ").dynamicRouter(bean(new MyResultChecker("restlet://secondService"))).to("direct:result");


Am 29.05.2012 13:49, schrieb Henryk Konsek:
>>   from("direct:sendQ").to("restlet://firstService").to("direct:beginPollQ");
>>   from("direct:beginPollQ").delay().to("restlet://secondService")
>>                              .choice().
>>                                           when(IS_OK).to("direct:result").
>>                               .otherwise().to("direct:beginPollQ")
>> But I think is too ugly.
> Do you? :) I personally think that it's pretty valid solution for the
> problem you described.

Christian Schneider

Open Source Architect
Talend Application Integration Division

View raw message