Open bgedik opened 6 years ago
flush()
raises an exception only when it cannot complete all pending futures. But completion here also includes assigning an exception to the future, which can itself be a KafkaTimeoutError. This simply means that the send timed out internally before hitting your flush timeout. I hope that makes sense!
I understand that, but in this case the timeout was violated. The future took more than the timeout given to the flush() to fail. I'll double check that and get back to you. I still think there is a problem.
Any update on this? Without an exception it basically means I have to switch to synchronous sending, or parse the logs to actually know how many messages were not delivered.
Both ugly workarounds.
I am getting the following warning from the flush() method of KafkaProducer, yet the API documentation says it will throw an exception.
kafka.producer.record_accumulator|await_flush_completion|WARNING|KafkaTimeoutError: Batch for TopicPartition(topic='unscrambl_test_topic', partition=0) containing 1 record(s) expired: 30 seconds have passed since last append