On Tue, May 29, 2012 at 1:16 PM, tooheavymental <tooheavymen...@gmail.com> wrote: > Hi, > I have a two external services(REST for simplicity). First service > enqueued the operation and, as result, only returns the token, which I > should periodically send to the second service until I get the computation > result, or > status that computation is failed. > But I can't simply describe that in Camel DSL. > The first idea was to use pollEnrich, a la: > > from("direct:sendQ").to("restlet://firstService").transform(xstream("...")).pollEnrich("restlet://secondService").to("direct:result"); > But, it seems, poolEnrich is for other purposes > The second is to manually create the cycle: > 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. > Any ideas?
Sometimes just use java code in a bean. You can still easily send messages using the producer templates. > Thank you. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Cycle-polling-tp5713670.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen