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?
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.