|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Message expiry |
« View previous topic :: View next topic » |
Author |
Message
|
sfari |
Posted: Mon Jul 28, 2003 5:37 am Post subject: Message expiry |
|
|
Centurion
Joined: 15 Apr 2003 Posts: 144
|
Hi
When does a queue manager scan its queues for expired messages? I heard that a queue gets cleanded up only if a get happens on it. Is this true? Is it then possible to put for ages on to a queue and it gets never automatically cleaned up? In the documentation I didn't found any infos about this issue.
Our system is Solaris 8 with MQ 5.3.
Any hint will be appreciated!
Regards
Silvano |
|
Back to top |
|
 |
bduncan |
Posted: Mon Jul 28, 2003 4:51 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
The only time the queue manager removes an expired message from a queue is when an MQGET call is issued which would have otherwise removed THAT message from the queue.
Take the following scenario:
I have messages 1, 2, and 3 on a queue (in that order).
Message 2 is expired, but the others are not.
Assume that I issue a simple MQGET. Because it gets the first message in FIFO order, message 1 is retrieved, but message 2 (the expired one) isn't removed, because the MQGET wouldn't have otherwise retrieved it.
Now, if I do a second MQGET, the queue manager will see that 2 is the next in FIFO order, but it is expired, so it will be removed. Then it will retrieve message 3 for me.
If I had originally issued an MQGET matching against message 2's MsgId, the queue manager would have removed message 2 and then removed a 2033 reason code.
So yes, if you keep piling messages onto a queue, but never issue an MQGET, the expired messages will never be removed. Eventually you'll hit the MAXDEPTH on the queue. This is why when you look at the queue depth of a queue in runmqsc expired messages count towards the total. _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
leongor |
Posted: Tue Jul 29, 2003 2:27 am Post subject: |
|
|
 Master
Joined: 13 May 2002 Posts: 264 Location: Israel
|
Quote: |
The only time the queue manager removes an expired message from a queue is when an MQGET call is issued which would have otherwise removed THAT message from the queue.
|
I want to put some correction. To remove expired message you can also use MQGet with browse mode ( except z/OS ). _________________ Regards.
Leonid.
IBM Certified MQSeries Specialist. |
|
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
|
|
|
|