Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kafka consumer - NoBrokersAvailable: NoBrokersAvailable #2281

Open
vikasprasad26 opened this issue Nov 29, 2021 · 0 comments
Open

kafka consumer - NoBrokersAvailable: NoBrokersAvailable #2281

vikasprasad26 opened this issue Nov 29, 2021 · 0 comments

Comments

@vikasprasad26
Copy link

I have been struggling with this issue of No Brokers available while using kafka consumer with below mentioned configuration (kafka-python version 2.0.2).
consumer = KafkaConsumer(
'my-topic',
group_id='my-group',
bootstrap_servers=['host1:port1','host2:port2','host3:port3','host4:port4'],
auto_offset_reset='earliest',
enable_auto_commit=False,
value_deserializer=lambda x: x.decode('utf-8'),
max_poll_interval_ms=9000000,
max_poll_records=50,
sasl_mechanism='SCRAM-SHA-256',
sasl_plain_username=kafka_username,
sasl_plain_password=kafka_password,
security_protocol='SASL_SSL',
ssl_check_hostname=False,
ssl_cafile='root-ca.crt,
)

I have tried adding api_version = (2,0,2) in the config parameters, but issue is not resolved even after that.
since, consumer.bootstrap_connected() value is coming as False

@dpkp @mumrah and others, please have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant