ttl
Sets the time-to-live (TTL) in Message Persistence. If shouldStore = true, and ttl = 0, the message is stored with no expiry time. If shouldStore = true and ttl = X (X is an Integer value), the message is stored with an expiry time of X hours. If shouldStore = false, the ttl parameter is ignored. If ttl is not specified, then expiration of the message defaults back to the expiry value for the key.
Return
The current instance of PublishBuilder for method chaining.
Parameters
ttl
The TTL value in minutes for the message.