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)
| 480 | // delivery. If provided, FetchPriorityGroup must be set as well and the consumer |
| 481 | // has to have PriorityPolicy set to PriorityPolicyOverflow. |
| 482 | func 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 |