Skip to content

Commit

Permalink
Add missing SSL config to kafka admin clients
Browse files Browse the repository at this point in the history
  • Loading branch information
ppcad committed Nov 21, 2024
1 parent 56cf412 commit 5d35711
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions logprep/connector/confluent_kafka/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ def _admin(self) -> AdminClient:
confluent_kafka admin client object
"""
admin_config = {"bootstrap.servers": self._config.kafka_config["bootstrap.servers"]}
for key, value in self._config.kafka_config.items():
if key.startswith(("security.", "ssl.")):
admin_config[key] = value
return AdminClient(admin_config)

@cached_property
Expand Down
3 changes: 3 additions & 0 deletions logprep/connector/confluent_kafka/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ def _admin(self) -> AdminClient:
confluent_kafka admin client object
"""
admin_config = {"bootstrap.servers": self._config.kafka_config["bootstrap.servers"]}
for key, value in self._config.kafka_config.items():
if key.startswith(("security.", "ssl.")):
admin_config[key] = value
return AdminClient(admin_config)

@cached_property
Expand Down

0 comments on commit 5d35711

Please sign in to comment.