Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 10115 invoked from network); 31 Mar 2009 14:01:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Mar 2009 14:01:59 -0000 Received: (qmail 28978 invoked by uid 500); 31 Mar 2009 14:01:59 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 28933 invoked by uid 500); 31 Mar 2009 14:01:59 -0000 Mailing-List: contact dev-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 dev@camel.apache.org Received: (qmail 28923 invoked by uid 99); 31 Mar 2009 14:01:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Mar 2009 14:01:59 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hzbarcea@gmail.com designates 209.85.221.115 as permitted sender) Received: from [209.85.221.115] (HELO mail-qy0-f115.google.com) (209.85.221.115) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Mar 2009 14:01:50 +0000 Received: by qyk13 with SMTP id 13so2791020qyk.30 for ; Tue, 31 Mar 2009 07:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=ZfBl1VdGuyBIvun7bG9NAy3PxZt4Q9wLxYE+ERz2cuQ=; b=XlDa6ib0wB1vM1tC957GcnNLuQIiqnJmiZWmrwS4JZZqYGM3c/lk/qz+d/RA4A4FhU ExG7CP7HJZ1eGjH8FRfi7FH63lrcq6pCBT+DRd81AGtXe07wUZH16SzvQwgyH5gyICKr E1MPjdrHeRXJyZ4BcS0fpG4Tw8QT3Tw0hXqno= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=YaoslEPV5wrOjc/DfcrqnJ6UEjnYcQzEuaAp0XXL5iQ/YGh/RyW42ne7/Ffom0Naf7 rM4peu/hXnC8DxwC7qkZ4E7cfDJihyXeUwzpPY0cjPc9I7VHs8HwIEifoj8bBP7n68L+ r4X9DKnKoo3r44ih+Lqn7FmZbBb5c0cylOwco= Received: by 10.220.45.205 with SMTP id g13mr2099417vcf.64.1238508088961; Tue, 31 Mar 2009 07:01:28 -0700 (PDT) Received: from ?10.40.68.51? (cpe-071-070-213-211.nc.res.rr.com [71.70.213.211]) by mx.google.com with ESMTPS id 5sm2882341yxt.34.2009.03.31.07.01.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 31 Mar 2009 07:01:28 -0700 (PDT) Message-Id: From: Hadrian Zbarcea To: dev@camel.apache.org In-Reply-To: <5380c69c0903302251h552756a8sedd6bc4b29cf9c5d@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: [DISCUSS] - Default error handler in Camel 2.0, what should we do? Date: Tue, 31 Mar 2009 10:01:26 -0400 References: <5380c69c0903302251h552756a8sedd6bc4b29cf9c5d@mail.gmail.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Checked: Checked by ClamAV on apache.org 1) +1 Hadrian On Mar 31, 2009, at 1:51 AM, Claus Ibsen wrote: > Hi > > As we work on the Camel 2.0 I would suggest that we start a discussion > what should be the preferred error handler defaults in Camel 2.0. > What we currently have is the DLC is default and it does 6 retries > with 1 sec apart and then just log an ERROR and ends the exchange. > > We have 3 different error handler types > - no error handler (= disabled) > - DeadLetterChannel (= default in 1.x) > - TransactionErrorHandler (= using Spring TX) > > As people can use Camel in different runtimes and with different needs > for error handling we cannot have a default that fits all situations. > > We could for instance do > > 1) > Disable error handling by default. > > This would be the least surprises for end users. If there is some > exception then it would be propagated back to the caller. > We could even optimize the logic in Camel to avoid adding the > interceptor that adds the noErrorHandler. > > +1 from me > > > 2) > Keep it as is > big -1 from me. We have the luxury of being able to change defaults > before 2.0 is released. So we should do it!!! > > > 3) > Use DeadLetterChannel but add a feature so it avoids failure handling > it by default. So it will be able to do retries but if it fails all > together > it will propagate the exception back to the caller as if the have been > no error handler at all. > > This feature could also be useable for end users in other situations, > eg retry IOExceptions and in case of a all attempts failed then > propgate the excpetion back to the caller. > > What should the option name be: > - moveToDeadLetterQueue=false > - handled=false (like the handled we have at onException) > > +1 as well. We can even do #1 and #3 > > > 4) > For TX its mostly all the Spring XML garbage that is needed to setup > TX that can be a bit hard to get configure correct. > So the JMS component have a transacted=true option to allow to do this > itself or discover if there is a Spring TX manager already. > > Maybe we can default to use transactionErrorHandler if we can find a > Spring TX manager. But this would only work for certain transports > that support TX, and that is mostly only JMS and JDBC. > > So what should happens for routing not involving those, eg camel-cxf, > over file to a mail etc? > Could be confusing, if Camel uses TX for certain routes and the other > for the other routes. > > So what we have now with the transacted=true option is good as end > users need to explicit declare this option. > We could maybe add this for the JDBC based components as well: JPA, > JDBC, SQL. > > > Any thoughts? > > > > -- > Claus Ibsen > Apache Camel Committer > > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus