Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 97996 invoked from network); 12 Jan 2010 16:56:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Jan 2010 16:56:34 -0000 Received: (qmail 79660 invoked by uid 500); 12 Jan 2010 16:56:33 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 79621 invoked by uid 500); 12 Jan 2010 16:56:33 -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 79611 invoked by uid 99); 12 Jan 2010 16:56:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jan 2010 16:56:32 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jan 2010 16:56:22 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1NUk2D-0008MC-TS for users@camel.apache.org; Tue, 12 Jan 2010 08:56:01 -0800 Message-ID: <27130672.post@talk.nabble.com> Date: Tue, 12 Jan 2010 08:56:01 -0800 (PST) From: Johan Haleby To: users@camel.apache.org Subject: Intercept a processor? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: johan.haleby@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org Hi, I'm configuring routes using the Java DSL and it works very well. However during testing I'd like to somehow hook into the end of an already defined route to add notification support. The reason is that in my test I'm creating a message and pass it to a queue using Camel and this message is handled by a processor. After this processor has finished executing I'd like to receive some sort of notification but only during testing. The reason is that I'd like my test to wait until the processor has finished executing in my test case so that I can verify the result of the processor. For example: public void test() { 1. send a message to queue // just as you would in production 2. wait for the processor to finish // this is where I'd like to get a notification that the processor has finished so that it's ok to continue to the next step 3. verify result } The route may look something like: from("jms:queue:myqueue).process(new MyProcessor()); // A simplification of the production route Is there a preferred way of doing this in Camel without changing the code making up the "production route"? Or is there a better way to achieve it? /Johan -- View this message in context: http://old.nabble.com/Intercept-a-processor--tp27130672p27130672.html Sent from the Camel - Users mailing list archive at Nabble.com.