activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: ActiveMQ 5.5: Not able to get the DLQ_DELIVERY_FAILURE_CAUSE_PROPERTY value
Date Wed, 04 May 2011 21:50:35 GMT
so with spring DefaultMessageListenerContainer, it does a
consumer.receive, then calls your code, catches the exception, and
rolls back the transaction. redelivery exceeds the limits and the
message is delivered to the dlq.
Activemq does not see the exception at all so it cannot remember it as
a property. I just sees the rollback. I guess we could init the cause
to rollback in this case, but it is not possible to access to original
exception.

Spring has a SimpleMessageListenerContainer that registers a listener,
give this a try, the exception should then be reported back to
ActiveMQ.

On 4 May 2011 17:38, karen <jaskaran1981@gmail.com> wrote:
> Hi Gary
>
> Thanks for replying.
> I have attached the log file with trace level for the same use case. Also i
> have attached my listener class.
>
> Hope this helps.
>
> Thanks alot
> http://activemq.2283324.n4.nabble.com/file/n3496132/activemq.txt
> activemq.txt
> http://activemq.2283324.n4.nabble.com/file/n3496132/TestMessagesListener.txt
> TestMessagesListener.txt
>
> In my eclipse console i get the following exception data when the listerner
> throws an exception:-
> 2011-05-04 21:58:14,691 WARN
> [org.springframework.jms.listener.DefaultMessageListenerContainer] -
> <Execution of JMS message listener failed, and no ErrorHandler has been
> set.>
> java.lang.RuntimeException: Pls work  force a redelivery
>        at
> com.pearson.rel.webapp.listener.jms.TestMessagesListener.onMessage(TestMessagesListener.java:11)
>        at
> org.springframework.jms.listener.adapter.MessageListenerAdapter.onMessage(MessageListenerAdapter.java:339)
>        at
> org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:535)
>        at
> org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:495)
>        at
> org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
>        at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
>        at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
>        at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1056)
>        at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1048)
>        at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
>        at java.lang.Thread.run(Thread.java:619)
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-5-Not-able-to-get-the-DLQ-DELIVERY-FAILURE-CAUSE-PROPERTY-value-tp3492931p3496132.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://blog.garytully.com
http://fusesource.com

Mime
View raw message