You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Philip Nee (Jira)" <ji...@apache.org> on 2023/12/28 04:08:00 UTC

[jira] [Resolved] (KAFKA-15948) Refactor AsyncKafkaConsumer shutdown

     [ https://issues.apache.org/jira/browse/KAFKA-15948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Philip Nee resolved KAFKA-15948.
--------------------------------
      Assignee: Philip Nee  (was: Phuc Hong Tran)
    Resolution: Fixed

> Refactor AsyncKafkaConsumer shutdown
> ------------------------------------
>
>                 Key: KAFKA-15948
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15948
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients, consumer
>            Reporter: Philip Nee
>            Assignee: Philip Nee
>            Priority: Major
>              Labels: consumer-threading-refactor
>             Fix For: 3.8.0
>
>
> Upon closing we need a round trip from the network thread to the application thread and then back to the network thread to complete the callback invocation.  Currently, we don't have any of that.  I think we need to refactor our closing mechanism.  There are a few points to the refactor:
>  # The network thread should know if there's a custom user callback to trigger or not.  If there is, it should wait for the callback completion to send a leave group.  If not, it should proceed with the shutdown.
>  # The application thread sends a closing signal to the network thread and continuously polls the background event handler until time runs out.
>  



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