camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Royals (JIRA)" <j...@apache.org>
Subject [jira] Created: (CAMEL-1105) Spring DSL - redeliveryPolicy element should have ref attribute
Date Thu, 20 Nov 2008 07:24:05 GMT
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


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.


Mime
View raw message