are you using a vm:// brokerurl, if so you need to have it unmarshall
the properties using a url like
vm://localhost?marshal=true

have a look at the test to compare and contrast with what you are doing:

http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java?r1=1084174&r2=1084175&;




On 3 May 2011 17:30, kar <jaskaran1...@gmail.com> wrote:
> Hello,
>
> I am not able to get the reason of exception from the message that is in the
> DLQ.
> These are the steps i have followed:-
>
> 1. Message is sent to a 'Sample' Queue.
>
> 2. The Message Listener throws a Runtime Exception in the onMessage
> Function.(throw new RuntimeException("Exception Reason Test");)
>
> 3. The message goes to the DLQ.
>
> 4. I am trying to access the Exception reason via two approaches(i pass the
> DLQ Name and the JMS Message ID in both):-
> - Spring JMSTemplate browseSelected function
>
> (ActiveMQMessage)message.getStringProperty(ActiveMQMessage.DLQ_DELIVERY_FAILURE_CAUSE_PROPERTY);
>
> - JMX QueueViewMBean browse function via the composite data map
>
> Map&lt;String,String&gt; datamap =
> (Map&lt;String,String&gt;)dataMap.get("StringProperties");
> datamap.containsKey(ActiveMQMessage.DLQ_DELIVERY_FAILURE_CAUSE_PROPERTY);
>
> In both cases i am getting a null value for the property
> DLQ_DELIVERY_FAILURE_CAUSE_PROPERTY.
>
> Please help.
> Thanks
>
> --
> 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-tp3492931p3492931.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



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

Reply via email to