github centrifugal/centrifuge-js 3.0.0

latest releases: 5.2.2, 5.2.1, 5.2.0...
2 years ago

Breaking changes

This release adopts a new iteration of Centrifugal protocol and a new iteration of API. Client now behaves according to the client SDK API specification. The work has been done according to Centrifugo v4 roadmap.

Check out Centrifugo v4 release post that covers the reasoning behind changes here.

New release only works with Centrifugo >= v4.0.0 and Centrifuge >= 0.25.0. See Centrifugo v4 migration guide for details about the changes in the ecosystem.

Note, that Centrifugo v4 supports clients working over the previous protocol iteration, so you can update Centrifugo to v4 without any changes on the client side (but you need to turn on use_client_protocol_v1_by_default option in the configuration of Centrifugo, see Centrifugo v4 migration guide for details).

Release notes:

  • new API according to the new SDK API specification
  • client migrated to Typescript, all public API is strictly typed, including EventEmitter callbacks
  • SockJS is now DEPRECATED in Centrifugal ecosystem and requires explicit configuration, see the library readme
  • introducing our own WebSocket emulation layer - based on HTTP-streaming and SSE (Eventsource) fallbacks
  • experimental WebTransport support (only works with Centrifugo v4 experimental HTTP/3 support)
  • optimistic subscriptions to reduce connect latency
  • redesigned PING-PONG (pings are only sent from server to client now)
  • resilient subscriptions which handle temporary server errors and re-subscribe (with full jitter backoff)

Don't miss a new centrifuge-js release

NewReleases is sending notifications on new releases.