camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: maxRedlivery and Transactional client does not work
Date Fri, 03 Jul 2009 08:01:04 GMT
On Fri, Jul 3, 2009 at 9:53 AM, Charles Moulliard<cmoulliard@gmail.com> wrote:
> Hi,
>
> I have configured my route like this but Camel continues to redeliver 6
> times the messages !!!

Its the default redelivery by ActiveMQ you have to configure it how
you want it to handle redelivery
http://activemq.apache.org/redelivery-policy.html

So its not Camel doing any redelivery, but the message does a rollback
and then the TX manager will act according to the
redelivery policy in ActiveMQ.




>
>    <bean id="myPolicy" class="org.apache.camel.processor.RedeliveryPolicy">
> *        <property name="maximumRedeliveries" value="1"/>*
>    </bean>
>
>    <bean id="txErrorHandler"
> class="org.apache.camel.spring.spi.TransactionErrorHandlerBuilder">
>        <property name="springTransactionPolicy"
> ref="PROPAGATION_REQUIRED"/>
>        <property name="redeliveryPolicy" ref="myPolicy"/>
>    </bean>
>
>    <bean id="PROPAGATION_REQUIRED"
> class="org.apache.camel.spring.spi.SpringTransactionPolicy">
>        <property name="transactionManager">
>            <osgi:reference
> interface="org.springframework.transaction.PlatformTransactionManager"/>
>        </property>
>    </bean>
>
>        <camel:route errorHandlerRef="txErrorHandler">
>            <camel:from ref="queueQuickFixInEndpoint" />
>            <camel:convertBodyTo type="quickfix.Message" />
>            <camel:transacted ref="PROPAGATION_REQUIRED"/>
>            <camel:bean ref="serviceHelper" method="createNotification" />
>            <camel:bean ref="serviceHelper" method="generateError" />
>            <camel:to ref="directNotificationEndpoint" />
>        </camel:route>
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message