Author |
Message
|
madhoo |
Posted: Wed Nov 29, 2006 9:22 pm Post subject: how to delete the left over messages |
|
|
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 |
|
 |
Mr Butcher |
Posted: Wed Nov 29, 2006 10:54 pm Post subject: |
|
|
 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 |
|
 |
jefflowrey |
Posted: Thu Nov 30, 2006 2:40 am Post subject: |
|
|
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 |
|
 |
Mr Butcher |
Posted: Thu Nov 30, 2006 4:21 am Post subject: |
|
|
 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 |
|
 |
jefflowrey |
Posted: Thu Nov 30, 2006 5:08 am Post subject: |
|
|
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 |
|
 |
Mr Butcher |
Posted: Thu Nov 30, 2006 6:03 am Post subject: |
|
|
 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 |
|
 |
mqdev |
Posted: Tue Mar 06, 2007 1:16 pm Post subject: |
|
|
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 |
|
 |
jefflowrey |
Posted: Tue Mar 06, 2007 1:49 pm Post subject: |
|
|
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 |
|
 |
mqdev |
Posted: Tue Mar 06, 2007 2:34 pm Post subject: |
|
|
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 |
|
 |
marcin.kasinski |
Posted: Mon Mar 12, 2007 2:47 am Post subject: Re: how to delete the left over messages |
|
|
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 |
|
 |
|