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 » how to delete the left over messages

Post new topic  Reply to topic
 how to delete the left over messages « View previous topic :: View next topic » 
Author Message
madhoo
PostPosted: Wed Nov 29, 2006 9:22 pm    Post subject: how to delete the left over messages Reply with quote

Newbie

Joined: 27 Oct 2006
Posts: 8

Hi All,

we are having a problem that our Mq program sends a messages to queue ans waits for a response for a waitinterval of 60 seconds if it doesnt get the message with in this time we throw an error then if the message is arriving after the waitinterval as my application is not reading the message the messages are residing in the queue . How can we delete this type messages from the queue.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Wed Nov 29, 2006 10:54 pm    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

you may want to use expiry for the response messages, but you need a cleanup program anyway that tries to read the messages (expired messages are purged only when mq tries to read them).

or use a cleanup program that checks the putdate/time of the response messages and purges what is obviously old.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Nov 30, 2006 2:40 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Mr Butcher wrote:
(expired messages are purged only when mq tries to read them).


Expired messages are never available for GETting.

In v6 on most platforms, they are removed by a background cleanup process. In v5.3, they are removed by a background cleanup process in some CSDs on most platforms, and in most or all CSDs on zOS.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Thu Nov 30, 2006 4:21 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

Quote:
Expired messages are never available for GETting.


i never said they where , i said if you try to get an expired message mq purges it. but i agree - the "only" was definitely wrong.

of course the backup cleanup process can be used, but 1. it has to be switched on and 2. it may not be an option if you have some kind of monitor that issues alerts depending on queue depth.

anyway, as always there is more than one solution...
_________________
Regards, Butcher
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Nov 30, 2006 5:08 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

No.

MQ V6 on distributed automatically cleans up expired messages.

Whether you want it to or not.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Thu Nov 30, 2006 6:03 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

ah thanks! my main focus is on z/os so i miss some distributed details, thanks for the information.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
mqdev
PostPosted: Tue Mar 06, 2007 1:16 pm    Post subject: Reply with quote

Centurion

Joined: 21 Jan 2003
Posts: 136

jefflowrey wrote:
No.

MQ V6 on distributed automatically cleans up expired messages.

Whether you want it to or not.


Jeff,
Per the documentation, this is true only for Z/OS.
The cleanup of expired messages is done by Queue Manager via the setting of EXPRYINT attribute of the QM only on z/os

Please let me know if there is another way of this happening on non-Z/OS platforms

Thanks
-mqdev
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Mar 06, 2007 1:49 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The documentation only specifies that expired messages are not available to be gotten.

The documentation also only specifies that one can control the background cleanup process on zOS.

Try it yourself. Put some instantly expired persistent messages on a v6 distributed qmgr.

Wait a couple of hours.

Examine the qdepth.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mqdev
PostPosted: Tue Mar 06, 2007 2:34 pm    Post subject: Reply with quote

Centurion

Joined: 21 Jan 2003
Posts: 136

jefflowrey wrote:
The documentation only specifies that expired messages are not available to be gotten.

The documentation also only specifies that one can control the background cleanup process on zOS.

Try it yourself. Put some instantly expired persistent messages on a v6 distributed qmgr.

Wait a couple of hours.

Examine the qdepth.


Jeff,
As a matter of fact, I was doing just that. My platform is Windows-XP and sure enough, the messages did get cleared out. Thanks for your insight though - always thought that we need to manually clear the expired messages!

-mqdev
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Mon Mar 12, 2007 2:47 am    Post subject: Re: how to delete the left over messages Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

If you would like to read also "expired" business messages (not expired by MQ) you can use other mechanism.

You can read all messages from reply queue and check if it is actual anwser
. If yes just execute your code. If you find that nowbody waits for it anwser you can write anothe code to something with this delayed anwser message.


Of course this is case when you need this delayed anwser messages for something.


Marcin
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » how to delete the left over messages
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.