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 A3E06102C0 for ; Wed, 5 Feb 2014 14:47:57 +0000 (UTC) Received: (qmail 56653 invoked by uid 500); 5 Feb 2014 14:47:56 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 56224 invoked by uid 500); 5 Feb 2014 14:47:51 -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 56210 invoked by uid 99); 5 Feb 2014 14:47:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Feb 2014 14:47:50 +0000 X-ASF-Spam-Status: No, hits=4.5 required=5.0 tests=HTML_MESSAGE,SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of smikhalevski@gmail.com does not designate 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Feb 2014 14:47:45 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1WB3l6-00077N-Cd for users@camel.apache.org; Wed, 05 Feb 2014 06:47:24 -0800 Date: Wed, 5 Feb 2014 06:47:24 -0800 (PST) From: smikhalevski To: users@camel.apache.org Message-ID: <1391611644317-5746851.post@n5.nabble.com> Subject: Init a route but preserve its consumer in stopped state MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_250023_23113990.1391611644381" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_250023_23113990.1391611644381 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello allI've faced an issue with no possible way to init a route (warm it up) but preserve its consumer in stopped state.It turned out that in Camel 2.10, Route instance passed to RoutePolicy#onInit(Route route) is not yet initialized, so does not have consumer assigned (route.getConsumer() == null). I also tried to stop consumer in #onStart callback but it fires _after_ route was started so consumer has time to grab some messages before it is actually stopped.My purpose is to implement hot standby policy for routes and have possibility to pause and resume them in a really quick manner, so suspending (stopping) and resuming (starting) consumers is the best solution for me.Is there a way to walk around this problem and init a route keeping its consumer in stopped (suspended) state?Thanks in advance,Savva -- View this message in context: http://camel.465427.n5.nabble.com/Init-a-route-but-preserve-its-consumer-in-stopped-state-tp5746851.html Sent from the Camel - Users mailing list archive at Nabble.com. ------=_Part_250023_23113990.1391611644381--