Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-16816

Remove unneeded FencedInstanceId support on commit path for new consumer

    XMLWordPrintableJSON

Details

    Description

      The new consumer contains logic related to handling FencedInstanceId exception received as a response to an OffsetCommit request (on the consumer and commit manager), 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:

      1. empty group -> commit succeeds, fencing an instance id would never happen because group is empty
      2. 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.

      Attachments

        Activity

          People

            lianetm Lianet Magrans
            lianetm Lianet Magrans
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: