I think what Claus is saying is if you setup a global exception clause, the 
redelivery will only happen for the failed endpoint.

<camelContext>
    <onException>
        <exception>java.lang.Exception</exception>
        <redeliveryPolicy maximumRedeliveries="1" redeliveryDelay="1000"/>
    </onException>

    <route>
        <from uri="servlet:///foo"/>
        <multicast>
            <to uri="http4://127.0.0.1:80/bar..."/>
            <to uri="sql:INSERT INTO BAZ_TBL (NAME) VALUES(:#${body})..."/>
            <to uri="activemq:qux..."/>
        </multicast>
    </route>
</camelContext>

That doesn’t give you the option of specifying the maximumRedeliveries and 
redeliveryDelay independently, but I think you could use direct routes with 
route-scoped exception clauses to do this

<camelContext xmlns="http://camel.apache.org/schema/blueprint";>
    <route>
        <from uri="direct://my-http"/>
        <onException>
            <exception>java.lang.Exception</exception>
            <redeliveryPolicy maximumRedeliveries="1" redeliveryDelay="1000"/>
        </onException>
        <to uri="http4://127.0.0.1:80/bar..."/>
    </route>

    <route>
        <from uri="direct://my-sql"/>
        <onException>
            <exception>java.lang.Exception</exception>
            <redeliveryPolicy maximumRedeliveries="10" redeliveryDelay="10000"/>
        </onException>
        <to uri="sql:INSERT INTO BAZ_TBL (NAME) VALUES(:#${body})..."/>
    </route>

    <route>
        <from uri="direct://my-activemq"/>
        <onException>
            <exception>java.lang.Exception</exception>
            <redeliveryPolicy maximumRedeliveries="25" redeliveryDelay="25000"/>
        </onException>
        <to uri="activemq:qux..."/>
    </route>

    <route>
        <from uri="servlet:///foo"/>
        <multicast>
            <to uri="direct://my-http"/>
            <to uri="direct://my-sql"/>
            <to uri="direct://my-activemq"/>
        </multicast>
    </route>
</camelContext>


> On Feb 9, 2016, at 2:05 AM, NES <nes...@gmail.com> wrote:
> 
> Do you mean that I should create a custom Error Handler?
> if so, I would like you to show a sample.
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Redelivery-per-Endpoint-tp5777413p5777440.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to