tabular-io / iceberg-kafka-connect

Apache License 2.0
192 stars 41 forks source link

Rely on consumer group for leader election #113

Closed bryanck closed 11 months ago

bryanck commented 11 months ago

This PR changes the leader election logic so it relies on Connect's consumer group. Previously, the leader (coordinator) was selected based on the task that was assigned partition 0 of the first topic, however this required defining a static list of topics in the topics property and did not work when using topics.regex.

This PR also uses the Connect consumer group to determine the membership count, which is used to check when a commit is ready to proceed. Previously this was determined by comparing the total partition count for the topics defined, which also required a static list of topics.