Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B753590B4 for ; Tue, 29 May 2012 11:24:02 +0000 (UTC) Received: (qmail 29726 invoked by uid 500); 29 May 2012 11:24:00 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 29693 invoked by uid 500); 29 May 2012 11:24:00 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 19324 invoked by uid 99); 29 May 2012 11:17:20 -0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.26 is neither permitted nor denied by domain of tooheavymental@gmail.com) Date: Tue, 29 May 2012 04:16:53 -0700 (PDT) From: tooheavymental To: users@camel.apache.org Message-ID: <1338290213580-5713670.post@n5.nabble.com> Subject: Cycle polling MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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.