github dunglas/mercure v0.23.2

11 hours ago

This patch release makes rolling updates non-disruptive for production Mercure deployments: SSE subscribers now drain naturally on hub shutdown, the bundled Helm chart ships SSE-friendly rolling-update defaults out of the box, and a subtle BoltDB race that could leak post-subscribe events into the Last-Event-ID header is fixed.

🐛 Bug Fixes

  • Shutdown: Drain SSE subscribers naturally on hub shutdown — the subscriber loop no longer reacts to the hub's context cancellation, so rolling replicas, graceful reloads, or SIGTERMs no longer close all active SSE connections at once. Existing connections keep running until the client disconnects or the per-connection write_timeout fires, letting k8s terminationGracePeriodSeconds bound the drain instead of producing a synchronized reconnect storm by @dunglas in #1212
  • Helm: Ship SSE-friendly rolling-update defaults on the Deployment — maxSurge=1 / maxUnavailable=0 (one pod at a time, no capacity drop), minReadySeconds=30 (quiet window for new pods to warm up), and terminationGracePeriodSeconds=660 (aligned with the default write_timeout plus margin, so #1212's graceful drain has time to complete before SIGKILL) by @dunglas in #1213
  • BoltDB: Stop leaking post-subscribe events into the Last-Event-ID response header — dispatchHistory now checks pastSeqBound before updating the response ID, and the bound uses a strict > comparison so empty-bucket subscribes no longer treat every subsequent write as history. Also fixes the flaky TestUnknownLastEventIDEmptyHistory on main by @dunglas in #1215

These rolling-update improvements are also available to Mercure Cloud and Mercure Enterprise customers out of the box — with scale-tested Redis, Kafka, Pulsar, and Postgres transports, a managed SLA, and priority support. Contact contact@mercure.rocks for the managed cloud offering, on-premise licenses, custom development, consulting, and training.

Full Changelog: v0.23.1...v0.23.2

Don't miss a new mercure release

NewReleases is sending notifications on new releases.