Skip to content
This repository was archived by the owner on Oct 19, 2025. It is now read-only.
This repository was archived by the owner on Oct 19, 2025. It is now read-only.

Gracefully shutdown #136

@ht-jo

Description

@ht-jo

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.

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions