Lianet Magrans created KAFKA-16816: -------------------------------------- Summary: Remove unneeded FencedInstanceId support on commit path for new consumer Key: KAFKA-16816 URL: https://issues.apache.org/jira/browse/KAFKA-16816 Project: Kafka Issue Type: Task Components: clients, consumer Reporter: Lianet Magrans
The new consumer contains logic related to handling FencedInstanceId exception received as a response to an OffsetCommit request (on the [consumer|https://github.com/apache/kafka/blob/028e7a06dcdca7d4dbeae83f2fce0a4120cc2753/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java#L776] and [commit manager|https://github.com/apache/kafka/blob/028e7a06dcdca7d4dbeae83f2fce0a4120cc2753/clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java#L715]), but with the new group protocol, we will never get that error on a commit response. We should remove the code that expects the FencedInstanceId on the commit response, and also clean up the other related usages that we added to propagate the FencedInstanceId exception on the poll, commitSync and commitAsync API. Note that throwing that exception is part of the contract of the poll, commitSync and commitAsync APIs of the KafkaConsumer, but it changes with the new protocol. We should update the java doc for the new AsyncKafkaConsumer to reflect the change. With the new protocol If a consumer tries to commit offsets, there could be 2 cases: # empty group -> commit succeeds, fencing an instance id would never happen because group is empty # non-empty group -> commit fails with UnknownMemberId, indicating that the member is not known to the group. The consumer needs to join the non-empty group in order to commit offsets to it. To complete the story, the moment the consumer attempts to join, it will receive an UnreleasedInstanceId error on the HB response, indicating it using a groupInstanceId that is already in use. -- This message was sent by Atlassian Jira (v8.20.10#820010)