|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
how to delete expired messages ? |
« View previous topic :: View next topic » |
Author |
Message
|
frueb |
Posted: Thu Oct 30, 2003 1:27 am Post subject: how to delete expired messages ? |
|
|
Newbie
Joined: 09 Dec 2002 Posts: 1 Location: Leinfelden, Germany
|
Hi to all,
I’ve a some questions about deleting expired messages from a queue.
1st a short explanation of our application:
MQS communication is always initiated from Windows NT/2000 (MQS 5.3 CSD4).
Application on Windows sends messages with correlid to Host-VSE(MQS 2.1.2) in queue 1.
Application on VSE reads all messages from queue 1 in sequential order, makes some processing and sends messages with same correlid and expiry time back to Windows in queue 2.
Application on Windows reads messages from queue 2 with correlid.
In some cases (host application on VSE is down during the night), the application on Windows can’t receive the messages from queue 2 within wait-time. After restart of the host application, the messages come back to windows into queue 2, but will not be read(wait-time exceeded).
So the messages accumulate in queue 2.
As per documentation these expired messages are only deleted, if they were read (get on queue).
Are there any tools or settings in MQS, that expired messages will be deleted without explicit GET ?
Any idea ?
Thanks for your help
Frank
Leinfelden/Germany 30.10.03 |
|
Back to top |
|
 |
raj.in |
Posted: Thu Oct 30, 2003 2:05 am Post subject: |
|
|
Novice
Joined: 15 Sep 2003 Posts: 10 Location: India
|
when the the message is put to queue2 , you can specify the Expiry time (in tenths of a second ) of MQMD structure .So that, once the time expires the message is discarded by the queue manager and you don't have to delete with an explicit GET
cheers
Raj |
|
Back to top |
|
 |
mrlinux |
Posted: Thu Oct 30, 2003 5:17 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
MQSeries doesnt automaticly remove expired messages from the queue,
but when you issue a MQGET MQSeries will remove all the expired messages. Your application will never see them.
IE if you have 5 messages on the queue and all 5 have exceeded the expiry time, you issue MQGET you will get back 2033 reason code(NO MSGS) _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
zpat |
Posted: Thu Oct 30, 2003 5:27 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
They are only deleted when a MQGET which would otherwise match the message is issued.
In a client server environment, the requestors usually perform a MQGET for a specific CORRELID that they are waiting for.
If these are not retrieved and then expire, they will remain on the queue because no other MQGETs are being issued for that correlid.
There are various ways to purge these messages. The best technique varies by platform and release. What platform and version of MQ?
The best one is to issue a MQGET BROWSE (non-destructive get) for the entire queue as this will purge all the expired messages and leave the others alone.
However this does not work for some versions of the OS/390 Queue Manager. There are alternate methods eg reading the entire queue with destructive MQGETs under syncpoint and then issuing ROLLBACK.
For more methods for OS/390 see the article in the July 2001 issue of MQ Update at www.xephon.com
Free back issues http://www.xephon.com/journals/more/MQ
Click on the "free" button for the full issue in PDF or the article hyperlinks for the source code (only) part of the article (if any).
I recommend subscribing to MQ Update, I can arrange a discount please send me a PM. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|