WithMsgTTL sets per msg TTL. Requires [StreamConfig.AllowMsgTTL] to be enabled.
(dur time.Duration)
| 610 | // WithMsgTTL sets per msg TTL. |
| 611 | // Requires [StreamConfig.AllowMsgTTL] to be enabled. |
| 612 | func WithMsgTTL(dur time.Duration) PublishOpt { |
| 613 | return func(opts *pubOpts) error { |
| 614 | opts.ttl = dur |
| 615 | return nil |
| 616 | } |
| 617 | } |
| 618 | |
| 619 | // WithExpectStream sets the expected stream the message should be published to. |
| 620 | // If the message is published to a different stream server will reject the |
no outgoing calls