Hi Sounds like the message broker redeliveries the message up til X times before moving the message to its DLQ. If you use Apache ActiveMQ then it does that by default http://activemq.apache.org/redelivery-policy.html
On Mon, Apr 22, 2013 at 12:39 PM, berhack <royster....@gmail.com> wrote: > I am using v2.10.3. > > I am writing an integration test and need to simulate a database exception > after consuming from a JMS queue like so: > > from("jms:testQueue").to("mock:test"); > > mockTest.whenAnyExchangeReceived(new Processor() { > public void process(final Exchange exchange) throws Exception { > throw new CannotGetJdbcConnectionException(...); > } > }); > > Upon reading the docs, default behavior I expect there is no retry and > exception is simply propagated back to caller. However, the logs show that > it retries 7 times over?? I see this 7 times: > > [Camel (epCamelContext) thread #3 - JmsConsumer[testQueue]] ERROR > org.apache.camel.processor.DefaultErrorHandler - Failed delivery for > (MessageId: ... on ExchangeId: ...). Exhausted after delivery attempt: 1 > caught: org.springframework.jdbc.CannotGetJdbcConnectionException > > Would anyone know what is going on? Also, what is the "caller" where the > exception will be propagated in this case? My application code, or simply > the JMS consumer which I presume is running on a different thread...? > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/DefaultErrorHandler-strange-behaviour-tp5731237.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- 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