PullMaxMessagesWithBytesLimit limits the number of messages to be buffered in the client. Additionally, it sets the maximum size a single fetch request can have. Note that this will not limit the total size of messages buffered in the client, but rather can serve as a way to limit what nats server w
(maxMessages, byteLimit int)
| 170 | // PullMaxMessagesWithBytesLimit implements both PullConsumeOpt and |
| 171 | // PullMessagesOpt, allowing it to configure Consumer.Consume and Consumer.Messages. |
| 172 | func PullMaxMessagesWithBytesLimit(maxMessages, byteLimit int) pullMaxMessagesWithBytesLimit { |
| 173 | return pullMaxMessagesWithBytesLimit{maxMessages, byteLimit} |
| 174 | } |
| 175 | |
| 176 | func (m pullMaxMessagesWithBytesLimit) configureConsume(opts *consumeOpts) error { |
| 177 | if m.maxMessages <= 0 { |
no outgoing calls