github centrifugal/centrifugo v6.2.0

latest releases: v6.3.0, v6.2.5, v6.2.4...
4 months ago

Centrifugo is an open-source scalable real-time messaging server. Centrifugo can instantly deliver messages to application online users connected over supported transports (WebSocket, HTTP-streaming, Server-Sent Events (SSE/EventSource), GRPC, WebTransport). Centrifugo has the concept of a channel – so it's a user-facing PUB/SUB server.

Centrifugo is language-agnostic and can be used to build chat apps, live comments, multiplayer games, real-time data visualizations, collaborative tools, etc. in combination with any backend. It is well suited for modern architectures and allows decoupling the business logic from the real-time transport layer.

Several official client SDKs for browser and mobile development wrap the bidirectional protocol. In addition, Centrifugo supports a unidirectional approach for simple use cases with no SDK dependency.

For details, go to the Centrifugo documentation site.

What's changed

Improvements

  • Added five new built-in async consumers in #968. We believe having them in Centrifugo can drastically simplify introducing real-time messages in existing systems, built on modern cloud infrastructures. In addition to Kafka and PostgreSQL outbox table, Centrifugo now has consumers from the following popular messaging systems:
  • Skip unordered publications at the Broker level based on version and version_epoch fields #971. See updated publish and broadcast API docs. Note, this is mostly useful for a scenario, when each channel publication has the entire state instead of incremental updates – so skipping intermediate publications is safe and beneficial (especially given Centrifugo now has more built-in asynchronous consumers, and some of them can not provide ordered processing).
  • Added support for specifying the API command method in messages consumed by asynchronous consumers via a header, property, or attribute. When this is provided, the message payload must be a serialized API request object (as used in the server HTTP API). The exact mechanism is consumer-specific. For example, the Kafka consumer supports a centrifugo-method header, which can be set to values like publish, broadcast, or send_push_notification (and so on), allowing the message payload to be a JSON API request. This approach improves decoding efficiency and may open a road for using binary encoded command requests in the future.
  • New configdoc CLI helper to display the full Centrifugo configuration as HTML or Markdown #959 — run centrifugo configdoc to see it in action.
  • Added support for tags in publications from the Nats broker #964.
  • Handle optional alg field in JWKS #962, resolves #961.
  • Log whether FIPS mode is enabled during Centrifugo startup #975. See FIPS 140-3 Compliance document (part of Go 1.24 release).
  • Performance: Removed allocation during WebSocket subprotocol selection upon Upgrade centrifugal/centrifuge#476.
  • Performance: Slightly improving client queue processing by fetching messages in batch instead of one-by-one.

Fixes

  • Fixed concurrent map iteration and write panic occurring during Redis issues centrifugal/centrifuge#473.
  • Fixed unmarshalling of duration type from environment variable JSON #973.
  • Fixed an issue where channel_replacements were not applied when publishing to a channel via the Centrifugo API in NATS Raw Mode. See #977.

New tutorial in blog

To support the changes in this release, we published a new blog post: Building a real-time WebSocket leaderboard with Centrifugo and Redis.

In the tutorial, we create a real-time WebSocket leaderboard using Centrifugo, Redis, React and some Python. Showing the usage of Centrifugo built-in asynchronous consumer from Redis Stream and using version/version_epoch fields for dropping non-actual data on Centrifugo side. The post additionally showcases Centrifugo Fossil delta compression support and cache recovery mode.

Miscellaneous

  • New animation on https://centrifugal.dev/ – with burstable bubbles upon click, your kids will love it 🙃
  • Cleanup in api.proto — removed messages related to the legacy HTTP API.
  • This release is built with Go 1.24.2.
  • See also the corresponding Centrifugo PRO release.

Don't miss a new centrifugo release

NewReleases is sending notifications on new releases.