Author |
Message
|
dvishu78 |
Posted: Tue Sep 12, 2006 9:59 pm Post subject: to delete stale messages from MQ queue |
|
|
Novice
Joined: 15 Jun 2006 Posts: 20 Location: INDIA
|
Hi ALL,
My Web application talks to Mq queue twice one is for validation, it places a string on the output queue and waits for the response from the input queue for a time interval of 30 seconds (this response is comming from MVS system and the message which it sends is a boolean value) if we dont find any message with in 30 seconds we throw an error with respective reason code.
Now we are getting an error as Error Message:Â An exception occurred while performing account code validation with completion code 2 and reason code 2033.
we observed our input Queue yesterday and got to know that there are lot of stale messages in the queue and their timestamps are all from 2005. This messages are in the Queue because if the message may have come in to our input queue after the timeinterval(30 seconds) and our application havent read it.
i would like to know is there any way to delete the messages automatically from my input queue.
my queue's are on AIX
Please can one suggest me .
Thanks in advance |
|
Back to top |
|
 |
Nigelg |
Posted: Wed Sep 13, 2006 12:15 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
Set the Expiry when putting the msg. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
dvishu78 |
Posted: Wed Sep 13, 2006 12:35 am Post subject: |
|
|
Novice
Joined: 15 Jun 2006 Posts: 20 Location: INDIA
|
Hi Nigelg,
Thanks for your response but the reply message is generated by MVS system and we have no control over that and Does EXPRYINT works on AIX?
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Sep 13, 2006 1:40 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Please read the Application Programming Guide on message expiration. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Sep 13, 2006 8:07 pm Post subject: |
|
|
Guest
|
You identified two issues: 1. getting rid of old messages from 2005; and 2. setting EXPIRY for new messages.
1. The MQSC CLEAR deletes all messages from a queue. If you can stop inbound messages (from MVS) for a brief period, you could execute the CLEAR command.
2. You could write and install a channel exit program on your receiver channel such that when messages arrive from MVS, the exit program can set the EXPIRY value in the message descriptor to 30 seconds. EXPIRY works on all platforms. Refer to the Application Programmers Reference and Application Programmers Guide for all the details. At www.ibm.com/mqseries look for support pacs for sample channel exit programs
. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Thu Sep 14, 2006 5:32 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
You could always use MO71 to delete the bad messages from the queue.
It may be time consuming but if you have valid (good) messages on the queue it is less 'final' than using CLEARQ. If you don't care about any of the messages on the queue then CLEARQ is the fastest way.
Of course you are just going to be in the same boat in a few weeks unless you do something like bruce2359 is suggesting or get the z/OS to add expiry to the message. |
|
Back to top |
|
 |
|