WebLogic Messaging API Class Library |

# IMessageProducer.TimeToLive Property

Gets or Sets the default length of time in milliseconds relative to its dispatch time that a produced message should be retained by the message system as a `long`.

Time to live is set to zero by default.

TimeToLive {get; set;}

#### Property Value

Represents the message time to live in milliseconds; zero is unlimited

#### Exceptions

Exception Type | Condition
--- | ---
MessageException | if JMS fails to get or set the time to live due to some internal error.

#### See Also

IMessageProducer Interface | WebLogic.Messaging Namespace | IMessage.JMSExpiration | Constants.Defaults.DEFAULT_TIME_TO_LIVE