WithPublishAsyncTimeout sets the timeout for async message publish. If not provided, timeout is disabled.
(dur time.Duration)
| 60 | // WithPublishAsyncTimeout sets the timeout for async message publish. |
| 61 | // If not provided, timeout is disabled. |
| 62 | func WithPublishAsyncTimeout(dur time.Duration) JetStreamOpt { |
| 63 | return func(opts *JetStreamOptions) error { |
| 64 | opts.publisherOpts.ackTimeout = dur |
| 65 | return nil |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | // WithDefaultTimeout sets the default timeout for JetStream API requests. |
| 70 | // It is used when context used for the request does not have a deadline set. |
no outgoing calls