Hi Can you try without using JMS as the DLC queue. For example a seda endpoint instead. To ensure that this works.
Also try without transferExchange=true|false as well. And it can also matter whether your JMS component have been configured in transacted mode or not using transacted=true | false. On Mon, Oct 5, 2009 at 9:58 PM, erh <[email protected]> wrote: > > I'm having trouble getting the dead letter channel to actually deliver to a > dead letter queue. It retries correctly, but after all the retries all I > get that refers to the final queue is a log message saying "Handled by the > failure processor: > RecipientList[activemq:queue:bulk_ErrorQ?transferExchange=true&maxMessagesPerTask=-1]". > The activemq EnqueueCount for the errorQ doesn't even change. > Messages to and from other queues get handled fine. If I manually put a > message on the errorQ it gets picked up by my custom error handler > Processor. > > I'm using Camel 1.6.2-SNAPSHOT with this configuration: > > <bean id="myDeadLetterErrorHandler" > class="org.apache.camel.builder.DeadLetterChannelBuilder"> > <property name="defaultDeadLetterEndpointUri" > value="activemq:queue:bulk_ErrorQ?transferExchange=true&maxMessagesPerTask=-1"/> > <property name="redeliveryPolicy" ref="myRedeliveryPolicyConfig"/> > </bean> > <bean id="myRedeliveryPolicyConfig" > class="org.apache.camel.processor.RedeliveryPolicy"> > <property name="maximumRedeliveries" value="1"/> > <property name="maximumRedeliveryDelay" value="250"/> > <property name="retryAttemptedLogLevel" value="FATAL"/> > <property name="retriesExhaustedLogLevel" value="FATAL"/> > </bean> > > <camelContext id="camel" > xmlns="http://activemq.apache.org/camel/schema/spring" > errorHandlerRef="myDeadLetterErrorHandler"> > <package>org.apache.camel.example.spring</package> > > <template id="producertemplate" /> > <endpoint id="errorq" > uri="activemq:queue:bulk_ErrorQ?maxConcurrentConsumers=1&maxMessagesPerTask=-1"/> > <route> > <from ref="errorq"/> > <to uri="bean:errorhandler?method=handleError"/> > </route> > <route> > <from uri="activemq:queue:foo_test"/><!-- I manually sent a > message using jconsole --> > <process ref="foo"/><!-- this Processor just throws an Exception > --> > </route> > </camelContext> > > What I see in the logs is: > [2009-10-05 > 14:48:31,330][FATAL][DefaultMessageListenerContainer-1][camel.processor.DeadLetterChannel(Logger)-log(208)]: > Failed delivery for exchangeId: ID-intblade06/60397-1254772096119/0-0. On > delivery attempt: 0 caught: java.lang.Exception: test exception > java.lang.Exception: test exception > at com.tuc.bulkchannel.Foo.process(Foo.java:11) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:80) > at > org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:189) > etc.... > > then again with "delivery attempt: 1" > > then: > [2009-10-05 > 14:48:31,597][FATAL][DefaultMessageListenerContainer-1][camel.processor.DeadLetterChannel(Logger)-log(164)]: > Failed delivery for exchangeId: ID-intblade06/60397-1254772096119/0-0. > Handled by the failure processor: > RecipientList[activemq:queue:bulk_ErrorQ?transferExchange=true&maxMessagesPerTask=-1] > [2009-10-05 > 14:48:31,601][WARN][DefaultMessageListenerContainer-1][component.jms.EndpointMessageListener(EndpointMessageListener)-onMessage(98)]: > Endpoint[activemq:queue:foo_test] consumer caught an exception while > processing JMS message: ActiveMQTextMessage {commandId = 5, responseRequired > = false, messageId = ID:intblade06-40704-1253652628625-2:13:1:1:1, > originalDestination = null, originalTransactionId = null, producerId = > ID:intblade06-40704-1253652628625-2:13:1:1, destination = queue://foo_test, > transactionId = null, expiration = 0, timestamp = 1254772111181, arrival = > 0, brokerInTime = 1254772111181, brokerOutTime = 1254772111181, > correlationId = null, replyTo = null, persistent = false, type = null, > priority = 0, groupID = null, groupSequence = 0, targetConsumerId = null, > compressed = false, userID = null, content = null, marshalledProperties = > null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = > null, readOnlyProperties = true, readOnlyBody = true, droppable = false, > text = qqq1} > org.apache.camel.RuntimeCamelException: java.lang.Exception: test exception > at > org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:874) > at > org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:81) > at > org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer. > java:531) > etc... > Caused by: java.lang.Exception: test exception > at com.tuc.bulkchannel.Foo.process(Foo.java:11) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:80) > etc... > > and finally: > [2009-10-05 > 14:48:31,602][WARN][DefaultMessageListenerContainer-1][jms.listener.DefaultMessageListenerContainer(AbstractMessageListenerContainer)-handleListenerException(634)]: > Execution of JMS message listener failed > org.apache.camel.RuntimeCamelException: java.lang.Exception: test exception > at > org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:874) > at > org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:81) > > Do I have something configured incorrectly? I tried to follow the > configuration sample on http://camel.apache.org/error-handler.html . > > eric > -- > View this message in context: > http://www.nabble.com/dead-letter-channel-never-delivered-to-the-uri-tp25756520p25756520.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
