3
votes

Is there a way to get the original address queue of a JMS message was that not delivered. I'm using JBOSS HornetQ and found that I can get the JMSMessageID and Timestamp and the current queue (dead-letter-queue) the message is in, but I would like to find which queue the message originated from.

1

1 Answers

0
votes

I am new to HornetQ but have worked with IBM MQ.

While putting message to a dead letter queue, messaging providers add a header that will include information like original MessageID, original queue(from where the message was delivered to application) etc. This information is used by DLQ handlers to reroute the message to it's original queue.

Have you tried the below on message gotten from DLQ?

SimpleString originalQueue = dlqMessage.getSimpleStringProperty(Message.HDR_ORIGINAL_QUEUE);