Skip to content

Commit a485245

Browse files
committed
fix consumer config parser confluent_kafka/avro/__init__.py
1 parent 88de548 commit a485245

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

confluent_kafka/avro/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,13 @@ class AvroConsumer(Consumer):
103103
def __init__(self, config, schema_registry=None):
104104

105105
sr_conf = {key.replace("schema.registry.", ""): value
106-
for key, value in config.items() if key.startswith("schema.registry.") or key.startswith("sasl")}
106+
for key, value in config.items() if key.startswith("schema.registry.")}
107+
108+
if config.get("schema.registry.basic.auth.credentials.source") == 'SASL_INHERIT':
109+
sr_conf['sasl.mechanisms'] = config.get('sasl.mechanisms', '')
110+
sr_conf['sasl.username'] = config.get('sasl.username', '')
111+
sr_conf['sasl.password'] = config.get('sasl.password', '')
112+
107113
ap_conf = {key: value
108114
for key, value in config.items() if not key.startswith("schema.registry")}
109115

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy