-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace admin client with confluent-kafka one
This change replaces all Kafka admin client usages with a new implementation, based on confluent-kafka-python's `AdminClient`, aiming to keep the same interface as much as possible for the time being. The goal is not to completely remove kafka-python as a dependency, rather take a step towards that. The kafka-python library is still widely used in the codebase, eg. for error handling (even in the new `KafkaAdminClient`). The new `KafkaAdminClient` takes the place of all previous admin clients used, thus not specific to the REST proxy anymore. Hence it's move to a new module as `karapace.kafka_admin.KafkaAdminClient`, which also consolidates all references to the `confluent_kafka` lib. The test suite has also been moved and expanded. Wherever possible the same interface was kept, only adding new methods to simplify client code (to a minimal extent). This is most notable in tests and the backups functionality. The new admin client aims to hide away confluent-kafka-python's Future-based async client approach by providing wrapper methods that resolve these futures. Typing (issues) from `confluent_kafka` are ignored for now, no typing stubs have been added on purpose. Resources: * confluent-kafka-python documentation: https://docs.confluent.io/platform/current/clients/confluent-kafka-python/html/index.html# * librdkafka configuration documentation: https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md
- Loading branch information
Mátyás Kuti
committed
Nov 8, 2023
1 parent
c05b328
commit f7c6063
Showing
24 changed files
with
595 additions
and
471 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.