Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 526F2200B49 for ; Wed, 3 Aug 2016 19:11:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 51028160A86; Wed, 3 Aug 2016 17:11:35 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 95F98160A5D for ; Wed, 3 Aug 2016 19:11:34 +0200 (CEST) Received: (qmail 16574 invoked by uid 500); 3 Aug 2016 17:11:32 -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 16561 invoked by uid 99); 3 Aug 2016 17:11:32 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Aug 2016 17:11:32 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 1A5AC1A6121 for ; Wed, 3 Aug 2016 17:11:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id EYfBi39vO_wM for ; Wed, 3 Aug 2016 17:11:30 +0000 (UTC) Received: from mail-yw0-f173.google.com (mail-yw0-f173.google.com [209.85.161.173]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 05B825F3A0 for ; Wed, 3 Aug 2016 17:11:30 +0000 (UTC) Received: by mail-yw0-f173.google.com with SMTP id r9so233775202ywg.0 for ; Wed, 03 Aug 2016 10:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=7lU15nxBvm55XYi2mKiHgP+3CMmoC6TVB/6le7bS9lg=; b=oa1XzScLmjxBceLeW3hQkS5rw/lYTZkWnCfbXyUxHw2/bgluSzeyc5Er4sTJABE56i 6j3vuYc5zZ90jFyr75Mo6R7BKHtuBjjYmuRLfqio427j0r1G8cHLHEdPXs61dATY/yRV vnbSoY/EhjCOkwD++weDrx8OxKep9RuUMJJrTh9twZ4HbqiXIrAkX/I9ZBmQOHnVLgWn Q+ZgwA0TwFJ/zOAtu6P0znKo2Jz3Vz1B5/ac0/Bl5NjszkIvh/hRd64HyjF4miqeaRTn G1f03bGEy0gwAKarGpQnUTacaF5mbGKLscXvbPuB1Y7fDyTD2cVGy61SELElU6KgY8/p slHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=7lU15nxBvm55XYi2mKiHgP+3CMmoC6TVB/6le7bS9lg=; b=QB6YzLm/0p0pC4hbcGxFg4YFm0+sVa3wrdAqh/leR7ALNrJGqCEA97Y7uf+YCFLv6s TiAF9TG75NqGJIGO/5uGNBUv4gjajuP5z/a7jALpDbCdoL8nlvxpWlTTVops6cgWK/Gz 6RgzI3V14bLQMiLwFC+1iilkOjrDwFQaAwM5rPK+gjndwC4dAGW3kLOSs3QRg+5cAiw2 fXM0NCoKhsfsDT9DQZHdnn82gnaPhYkppv1PpNMrAQ0e/0T5U1t6eaF6yWoEGdSAc19I oVpqMsA0bNPIFwkff8+lYJ0gfDTpa5gXtgo4cH8RSN790wE+rsWF+PmbDwQ3qauQC3at GF+A== X-Gm-Message-State: AEkoous6DBeQTHxvVki3mzJLQVNQziwFdfpdITHxm7TJq9mse/Tv5NU1IFvvrO4LD9Fe9MZhIIp0+hihNF3gOw== X-Received: by 10.129.161.4 with SMTP id y4mr52210429ywg.256.1470244288892; Wed, 03 Aug 2016 10:11:28 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Carlos Rodriguez Fernandez Date: Wed, 03 Aug 2016 17:11:18 +0000 Message-ID: Subject: Re: Understanding Error Handling on steps To: users@camel.apache.org Content-Type: multipart/alternative; boundary=001a114f8f889294c505392dec5c archived-at: Wed, 03 Aug 2016 17:11:35 -0000 --001a114f8f889294c505392dec5c Content-Type: text/plain; charset=UTF-8 If I understand correctly, the retries on the entry points to fetch the message are defined by the entry point configurations, and when the Apache Camel documentation mentions "redelivery" is talking about the delivery of the messages that was already picked up by the entry point of the route definition. When the route is transactional, then the "redelivery" includes the delivery and processing of the message all the way to the endpoint ("to" definition). So in my example, I won't need to do the onException after the "from". from(notificationSystemInboundEndpoint) .process(processor) .onException(Exception.class) .maximumRedeliveries(0) .logStackTrace(true) .handled(true); I kind of answer myself the question, (or I think I did). I didn't find a clear explanation in the documentation of what the "redelivery" actually meant in details. I think I figured it out after cloning the apache camel project and looking/debugging the camel-kafka code. I gotta love open-source. Regards, Carlos. On Mon, Aug 1, 2016 at 4:23 PM Carlos Rodriguez Fernandez < carlosrodrifernandez@gmail.com> wrote: > Hi, > > I'm trying to understand the error handling in Apache Camel. I have > defined a route to processes Kafka messages and I want the fetching to keep > trying forever, but to ignore exceptions from the processor. So I have this > setup: > > from(notificationSystemInboundEndpoint) > > .onException(Exception.class) > > .maximumRedeliveries(-1) > > .end() > > .process(processor) > > .onException(Exception.class) > > .maximumRedeliveries(0) > > .logStackTrace(true) > > .handled(true); > > > I'm not sure this is correct. What would be the best way to do this? > > > Thank you, > > Carlos. > --001a114f8f889294c505392dec5c--