You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2008/11/20 20:59:05 UTC

[jira] Resolved: (CAMEL-1105) Spring DSL - redeliveryPolicy element should have ref attribute

     [ https://issues.apache.org/activemq/browse/CAMEL-1105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1105.
--------------------------------

    Resolution: Fixed

> Spring DSL - redeliveryPolicy element should have ref attribute
> ---------------------------------------------------------------
>
>                 Key: CAMEL-1105
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1105
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 1.5.0
>            Reporter: Jason Royals
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> I'd like to be able to create reusable {{RedeliveryPolicy}}'s in Spring and refer to them in Camel's Spring DSL.  This is to achieve two goals:
>  * I can use the Spring {{PropertyPlaceholderConfigurer}} to enable us to tune timeouts and redelivery in production - we cannot do that with Camel's Spring DSL;
>  * I can have several routes sharing the same {{RedeliveryPolicy}} (but possibly with different exceptions).  
> There doesn't seem to be a way to share {{RedeliveyPolicy}}'s between {{onException}} elements, meaning it needs to be duplicated (at least not that I could find in the docco)
> For example, I'd like to do something like this:
> {code}
>     <bean id="redeliveryPolicy" class="org.apache.camel.processor.RedeliveryPolicy">
>         <property name="..." value=${property.placeholder}/>
>     </bean>
>     <camelContext>
>         <route>
>             <from uri="somewhere"/>
>             <onException>
>                 <exception>ExceptionA</exception>
>                 <redeliveryPolicy ref="redeliveryPolicy"/>
>                 <to uri="deadLetter"/>
>             </onException>
>             <to uri="unreliableEndpoint"/>
>         </route>
>         <route>
>             <from uri="xyz"/>
>             <onException>
>                 <exception>ExceptionA</exception>
>                 <redeliveryPolicy ref="differentRedeliveryPolicy"/>
>                 <to uri="differentDeadLetter"/>
>             </onException>
>             <to uri="unreliableEndpoint"/>
>         </route>
>         <route>
>             <from uri="somewhereElse"/>
>             <onException>
>                 <exception>ExceptionB</exception>
>                 <redeliveryPolicy ref="redeliveryPolicy"/>
>                 <to uri="deadLetter"/>
>             </onException>
>             <to uri="anotherUnreliableEndpoint"/>
>         </route>
>     </camelContext>
> {code}
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.