getJMSExpiration

 

public long getJMSExpiration() throws JMSException;

Gets the message's expiration value.

When a message is sent, expiration is left unassigned. After completion of the send method, it holds the expiration time of the message. This is the time-to-live value specified by the client added to the time (GMT) when the message was sent.

If the time-to-live is specified as zero, expiration is set to zero which indicates the message does not expire.

When a message's expiration time is reached, a provider will discard it. JMS does not define any form of notification of message expiration.

Clients should not receive messages that have expired, although JMS does not guarantee that this will not happen.

Returns

  • the time (GMT) when the message expires.

Exceptions

  • JMSException - if an internal error occurs.


uj26540_