Kirk True created KAFKA-15696:
---------------------------------

             Summary: Revoke partitions on Consumer.close()
                 Key: KAFKA-15696
                 URL: https://issues.apache.org/jira/browse/KAFKA-15696
             Project: Kafka
          Issue Type: Sub-task
          Components: clients, consumer
            Reporter: Kirk True
            Assignee: Philip Nee


Upon closing of the {{Consumer}} we need to:
 # Complete pending commits
 # Revoke assignment (Note that the revocation involves stop fetching, 
committing offsets if auto-commit enabled and invoking the onPartitionsRevoked 
callback)
 # Send the last GroupConsumerHeartbeatRequest with epoch = -1 to leave the 
group (or -2 if static member)
 # Close any fetch sessions on the brokers
 # Poll the NetworkClient to complete pending I/O

There is a mechanism introduced in PR 
[14406|https://github.com/apache/kafka/pull/14406] that allows for performing 
network I/O on shutdown. The new method 
{{DefaultBackgroundThread.runAtClose()}} will be executed when 
{{Consumer.close()}} is invoked.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to