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 6E7F4E36C for ; Thu, 17 Jan 2013 14:06:22 +0000 (UTC) Received: (qmail 59429 invoked by uid 500); 17 Jan 2013 14:06:22 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 59398 invoked by uid 500); 17 Jan 2013 14:06:21 -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 59388 invoked by uid 99); 17 Jan 2013 14:06:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jan 2013 14:06:21 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.215.50 as permitted sender) Received: from [209.85.215.50] (HELO mail-la0-f50.google.com) (209.85.215.50) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jan 2013 14:06:16 +0000 Received: by mail-la0-f50.google.com with SMTP id er20so965638lab.9 for ; Thu, 17 Jan 2013 06:05:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=B++XwoLD1yT7mbf7clA7p01Z0h8g0rTtOqGJH0yBosA=; b=ueuUY5siL/w5UGOiTtCc8+UriiBIVq6rFSTjau/6S98r+P9qgxFy0SOOuxJUuS4tzW z0DtiQZYFYWni33lOIKmuR5B364Wuswg8/sJ1yc+VxcdQjp2IqvaHlAoKIsTb9qt9wdr W5w6UJVODKWcEby9D/ydmhprG6xkGVK7ChxJboxfTYQx/2lPTuY6NP4cAiBgGkfcDPk6 E0j6WwDi+RjY4kDPnON3CWXWCupFEeuujvINSjUbx/YwItk9Ka047o1Ehyu+K8JZXzSv RVzCD4w2LCr/s+0oIX6bOUlgNOi0V5nT82ngXhmJfzG1GM6cTIXAS187iUnWecXqTtXq h+Ww== X-Received: by 10.152.132.137 with SMTP id ou9mr5062752lab.7.1358431556339; Thu, 17 Jan 2013 06:05:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.33.83 with HTTP; Thu, 17 Jan 2013 06:05:36 -0800 (PST) In-Reply-To: <1358417717574-5725682.post@n5.nabble.com> References: <1358417717574-5725682.post@n5.nabble.com> From: Claus Ibsen Date: Thu, 17 Jan 2013 15:05:36 +0100 Message-ID: Subject: Re: Route-scoped errorHandler and useOriginalMessage problem To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Jan 17, 2013 at 11:15 AM, ncolomer wrote: > Hi Camel community, > > I'm back with another issue, about Route-scoped errorHandler this time. > > I have several Routes that have their own errorHandler. Each of these > errorHandlers delegates Exceptions to a mutualized deadLetterChannel Route. > The deadLetterChannel Route finally persists on disk the original Route's > message (useOriginalMessage enabled) in order to be re-played later. > > The problem comes when I try to replay a File: I use a File Endpoint that > read the file, convert its body to its original form, and then route the > message to the original Route. But if this Route fails again, the > deadLetterChannel is triggered with the wrong message (I see a GenericFile > instead of the Type originally received by the Route). > > To sum this up, it seems the Route-scoped useOriginalMessage doesn't run as > expected, as the message received by the target is always the initial > message of the Exchange and not the one received by the route that failed > (what I expect when I declare a Route-scoped errorHandler). > > You'll find as attachement a failing unit test that illustrates my problem: > > OriginalMessageDLCTest.java > > > Any idea? Is it the expected behavior? > Yes useOriginalMessage is always the original message when the Exchange was first created. > Best regards, > Nicolas > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Route-scoped-errorHandler-and-useOriginalMessage-problem-tp5725682.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cibsen@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen