Aditya Kousik created KAFKA-21271:
-------------------------------------
Summary: Use RebalanceConsumer in WorkerSinkTask rebalance
callbacks
Key: KAFKA-21271
URL: https://issues.apache.org/jira/browse/KAFKA-21271
Project: Kafka
Issue Type: Improvement
Components: clients, connect, consumer
Reporter: Aditya Kousik
Assignee: Aditya Kousik
[KIP-1306|https://cwiki.apache.org/confluence/spaces/KAFKA/pages/406623733/KIP-1306+Extend+ConsumerRebalanceListener+with+Consumer-Aware+methods]
added {{RebalanceListener}}, whose callbacks receive a {{RebalanceConsumer}}:
a restricted view of the consumer that only allows operations that are safe
during a rebalance.
KAFKA-20684 moved {{WorkerSinkTask}}'s rebalance handling onto
{{RebalanceListener}}, but it still ignores the {{RebalanceConsumer}} and uses
the task's own consumer. Connector code that runs during the rebalance
({{SinkTask.open()}} and {{close()}}) also reaches the consumer directly
through {{WorkerSinkTaskContext}}.
Connect should use the {{RebalanceConsumer}} for everything it does during a
rebalance
--
This message was sent by Atlassian Jira
(v8.20.10#820010)