Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 7925 invoked from network); 21 Oct 2008 08:24:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Oct 2008 08:24:53 -0000 Received: (qmail 34201 invoked by uid 500); 21 Oct 2008 08:24:55 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 34177 invoked by uid 500); 21 Oct 2008 08:24:55 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 34165 invoked by uid 99); 21 Oct 2008 08:24:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Oct 2008 01:24:55 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of james.strachan@gmail.com designates 209.85.217.15 as permitted sender) Received: from [209.85.217.15] (HELO mail-gx0-f15.google.com) (209.85.217.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Oct 2008 08:23:44 +0000 Received: by gxk8 with SMTP id 8so4794615gxk.14 for ; Tue, 21 Oct 2008 01:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Gayf0jG+CJtF1Tcm3u/ZySBHmOYLx8QSc6exhGc1KN0=; b=N3bTGwesmk+YQfu/FoTj2Dz7ivAN5/amDbySQlrOCq2l4Je9tEo2PZtnUvENYdZjcl XxuOiZXvMsxHJbhmu9JW93wpb4HGGTupqA1sIheur33wO9ktyUPmaV2V2AAz6rbmegas YpK0nJEFBKwCW45ZW1Dro82ptXkO9nv/xFnb8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=cZNrrjZXEguM2tdxd8I8yhF90DQOjUdv+7ZATT5MPk034nEzek6GRoYaX1unf3+pCe eI9XOLAKUoB5Giza+CUopURdL3ZP93aQD+Zxg9WKD5kNk3mfqlTTrxEFw3uMDXp0M842 ECsqgwK/UKJvRqCsIQkRaSe43pRZCZSNEbFfE= Received: by 10.90.31.6 with SMTP id e6mr8423572age.90.1224577462033; Tue, 21 Oct 2008 01:24:22 -0700 (PDT) Received: by 10.90.117.12 with HTTP; Tue, 21 Oct 2008 01:24:21 -0700 (PDT) Message-ID: Date: Tue, 21 Oct 2008 09:24:21 +0100 From: "James Strachan" To: camel-user@activemq.apache.org Subject: Re: Wait for condition In-Reply-To: <20067465.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20064420.post@talk.nabble.com> <20066849.post@talk.nabble.com> <20067465.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org 2008/10/20 Ovidius : > > Hi , > > I was a little evasive. I describe here the entire situation: > > I Receive several messages in an endpoint. At some moment i have to > suspend processing of messages (I do not know for how long so I can not use > a delay which have to a specific duration) until it fulfills an external > condition. When this condition fulfills i need to resume the processing of > messages. During the message processing is suspended other messages can > arrive in the endpoind. Another option is to add a bean processor into the route which can implement the delay. e.g. from("seda:foo").bean(SomeClass.class).to("seda:output"); Then in your bean evaluate your specific condition and block until the condition is met (either by checking the condition and then sleeping and re-evaluating, or hopefully using some neater java.util.concurrent mechanism to know when the condition is now met). -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/