Sachin Shinde
Sachin Shinde

Reputation: 11

Moving messages from BackOut queue to main queue

We have defined BackOut queue for each main queue. The poison messages are added into BackOut queue automatically as we are using JMS. But few valid messages are also considered as poison messages due to temporary infrastructure/DB issues and added into BackOut queue.

Now I want to move those poison messages from BackOut queue to the main queue. Does anyone have any utility or any JMS/IBM MQ classes which can do it in less code?

I want it do it through java code.

Upvotes: 1

Views: 1447

Answers (1)

Roger
Roger

Reputation: 7506

I'm not sure why you would want to write Java code to move messages when there are already existing tools to do it for you:

(1) If the poison messages have the Dead Letter Header prefixed to the message then use the IBM MQ Dead Letter Queue Handler (runmqdlq).

(2) If the poison messages do NOT have the Dead Letter Header prefixed to the message then use dmpmqmsg utility as JoshMc pointed out. Note: You need to be at IBM MQ v8.0 or higher. If you are using an older release of IBM MQ then you can use a commercial program like MQ Batch Toolkit or QLoad.

Upvotes: 1

Related Questions