Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 700F017B9F for ; Mon, 8 Feb 2016 07:37:40 +0000 (UTC) Received: (qmail 62931 invoked by uid 500); 8 Feb 2016 07:37:40 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 62891 invoked by uid 500); 8 Feb 2016 07:37:40 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 62882 invoked by uid 99); 8 Feb 2016 07:37:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2016 07:37:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C54F42C14F6 for ; Mon, 8 Feb 2016 07:37:39 +0000 (UTC) Date: Mon, 8 Feb 2016 07:37:39 +0000 (UTC) From: "Laurent Chiarello (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-9555) Setting deadLetterHandleNewException to false breaks DeadLetterChannel default exception handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-9555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Laurent Chiarello updated CAMEL-9555: ------------------------------------- Attachment: DeadLetterChannelTest.java Reupload of Test case > Setting deadLetterHandleNewException to false breaks DeadLetterChannel default exception handling > ------------------------------------------------------------------------------------------------- > > Key: CAMEL-9555 > URL: https://issues.apache.org/jira/browse/CAMEL-9555 > Project: Camel > Issue Type: Bug > Components: camel-core > Reporter: Laurent Chiarello > Assignee: Claus Ibsen > Fix For: 2.15.6, 2.16.3, 2.17.0 > > Attachments: DeadLetterChannelTest.java > > > By default, the {{DeadLetterChannel}} handles every exception, including any exception thrown by the dead letter itself. This can be changed by setting the option {{deadLetterHandleNewException}} to _false_. Unfortunately, setting it to _false_ also disable the handling in case of a normal exception, which is not at all what the name suggests. > To make the point clear, here is the little scenario I am trying to set up, and why this option is really important in that case. > h3. Scenario > I have a camel route consuming persistent messages from a JMS (activemq) endpoint. I have set {{CLIENT_ACKNOWLEDGE}} on the component to prevent consuming the messages until they have been successfully processed. > So I want to configure my error handler as a {{DeadLetterChannel}} with the following behavior: > # in case of an exception during processing, send the message to a DLQ > # if the DLQ itself fails (preventing the message to be safely stored), do not handle it and let the exception being propagated back to the JMS consumer, such that ActiveMQ won't remove it from its queue. > From my understanding, this is what the option {{deadLetterHandleNewException=false}} should provide. But when testing it, setting it to _false_ actually breaks the default handling of the dead letter channel as well, and no exception at all are handled, even when successfully sent to the DLQ... > I checked {{DeadLetterHandleNewExceptionTest}} from the camel test cases, but it does not cover the scenario I described (it only checks the behavior when the DLQ fails, not when it succeeds). > Basically, in the current release, I can either have: > * the DLC handle *all* exceptions (default) > * the DLC handle *no* exception at all (with {{deadLetterHandleNewException=false}}) > However, the intended behavior with {{deadLetterHandleNewException=false}} should have the DLC handle any exception thrown during normal routing, while not handling any exception thrown during the DLQ processing itself. -- This message was sent by Atlassian JIRA (v6.3.4#6332)