AndrewJSchofield commented on code in PR #16885: URL: https://github.com/apache/kafka/pull/16885#discussion_r1742248839
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/CheckAndUpdatePositions.java: ########## @@ -17,14 +17,19 @@ package org.apache.kafka.clients.consumer.internals.events; +import org.apache.kafka.clients.consumer.internals.SubscriptionState; + /** - * Event for resetting offsets for all assigned partitions that require it. This is an - * asynchronous event that generates ListOffsets requests, and completes by updating in-memory - * positions when responses are received. + * Event to check if all assigned partitions have fetch positions. If there are positions missing, it will fetch + * offsets and update positions when it gets them. This will first attempt to use the committed offsets if available. If + * no committed offsets available, it will use the partition offsets retrieved from the leader. + * <p/> + * The event completes with a boolean indicating if all assigned partitions have valid fetch positions + * (based on {@link SubscriptionState#hasAllFetchPositions()}). */ -public class ResetPositionsEvent extends CompletableApplicationEvent<Void> { +public class CheckAndUpdatePositions extends CompletableApplicationEvent<Boolean> { - public ResetPositionsEvent(final long deadlineMs) { - super(Type.RESET_POSITIONS, deadlineMs); + public CheckAndUpdatePositions(long deadlineMs) { Review Comment: They are all events, so `CheckAndUpdatePositionsEvent`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org