-
Notifications
You must be signed in to change notification settings - Fork 922
Closed
Description
Description
Consumer poll method raise a TypeError instead of KafkaError when broker is down
How to reproduce
- Just use this example script : https://github.com/confluentinc/confluent-kafka-python/blob/master/examples/avro_consumer.py
- Stop the broker while script is running
- See the TypeError (may not appear every time, just start&stop again)
Traceback (most recent call last):
File "avro_consumer.py", line 126, in <module>
main(parser.parse_args())
File "avro_consumer.py", line 96, in main
msg = consumer.poll(1.0)
File "/home/ddemougin/.local/lib/python3.7/site-packages/confluent_kafka/deserializing_consumer.py", line 131, in poll
raise ConsumeError(msg.error(), message=msg)
File "/home/ddemougin/.local/lib/python3.7/site-packages/confluent_kafka/error.py", line 44, in __init__
kafka_error = KafkaError(error_code)
TypeError: an integer is required (got type cimpl.KafkaError)
Checklist
Please provide the following information:
- confluent-kafka-python and librdkafka version (
confluent_kafka.version()
andconfluent_kafka.libversion()
):
confluent-kafka-python version : ('1.4.1', 17039616) and librdkafka version : ('1.4.0', 17039615) - Apache Kafka broker version:
5.1.4, run asconfluentinc/cp-kafka:5.1.4
docker container. - Client configuration:
{...}
- Operating system:
debian 10.4 - Provide client logs (with
'debug': '..'
as necessary) :
Traceback (most recent call last):
File "avro_consumer.py", line 126, in <module>
main(parser.parse_args())
File "avro_consumer.py", line 96, in main
msg = consumer.poll(1.0)
File "/home/ddemougin/.local/lib/python3.7/site-packages/confluent_kafka/deserializing_consumer.py", line 131, in poll
raise ConsumeError(msg.error(), message=msg)
File "/home/ddemougin/.local/lib/python3.7/site-packages/confluent_kafka/error.py", line 44, in __init__
kafka_error = KafkaError(error_code)
TypeError: an integer is required (got type cimpl.KafkaError)
- Provide broker log excerpts
- Critical issue
Metadata
Metadata
Assignees
Labels
No labels