This repository was archived by the owner on Oct 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
This repository was archived by the owner on Oct 19, 2025. It is now read-only.
Gracefully shutdown #136
Copy link
Copy link
Open
Description
Hello.
I'm wondering of how to terminate a consumer gracefully, for instance, syncEvent is still running, but consumer.close() has called.
I couldn't find what waits for running tasks until finishing below code.
node-sinek/lib/librdkafka/NConsumer.js
Lines 962 to 981 in 462738c
| close(commit = false) { | |
| this.haltAnalytics(); | |
| if (this.consumer) { | |
| this._inClosing = true; | |
| this._resume = false; //abort any running recursive consumption | |
| if(!commit){ | |
| this.consumer.disconnect(); | |
| //this.consumer = null; | |
| } else { | |
| this.consumer.commit(); | |
| this.config.logger.info("Committing on close."); | |
| process.nextTick(() => { | |
| this.consumer.disconnect(); | |
| //this.consumer = null; | |
| }); | |
| } | |
| } | |
| } |
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!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels