Open ht-jo opened 5 years ago
@krystianity is this something you want to support in the driver itself? As currently we are holding promises in memory and use consumer.pause() to stop listening to message to then await all ongoing promises before gracefully shutting down our process.
Sorry for the late response. I am not 100% certain, https://github.com/Blizzard/node-rdkafka/issues/5 but it looks like node-rdkafka's dispatcher threads should take care of this automatically, as long as your application receives callbacks.
Since sinek uses the HighLevelProducer you should only make sure that your produce acknowledgement settings allow for acks.
Hello.
I'm wondering of how to terminate a consumer gracefully, for instance,
syncEvent
is still running, butconsumer.close()
has called.I couldn't find what waits for running tasks until finishing below code.
https://github.com/nodefluent/node-sinek/blob/462738c7e504995e8ab006513da0af174172b4c9/lib/librdkafka/NConsumer.js#L962-L981
Is there any code of termination gracefully in rdkafka or something else? Or does it just let them terminate without graceful termination? or would I implement code that clean the resources before shutdown for myself?
Thank you!