MCPcopy
hub / github.com/nats-io/nats.go / FetchMinAckPending

Function FetchMinAckPending

jetstream/jetstream_options.go:482–490  ·  view source on GitHub ↗

FetchMinAckPending sets the minimum number of pending acks that should be present for a consumer with PriorityPolicyOverflow to be considered for delivery. If provided, FetchPriorityGroup must be set as well and the consumer has to have PriorityPolicy set to PriorityPolicyOverflow.

(min int64)

Source from the content-addressed store, hash-verified

480// delivery. If provided, FetchPriorityGroup must be set as well and the consumer
481// has to have PriorityPolicy set to PriorityPolicyOverflow.
482func FetchMinAckPending(min int64) FetchOpt {
483 return func(req *pullRequest) error {
484 if min < 1 {
485 return fmt.Errorf("%w: min ack pending should be more than 0", ErrInvalidOption)
486 }
487 req.MinAckPending = min
488 return nil
489 }
490}
491
492// FetchPrioritized sets the priority used when sending fetch requests for consumer with
493// PriorityPolicyPrioritized. Lower values indicate higher priority (0 is the

Callers 1

TestConsumerOverflowFunction · 0.92

Calls 1

ErrorfMethod · 0.80

Tested by 1

TestConsumerOverflowFunction · 0.74