lucasbru commented on code in PR #15525: URL: https://github.com/apache/kafka/pull/15525#discussion_r1540879732
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ListOffsetsEvent.java: ########## @@ -25,22 +25,15 @@ import java.util.Map; /** - * Event for retrieving partition offsets by performing a + * Application Event for retrieving partition offsets by performing a * {@link org.apache.kafka.common.requests.ListOffsetsRequest ListOffsetsRequest}. - * This event is created with a map of {@link TopicPartition} and target timestamps to search - * offsets for. It is completed with the map of {@link TopicPartition} and - * {@link OffsetAndTimestamp} found (offset of the first message whose timestamp is greater than - * or equals to the target timestamp) */ -public class ListOffsetsEvent extends CompletableApplicationEvent<Map<TopicPartition, OffsetAndTimestamp>> { - +public class ListOffsetsEvent extends CompletableApplicationEvent<Map<TopicPartition, Long>> { Review Comment: I'm personally not concerned about having two events, because they are very simple. The alternative is to have a common code-path that carries a `requiresTimestamp` boolean to differentiate behavior again, which isn't really any simpler. But I agree there is a certain amount of code duplication here that we could eliminate using your approach @lianetm , so I'm not against it. -- 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