mod_event_kafka
mod_event_kafka copied to clipboard
detecting connection failures in producer
Description
Hi, mod_event_kafka is not able to detect connection failures while setting up a producer. I only see errors when I reload the module.
How to reproduce
Run simply producer passing an incorrect broker address. No error is reported while creating the rdkafka object or topic.
librdkafka version (release number or git tag): v2.1.1 Operating system: ubuntu 16.04 Freeswitch: 1.6
Thanks,
I also don't see any error when I try to connect to a non existing Kafka server
Actually, the official clients also talks about the same. https://github.com/confluentinc/librdkafka/issues/2062
Kafka isn't a simple connect and failure, if there are intermittent failures, those would be buffered, and the system will keep retrying to connect. You can try reducing the buffer-size
to very small, and then it should throw the appropriate error almost immediately in your logs.