-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kgo: add option to consume preferring laggy partitions
This adds three new APIs: func ConsumePreferringLagFn(fn PreferLagFn) ConsumerOpt type PreferLagFn func(lag map[string]map[int32]int64, torderPrior []string, porderPrior map[string][]int32) ([]string, map[string][]int32) func PreferLagAt(preferLagAt int64) PreferLagFn These functions allow an end user to adjust the order of partitions that are being fetched. Ideally, an end user will only need: kgo.ConsumePreferringLagFn(kgo.PreferLagAt(50)) But, PreferLagFn exists to allow for more advanced use cases. Closes #222
- Loading branch information
Showing
3 changed files
with
209 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters