rdkafka-ruby icon indicating copy to clipboard operation
rdkafka-ruby copied to clipboard

Questions about Producer termination sequence

Open caspg opened this issue 3 years ago • 0 comments

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

caspg avatar Jul 21 '21 14:07 caspg