Created
November 15, 2023 17:28
-
-
Save agavra/e05e2d58de7d6ce31c4d1c302ea03fac to your computer and use it in GitHub Desktop.
Snippet from ConsumerPartitionAssignor
This file contains hidden or 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
| public interface ConsumerPartitionAssignor { | |
| /** | |
| * Return serialized data that will be included in the {@link Subscription} sent to the leader | |
| * and can be leveraged in {@link #assign(Cluster, GroupSubscription)} ((e.g. local host/rack information) | |
| */ | |
| default ByteBuffer subscriptionUserData(Set<String> topics) { | |
| return null; | |
| } | |
| /** | |
| * Perform the group assignment given the member subscriptions and current cluster metadata. | |
| */ | |
| GroupAssignment assign(Cluster metadata, GroupSubscription groupSubscription); | |
| /** | |
| * Callback which is invoked when a group member receives its assignment from the leader. | |
| */ | |
| default void onAssignment(Assignment assignment, ConsumerGroupMetadata metadata) { | |
| } | |
| ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment