|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Is it possible to configure a retention period for queues ? |
« View previous topic :: View next topic » |
Author |
Message
|
tomng92 |
Posted: Mon Nov 26, 2001 12:19 pm Post subject: |
|
|
Newbie
Joined: 25 Nov 2001 Posts: 1
|
Hi,
Our app receives messages from another organisation. We wanted to automatically
delete messages older than 2 days.
Is there a configuration setting that
can do the above ?
thanks.
t.nguyen.
|
|
Back to top |
|
 |
kolban |
Posted: Mon Nov 26, 2001 12:38 pm Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
Each message in a queue has the concept of an "Expiry" interval. This is an absolute interval that starts counting down from the moment the message is put to the queue. It is measured in 1/10ths of a second. When the interval reaches zero, the message has expired and will not be retrieved by an MQGET.
Another solution is to browse each message and examine the MQMD PUTTIME field. For each message that is within a range, it can be deleted. This solution is not automatic and would required that you develop a programme to accomodate. |
|
Back to top |
|
 |
StefanSievert |
Posted: Wed Nov 28, 2001 4:38 pm Post subject: |
|
|
 Partisan
Joined: 28 Oct 2001 Posts: 333 Location: San Francisco
|
To add to Kolban's expiry solution: If you cannot get the other organization to specify the expiry on the MQPUT, you could write a simple program (or maybe use a support pac) to read incoming messages off the queue, set the expiry to the desired (configurable) value and put it to the final inbound queue. You'd probably want to use the xxxx_PASS_ALL_CONTEXT options to preserve the original context fields.
One other solution could be to modify the application that processes the incoming messages such as to discard (ignore) messages older than your desired interval.
Each solution has it's pros and cons. The first one is non-invasive and re-usable, the second one is application specific, but gives you the chance to log the messages that you ignored if you'd wish to do so.
Just some more thoughts.
Cheers,
Stefan
[ This Message was edited by: StefanSievert on 2001-11-28 16:38 ] |
|
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
|
|
|
|