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 1D7C910F91 for ; Sun, 1 Sep 2013 08:27:38 +0000 (UTC) Received: (qmail 59766 invoked by uid 500); 1 Sep 2013 08:27:35 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 59737 invoked by uid 500); 1 Sep 2013 08:27: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 59729 invoked by uid 99); 1 Sep 2013 08:27:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Sep 2013 08:27:32 +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 (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.182 as permitted sender) Received: from [209.85.223.182] (HELO mail-ie0-f182.google.com) (209.85.223.182) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Sep 2013 08:27:26 +0000 Received: by mail-ie0-f182.google.com with SMTP id aq17so6391033iec.27 for ; Sun, 01 Sep 2013 01:27:06 -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=47J2NK/v6GVovvOHgypMYJ0s6gCLl6tLG3iKOKlZ9Vc=; b=0azvOCDnpXJOOJWYAiPJdjEjyt/O/iLBw+yWrR+Ww0z+GEReKxCTqEtZac/VDQnnSi Io41IRu89k+0Laf+/45aPtAq2gnTSFQzLMbAqmm4oPqv/kjSgXf7olLo1jWW/OHUjuJn S2hHqWBp/MgCoj239/m/bshTD221Fd042Cnh5NQR5IiOKVVVKTP+r8VXayD0XN8JT4F3 swwDVJubZ8jVaOOodKnaw8H9j3fc/TlhYoB7dbgDPlj0g47dOTd2bIGZaf4KPOMB5xXM v410WHHxGEjdZ4YMBVsHwz2gLxvLwoypGXqRrmDke5Cqc+WTsC3pa9llp3z/iIb+kK7T EAgw== X-Received: by 10.50.39.84 with SMTP id n20mr8146298igk.14.1378024026050; Sun, 01 Sep 2013 01:27:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.20.196 with HTTP; Sun, 1 Sep 2013 01:26:46 -0700 (PDT) In-Reply-To: References: From: Claus Ibsen Date: Sun, 1 Sep 2013 10:26:46 +0200 Message-ID: Subject: Re: Inter-Route.Communication To: "users@camel.apache.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Use stopOnException and rethrow the exception from the producer template. On Fri, Aug 30, 2013 at 11:39 AM, Christopher Gardner wrote: > So if I have the following: > > from("direct:a").split(...).streaming().bean(myBean) > > where myBean uses a producer template to send to direct:b when part of th= e > stream is processed (we had to use this instead of an aggregator) > > from("direct:b).bean(myOtherBean) ... > > Say something went wrong in myOtherBean (an exception was raised). What > would be a way to tell direct:a to stop? > > > On Thu, Aug 29, 2013 at 8:27 PM, Christopher Gardner < > chris.r.gardner@gmail.com> wrote: > >> I'm using stoponexception. My splitter route includes a bean processor >> that uses producer template to push to the downstream route, which isn't= a >> JMS route. Would you show a bit of DSL that might work on my downstream >> route that could signal my upstream route an exception occurred? >> On Aug 29, 2013 7:59 PM, "Raul Kripalani" wrote: >> >>> Have you tried the stopOnException() option of the Splitter? >>> Use it in combination with direct or seda endpoints. If you use JMS, yo= u >>> can enable the transferException option to ensure that the Exception is >>> propagated back to the caller in its original form. >>> >>> Regards, >>> >>> *Ra=FAl Kripalani* >>> Apache Camel PMC Member & Committer | Enterprise Architect, Open Source >>> Integration specialist >>> http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalan= i >>> http://blog.raulkr.net | twitter: @raulvk >>> >>> On Thu, Aug 29, 2013 at 11:58 PM, Christopher Gardner < >>> chris.r.gardner@gmail.com> wrote: >>> >>> > I have a number of routes that do a bit of processing and then hand o= ff >>> to >>> > other routes. One of the upstream routes splits streaming data to a >>> > downstream route. If that downstream route encounters problems it >>> should >>> > notify the upstream route to stop splitting and cease processing. Wh= at >>> > mechanisms does camel provide to help? >>> > >>> >> --=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