ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » Expiry set but message not discard

Post new topic  Reply to topic
 Expiry set but message not discard « View previous topic :: View next topic » 
Author Message
ycchin
PostPosted: Wed Aug 04, 2004 3:00 am    Post subject: Expiry set but message not discard Reply with quote

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
View user's profile Send private message
JLRowe
PostPosted: Wed Aug 04, 2004 3:44 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
kirani
PostPosted: Wed Aug 04, 2004 8:00 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
PeterPotkay
PostPosted: Wed Aug 04, 2004 9:28 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Expiry set but message not discard
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.