Delete messages from MQ Queue

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ukyrvd
Premium Member
Premium Member
Posts: 73
Joined: Thu Feb 10, 2005 10:59 am

Delete messages from MQ Queue

Post by ukyrvd »

Hi,
We are trying to get used to processing messages to/from MQ using WebSphere MQSeries Stage in 7.5 server environment.

We are using Destructive read with commit/backout at the end options to make sure we are only deleting messages after everything is processed successfully.

Our jobs design involves extracting data and writing to multiple tables and we need to retain the message in QUEUE if there is any error on any one of these table loads.

After going through some of the posts in this forum and some sample runs I am trying to see if I can extract & process the messages and note down message IDs for all messages that we have processed and posted to target systems. And then fire off a job that will delete the messages from queue based on that list.
But I couldnt find any delete option on "WebSphere MQSeries" Stage? Is there a separate stage that we need to instal? Or do we have to write a after job shell script that will do the job?

Thanks in advance
thank you
- prasad
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

There's a tricky little technique for the MQStage in Server that allows you to do deletions...it takes advantage of having multiple links coming from a Transformer, and wrapping those into a single transaction. It is fairly well documented.

It sends the MQID down one link, and info for a target queue down another. Set up a dummy queue and you can easily delete these (or run a variety of MQ shell command outside of DS afterwards).

I have an example of the Job technique at my blog below.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
ukyrvd
Premium Member
Premium Member
Posts: 73
Joined: Thu Feb 10, 2005 10:59 am

Post by ukyrvd »

it takes advantage of having multiple links coming from a Transformer, and wrapping those into a single transaction
I was actually going through that in HELP files and I am not sure how to implement that Units Of Work logic.

Let me check couple of sample jobs and see if I can get it working.

Thanks Ernie
thank you
- prasad
Post Reply