Closed veqryn closed 6 years ago
there's an example producer in bin/kafka_producer.pl
. I'm not sure if that's the reason in your case, but before exiting script must wait till all messages will be actually sent to kafka, note that sleep 1 while $kafka->outq_len;
in example.
Thanks. Adding that made it work.
# Sleep 10 milliseconds while waiting to send to kafka
usleep(10000) while $kafka_producer->outq_len;
I have a perl producer that looks like the following:
The process exits successfully, and says that it produced the messages. However, the messages never show up in kafka (I've tested both with my own consumer, and a kafkacat consumer).
The output with the debug flag is:
Your docs have good examples for how to create a consumer (which worked for me, thanks!), but there aren't any examples of producers. Is there something I'm missing? thank you...