|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to set Message to Expire? |
« View previous topic :: View next topic » |
Author |
Message
|
fredand44 |
Posted: Tue May 30, 2006 6:17 am Post subject: How to set Message to Expire? |
|
|
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 |
|
 |
jefflowrey |
Posted: Tue May 30, 2006 6:51 am Post subject: |
|
|
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 |
|
 |
wschutz |
Posted: Tue May 30, 2006 6:54 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
|
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
|
|
|
|