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 » IBM MQ Java / JMS » How to set Message to Expire?

Post new topic  Reply to topic
 How to set Message to Expire? « View previous topic :: View next topic » 
Author Message
fredand44
PostPosted: Tue May 30, 2006 6:17 am    Post subject: How to set Message to Expire? Reply with quote

Acolyte

Joined: 14 Feb 2006
Posts: 63

Hello!

I try to set a message to expire after some time.

(Correct me if I'm wrong when I say that the message will be removed from the queue by the QueueManager when it has expired?)

However when the message reaches MQ it is marked:
Expiry: Unlimited

My code for this looks like:

QueueSender queueSender = queueSession.createSender(queue);
queueSender.send(message, 2, 4, 5000);

...or if this is needed....

queueSender.send(message, 2, 4, System.currentTimeMillis()+5000);

To me this means that the message should be removed after 5 sec.

Do you see the error, please let me know!

Best regards
Fredrik
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 30, 2006 6:51 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

That's the timeout for the send operation, not for the message.

You need to set the Expiry on the message itself.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
wschutz
PostPosted: Tue May 30, 2006 6:54 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Hint: search for "expiry" here:
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaw.doc/csqzaw1481.htm
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » How to set Message to Expire?
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.