philipnee commented on code in PR #13380:
URL: https://github.com/apache/kafka/pull/13380#discussion_r1146979021
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -137,31 +166,21 @@ CompletableFuture<ClientResponse> sendAutoCommit(final
Map<TopicPartition, Offse
}
return null;
});
- return future;
- }
-
- public void clientPoll(final long currentTimeMs) {
- this.autoCommitState.ifPresent(t -> t.ack(currentTimeMs));
}
- // Visible for testing
- Queue<StagedCommit> stagedCommits() {
- return this.stagedCommits;
- }
- private class StagedCommit {
+ private class UnsentOffsetCommitRequest {
private final Map<TopicPartition, OffsetAndMetadata> offsets;
private final String groupId;
private final GroupState.Generation generation;
private final String groupInstanceId;
private final NetworkClientDelegate.FutureCompletionHandler future;
- public StagedCommit(final Map<TopicPartition, OffsetAndMetadata>
offsets,
- final String groupId,
- final String groupInstanceId,
- final GroupState.Generation generation) {
+ public UnsentOffsetCommitRequest(final Map<TopicPartition,
OffsetAndMetadata> offsets,
+ final String groupId,
+ final String groupInstanceId,
+ final GroupState.Generation
generation) {
this.offsets = offsets;
- // if no callback is provided, DefaultOffsetCommitCallback will be
used.
Review Comment:
I believe this was addressed in the last revision. See
PrototypeAsyncConsumer:
```
final OffsetCommitCallback commitCallback = callback == null ? new
DefaultOffsetCommitCallback() : callback;
future.whenComplete((r, t) -> { ... } });
```
But i'll add a test for this.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]