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 7D54810681 for ; Mon, 28 Oct 2013 14:45:58 +0000 (UTC) Received: (qmail 46392 invoked by uid 500); 28 Oct 2013 14:45:53 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 46132 invoked by uid 500); 28 Oct 2013 14:45:52 -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 Received: (qmail 46083 invoked by uid 99); 28 Oct 2013 14:45:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Oct 2013 14:45:50 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.178 as permitted sender) Received: from [209.85.223.178] (HELO mail-ie0-f178.google.com) (209.85.223.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Oct 2013 14:45:47 +0000 Received: by mail-ie0-f178.google.com with SMTP id x13so11406454ief.37 for ; Mon, 28 Oct 2013 07:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=XHtzNDCJBmvIGETIFNV/xohkHKM1Crh0km/FfxEe9AI=; b=k6Roafj+p+ptq4IA90GJ2cwLzeQ9Z6XqJZxbrG1KI+gVoGTwyC2egcnLXqfQ+rMjXr X0eIr3X4lfRFl++UJNmIZfXSEqw1WbKRVThiNTSJPOF7i5xYB+aoulEekDjBM7SmyUVc pZSijKo/IG/30opjYG3RxkyIjvDzQIKsRbPArSSFp0nCLkl+YXX0vVW9Wxxq3hy6+Zpw 7Zs59Wl0xQpQZSAz0Z2iiofQ/mnPhA/WjU4mGNhmrAcUeEtntRqbmX7VR5Do6/BXKxfm bwoKRV7vrb4ocyD6g00Ubab5N2FNWh98N6/XNkkAaHno572o59ipzd/aqO8qU2Guewkb 2eYA== X-Received: by 10.42.42.10 with SMTP id r10mr27598ice.89.1382971525903; Mon, 28 Oct 2013 07:45:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.168.38 with HTTP; Mon, 28 Oct 2013 07:45:05 -0700 (PDT) In-Reply-To: <526E72FC.8060206@gmail.com> References: <526C167A.3080406@gmail.com> <46A27F64C176479294B71BA4273CBD89@gmail.com> <526E72FC.8060206@gmail.com> From: Claus Ibsen Date: Mon, 28 Oct 2013 15:45:05 +0100 Message-ID: Subject: Re: any way to turn off a timer? To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Its not as easy but you would have use the camel api from camel context to get hold of the timer consumer and stop it manually. On Mon, Oct 28, 2013 at 3:21 PM, Keith Freeman <8forty@gmail.com> wrote: > Thanks, but that won't work because it's a single route with 2 inputs: a > timer and a seda queue. So if I stop the route, I won't get the seda > messages any more. > > > On 10/28/2013 01:21 AM, Willem jiang wrote: >> >> I think the best way to turn off the timer is to stop the timer route. >> As you just send the message to sera queue so the timer route is decoupl= ed >> with the seda consumer route. >> >> >> -- >> Willem Jiang >> >> Red Hat, Inc. >> Web: http://www.redhat.com >> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) >> (English) >> http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) >> Twitter: willemjiang >> Weibo: =E5=A7=9C=E5=AE=81willem >> >> >> >> >> >> On Sunday, October 27, 2013 at 3:22 AM, Keith Freeman wrote: >> >>> I have a route with 2 sources, a timer and a seda queue. It uses the >>> timer to poll a data source while it's getting data from the queue, and >>> processes all of the data identically later in the route. But after a >>> while, the polled data source is exhausted while the seda queue (and th= e >>> route) will continue to run more-or-less forever. >>> So once I recognize that the polled data source is exhausted, I'd lik= e >>> to turn off the timer so I don't have to start ignoring the polls from >>> it. I realize I might be able to use 2 separate routes and just stop >>> the timer route when it's done, but having only 1 route fits my design >>> much better. >>> So is there any way to turn off the timer? (BTW I don't know the numb= er >>> of polls in advance, otherwise I know I could use the repeatCount >>> parameter) >> >> >> > --=20 Claus Ibsen ----------------- Red Hat, Inc. Email: cibsen@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen