You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by vadimos <va...@yahoo.com> on 2008/07/23 21:14:36 UTC

DLQ & message redelivery handling

Hi,

I've configured message redelivery via Spring 2.5 and ActiveMQ 5.1.0 to
redeliver messages on a runtime exception thrown by a listener. If
redelivered message still could not be handled, it is sent to DLQ.
After picking it from DLQ and I would like to have access to the original
message properties and the exception that caused redelivery. Here are my
questions:

1. I have detected that the message appearing in DLQ is of type
ActiveMQMessage even though the original message was ActiveMQMapMessage. Why
is that? This is still the case after I set copyOnMessageOnSend to false.
2. I can see the original message properties in marshalledProperties. How
can I un-marshall this object?
3. How can I set the exception or at least exception message so that it
propagates through redelivery and eventually to DLQ message? (ps. this seems
to have been addressed in camel. See 
https://issues.apache.org/activemq/browse/CAMEL-238)

thanks,
vadim
-- 
View this message in context: http://www.nabble.com/DLQ---message-redelivery-handling-tp18617794p18617794.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: DLQ & message redelivery handling

Posted by vadimos <va...@yahoo.com>.
I've answered question #2

ByteSequence byteSeq = amqMessage.getMarshalledProperties();
DataInputStream dataIn = new DataInputStream(new
ByteArrayInputStream(byteSeq));
Map<String, Object> properties =
MarshallingSupport.unmarshalPrimitiveMap(dataIn);

but the rest I am still struggling with.

vadim


vadimos wrote:
> 
> Hi,
> 
> I've configured message redelivery via Spring 2.5 and ActiveMQ 5.1.0 to
> redeliver messages on a runtime exception thrown by a listener. If
> redelivered message still could not be handled, it is sent to DLQ.
> After picking it from DLQ and I would like to have access to the original
> message properties and the exception that caused redelivery. Here are my
> questions:
> 
> 1. I have detected that the message appearing in DLQ is of type
> ActiveMQMessage even though the original message was ActiveMQMapMessage.
> Why is that? This is still the case after I set copyOnMessageOnSend to
> false.
> 2. I can see the original message properties in marshalledProperties. How
> can I un-marshall this object?
> 3. How can I set the exception or at least exception message so that it
> propagates through redelivery and eventually to DLQ message? (ps. this
> seems to have been addressed in camel. See 
> https://issues.apache.org/activemq/browse/CAMEL-238)
> 
> thanks,
> vadim
> 

-- 
View this message in context: http://www.nabble.com/DLQ---message-redelivery-handling-tp18617794p18623405.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.