|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Expiry set but message not discard |
« View previous topic :: View next topic » |
Author |
Message
|
ycchin |
Posted: Wed Aug 04, 2004 3:00 am Post subject: Expiry set but message not discard |
|
|
Newbie
Joined: 30 Jul 2003 Posts: 4
|
I set the expiry as follows but the message faileds to discard after 1 seconds, could some1 give some guidance
MQMessage put_msg = new MQMessage ();
put_msg.format = MQC.MQFMT_STRING;
put_msg.expiry = 10;
put_msg.persistence = MQC.MQPER_NOT_PERSISTENT;
put_msg.report = MQC.MQRO_DISCARD_MSG; MQPutMessageOptions pmo = new MQPutMessageOptions ();
put_msg.writeString (message1);
remote_queue.put (put_msg, pmo);
qMgr.commit (); |
|
Back to top |
|
 |
JLRowe |
Posted: Wed Aug 04, 2004 3:44 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
Read the manual, it is not discarded until a GET is attempted. |
|
Back to top |
|
 |
kirani |
Posted: Wed Aug 04, 2004 8:00 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Messages will not be discarded until some application tries to Browse or GET messages from the queue. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Aug 04, 2004 9:28 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
AND that browse/GET actually "touches" the expired message.
Put the following messages to a queue
Message CorrelID Expiry
#1 CI1 10
#2 CI2 10
#3 CI3 10000000
#4 CI4 10
#5 CI5 10
Now wait a minute. Queue depth shows 5, but 1,2,4 and 5 are expired.
Do an MQGET with CorrelID of CI3. Message 3 will be returned, and message 1 and 2 will be deleted off of the queue. 4 and 5 will still stay behind (queue depth is 2), because MQ did not touch them on its search from the head of the queue for a message that satisfies the get.
Above assumes a FIFO queue. _________________ Peter Potkay
Keep Calm and MQ On |
|
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
|
|
|
|