ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » to delete stale messages from MQ queue

Post new topic  Reply to topic
 to delete stale messages from MQ queue « View previous topic :: View next topic » 
Author Message
dvishu78
PostPosted: Tue Sep 12, 2006 9:59 pm    Post subject: to delete stale messages from MQ queue Reply with quote

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
View user's profile Send private message Send e-mail
Nigelg
PostPosted: Wed Sep 13, 2006 12:15 am    Post subject: Reply with quote

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
View user's profile Send private message
dvishu78
PostPosted: Wed Sep 13, 2006 12:35 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Wed Sep 13, 2006 1:40 am    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Wed Sep 13, 2006 8:07 pm    Post subject: Reply with quote

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
PostPosted: Thu Sep 14, 2006 5:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » to delete stale messages from MQ queue
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.