You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Specifying a Python list for config bootstrap.servers fails silently with no errors or indications #711
code:pythonIssues that are specific to Python or versions of Python independent of library logicenhancementRequesting a feature changegood first issueHelpful tag for inviting new users to contributeinvestigate furtherIt's unclear what the issue is at this time but there is enough interest to look into itsize:smallMaintainer triage tag for indicating change required is particularly smallstatus:plannedPlanned for implementation on our roadmap
The configuration key bootstrap.servers implies that multiple servers can be specified, but it is not explicitly defined what this key's value should be. It appears that only a string using comma separation is allowed for this config key. If a Python list is given, no explicit error or feedback is given to indicate this is not valid. Instead, calls to consumer.poll() or other broker-bound functions simply block and never succeed.
Ideally, a Python list (e.g. ["broker1", "broker2"]) should be valid; or at the very least, constructing the Consumer should throw a runtime/configuration exception.
How to reproduce
Simply specify a Python list as the value for bootstrap.servers in the config given to the Consumer.
conf= {
'bootstrap.servers': ['kafkabroker1:9092', 'kafkabroker2:9092'],
...
}
c=Consumer(conf)
whileTrue:
c.poll(1) # this will never produce a message due to the Python list specified above as the bootstrap.servers value
Checklist
Please provide the following information:
confluent-kafka-python and librdkafka version (confluent_kafka.version() and confluent_kafka.libversion()):
Hi, I'd like to work on this issue. I'm currently building a Kafka-based real-time analytics pipeline using confluent-kafka-python and hit this exact silent failure behaviour. I plan to implement automatic list-to-CSV conversion in the config validation layer. Is this still available to work on?
Hi, I have a working implementation of this ready: list and tuple values for string config properties are joined to CSV in the shared config setup path, with a TypeError for None or nested items, plus brokerless tests. I noticed ojas4414 mentioned planning to work on this earlier this year; I could not find a PR, so I will open one shortly. Happy to coordinate if it duplicates effort.
code:pythonIssues that are specific to Python or versions of Python independent of library logicenhancementRequesting a feature changegood first issueHelpful tag for inviting new users to contributeinvestigate furtherIt's unclear what the issue is at this time but there is enough interest to look into itsize:smallMaintainer triage tag for indicating change required is particularly smallstatus:plannedPlanned for implementation on our roadmap
Activity
edenhill commentedon Oct 29, 2019
This is a good idea, we should allow lists for config variables and automatically translate to CSV.
kyrsideris commentedon Dec 17, 2019
I felt on the same bug today. The problem is that the raised exception is misleading. In my case that was:
Test file:
./test_consumer_config.pyRun:
DachuanZhao commentedon Aug 14, 2020
any processing ?
llirrikk commentedon Aug 4, 2023
According to the official documentation: https://docs.confluent.io/kafka-clients/python/current/overview.html#ak-consumer
multiple servers can be specified in the following format:
host1:9092,host2:9092sergeykad commentedon Feb 6, 2024
Thanks Kirill Kulikov (@llirrikk) . I searched how to do it here, but there is no mention of it.
ojas4414 commentedon May 27, 2026
Hi, I'd like to work on this issue. I'm currently building a Kafka-based real-time analytics pipeline using confluent-kafka-python and hit this exact silent failure behaviour. I plan to implement automatic list-to-CSV conversion in the config validation layer. Is this still available to work on?
chickenfeetbatman commentedon Nov 4, 2026
Hi, I have a working implementation of this ready: list and tuple values for string config properties are joined to CSV in the shared config setup path, with a TypeError for None or nested items, plus brokerless tests. I noticed ojas4414 mentioned planning to work on this earlier this year; I could not find a PR, so I will open one shortly. Happy to coordinate if it duplicates effort.