Skip to content
All news
ReleaseAI-written

NestJS 12.5.1 adds root module metadata and graceful shutdown for microservices

NestJS 12.5.1 introduces root‑module metadata handling in @nestjs/core, adds graceful shutdown hooks for RabbitMQ, TCP, MQTT, Redis and NATS in @nestjs/microservices, and improves Kafka handling by decoding repeated header values and stopping connection attempts after client closure.

NestJS 12.5.1 was released on 2026‑11‑16. The release adds root‑module metadata support in the core package and expands microservice shutdown handling. It also includes several bug fixes and documentation updates.

The @nestjs/core package now accepts module metadata as the root module, implementing feature #18523. This change allows developers to define metadata directly on the root module without a separate wrapper. In the @nestjs/common package, the parse-date pipe rejects dates that extend beyond the end of their month, addressing fix #18515.

The @nestjs/platform-node package renders Nunjucks views through a Nunjucks Environment, fixing issue #18509. Documentation for the common package corrects the default breakLength of the console logger (docs #18508), and documentation across many packages now uses absolute links for translated guides and the license (docs #18503). These documentation changes improve consistency for international users.

In @nestjs/microservices, each value of a repeated Kafka header is now decoded (fix #18521) and a Kafka connection attempt stops once the client is closed (fix #18512). The same package adds graceful shutdown hooks for RabbitMQ (feat #18525), TCP (feat #18514), MQTT (feat #18513), and both Redis and NATS servers (feat #18505). The shutdown hooks ensure that server resources are released cleanly during application termination.

  • The release lists eight committers, including Abderrahmane Messaadi and BillW Gong.