Kbase 21108: SonicMQ: How To Set JMSExpiration On a Message
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  19/06/2001 |
|
SUMMARY:
This Knowledge Base Solution explains how to correctly set the
JMSExpiration field of a message.
EXPLANATION:
As a SonicMQ user, you might try to set the JMSExpiration field of a message using the setJMSExpiration() method of the message interface. While this might appear to be a valid approach, it is documented in the Java API that this method is only to be used by the JMS provider (SonicMQ) after the message is sent.
SOLUTION:
To correctly set the JMSExpiration field of a message, you must supply the time-to-live parameter of the send() method. When the message is sent, SonicMQ will then take the sum of the time-to-live and the GMT (at the time of the send), and use that value to set the JMSExpiration with the setJMSExpiration() method.
References to Written Documentation:
SonicMQ API reference