rdkafka-ruby
rdkafka-ruby copied to clipboard
Questions about Producer termination sequence
According to this doc the proper termination sequence for Producer is:
/* 1) Make sure all outstanding requests are transmitted and handled. */
rd_kafka_flush(rk, 60*1000); /* One minute timeout */
/* 2) Destroy the topic and handle objects */
rd_kafka_topic_destroy(rkt); /* Repeat for all topic objects held */
rd_kafka_destroy(rk);
In rdkafka-ruby
we are just calling rd_kafka_destroy
click. Are we not calling rd_kafka_flush
because of this condition in polling loop? Can we assume that all messages were delivered when calling producer#close
?
What about rd_kafka_topic_destroy
?
Thanks