WithExpectLastMsgID sets the expected message ID the last message on a stream should have. If the last message has a different message ID server will reject the message and publish will fail.
(id string)
| 666 | // should have. If the last message has a different message ID server will |
| 667 | // reject the message and publish will fail. |
| 668 | func WithExpectLastMsgID(id string) PublishOpt { |
| 669 | return func(opts *pubOpts) error { |
| 670 | opts.lastMsgID = id |
| 671 | return nil |
| 672 | } |
| 673 | } |
| 674 | |
| 675 | // WithRetryWait sets the retry wait time when ErrNoResponders is encountered. |
| 676 | // Defaults to 250ms. |
no outgoing calls