FetchMinPending sets the minimum number of messages that should be pending 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)
| 466 | // If provided, FetchPriorityGroup must be set as well and the consumer has to have |
| 467 | // PriorityPolicy set to PriorityPolicyOverflow. |
| 468 | func FetchMinPending(min int64) FetchOpt { |
| 469 | return func(req *pullRequest) error { |
| 470 | if min < 1 { |
| 471 | return fmt.Errorf("%w: min pending should be more than 0", ErrInvalidOption) |
| 472 | } |
| 473 | req.MinPending = min |
| 474 | return nil |
| 475 | } |
| 476 | } |
| 477 | |
| 478 | // FetchMinAckPending sets the minimum number of pending acks that should be |
| 479 | // present for a consumer with PriorityPolicyOverflow to be considered for |