[ https://issues.apache.org/activemq/browse/CAMEL-1799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58529#action_58529 ]
Claus Ibsen commented on CAMEL-1799: ------------------------------------ Willem this is great. Its much better now. I wonder if it would be _too_ much and have it being able understand than if you have set either a - deadLetterUri - transactionTemplateRef And *not* change the type accordingly it should either a) fail and say its a miss match. eg default type != deadLetterUri b) or just change the type to the most appropiate type (deadLetterUri => deadLetterChannel) etc. Maybe option b is _too_ magic. At least we should check for option a and throw an exception with the problem. I do like option a the most as its the concept of least surprise. That you have to set a correct _type_ and matching options. The other road to go, would be creating specialized XML for each different error handler, eg: {code:xml} <deadLetterChannel .../> <defaultErrorHandler ../> <noErrorHandler ../> <loggingErrorHandler .../> <transactionalErrorHandler ../> {code} That is of course a bigger problem with 5 different XML types for the *same* as its an error handler. So for now I think we should go for option a and add validation check for how the XML error handler was configured. > Spring DSL - Add error handler DSL support so we avoid having to use spring > bean style > -------------------------------------------------------------------------------------- > > Key: CAMEL-1799 > URL: https://issues.apache.org/activemq/browse/CAMEL-1799 > Project: Apache Camel > Issue Type: New Feature > Components: camel-spring > Affects Versions: 2.0-M2 > Reporter: Claus Ibsen > Assignee: Willem Jiang > Fix For: Future > > > We could use an DSL for error handling in Spring DSL > Then we can use the <redeliveryPolicy/> tag as well. And have an enum to > specify the type in case we want a dead letter channel instead or > transactional instead > {code:xml} > <errorHandler id="myErrorHandler" type="DeadLetterChannel"> > <deadLetter uri="log:dead"/> > <redeliveryPolicy maximumRedeliveries="5" logStackTrace="true" > backOffMultiplier="2"/> > </errorHandler> > {code} > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.