Hi If you use AMQ Transacted and its redelivery settings, then it rollback the entire route, and start all over again. Camel's error handler is at the point of error, and do NOT start all over again.
Usually you only use either one, and not both. For JMS TX you likely want the broker to redeliver, and not use Camel's error handler also. Otherwise you can end up with trying 10 x 10 times. On Tue, Jun 25, 2013 at 12:43 PM, Darwish <othman.darw...@progressoft.com> wrote: > I have transacted route which consume messages from AMQ , the connection > factory that i used is defined as follow (maximumRedeliveries=10) > > <bean id="jmsConnectionFactory" > class="org.apache.activemq.ActiveMQConnectionFactory"> > <property name="brokerURL" value="tcp://10.3.150.132:61001" /> > <property name="redeliveryPolicy"> > <bean class="org.apache.activemq.RedeliveryPolicy"> > <property name="maximumRedeliveries" > value="10" /> > </bean> > </property> > </bean> > > > The transacted route reference the following transcriptional error handler > > > > <camel:errorHandler type="TransactionErrorHandler" id="TxErrorHandler" > transactionManagerRef="transactionManager"> > <camel:redeliveryPolicy maximumRedeliveries="10" > redeliveryDelay="3000" > logRetryAttempted="true" logExhausted="true" retriesExhaustedLogLevel="WARN" > retryAttemptedLogLevel="WARN" /> > </camel:errorHandler> > > my route handle exception as follow > > <from uri="AMQ:queue:foo" /> > <onException> > <exception>ExceptionType1</exception> > <exception>ExceptionType2</exception> > <handled> > <constant>true</constant> > </handled> > <log message="Handled!" /> > <process ref="handleError"></process> > <rollback markRollbackOnly="true" > inheritErrorHandler="true" /> > </onException> > > > > what happening is on exception block executed 10 times! > when i set maximumRedeliveries at AMQ connection factory to 0 , things work > as expected > > > is this normal? > > > AMQ version 5.8 > Camel 2.11 > > > > > ----- > Othman Darwish > ProgressSoft Corp. > > -- > View this message in context: > http://camel.465427.n5.nabble.com/AMQ-connection-factory-redelivery-option-against-transactional-error-handler-redelivery-policy-tp5734732.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- www.camelone.org: The open source integration conference. Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen