Skip to content

Releases: centrifugal/centrifuge

v0.38.0

15 Nov 07:37
50793d7

Choose a tag to compare

What's Changed

New Features

  • Server-side publication filtering by tags, by @FZambia in #511.
    Added support for filtering publications on the server by specifying tag filters in subscription requests. This feature may significantly help with bandwidth optimization for real-time messaging applications, particularly in scenarios where clients would otherwise receive and discard a significant portion of messages in a channel anyway. Not only network costs may be reduced in this case, but also processing overhead which leads to a faster battery drain on mobile devices.
    See the example which shows stock tickers filtered server-side based on a client-supplied tags filter.
    For more insights, read the recent post in Centrifugal blog: Publication filtering by tags – reducing bandwidth with server-side stream filtering.

  • Experimental WebSocket over HTTP/2 (RFC 8441), by @FZambia in #519.
    Initial support for WebSocket over HTTP/2 following RFC 8441. In that case each WebSocket connection is a separate HTTP/2 stream inside a single HTTP/2 connection. The feature may be useful for reducing connection latency (avoid TLS handshake overhead) or to reduce the number of physical TCP connections in the infrastructure. Requires GODEBUG=http2xconnect=1 to be used (see golang/go#53208).
    Added new HTTP/2 examples that demonstrate the usage of feature and include demonstration of managing Centrifuge-based server behind Haproxy (which supports both RFC 8441 and HTTP/2 Cleartext for connection proxying).
    See additional notes about it in Centrifugo docs: WebSocket over HTTP/2 (RFC 8441).

  • Introduction of new official real-time SDK: centrifuge-csharp
    Early-stage rollout of our new official C# SDK, currently under active development. This will become our 7th officially maintained SDK in addition to Javascript, Go, Dart, Java, Swift and Python.
    Repository: https://github.com/centrifugal/centrifuge-csharp

  • SHA-1 generation offloading to Redis (for better FIPS compliance), by @FZambia in #522.
    Support for delegating SHA-1 generation to Redis for environments requiring FIPS compliance (without performance overhead, because the loading of SHA-1 is only done once on the start). See RedisBrokerConfig.LoadSHA1 and RedisPresenceManagerConfig.LoadSHA1.

  • Experimental channel compaction, part of #511 PR
    Some of our SDKs may now negotiate channel compaction feature - a way to reduce sending channels as full strings in the client protocol. If enabled on server side (see SubscribeOptions.AllowChannelCompaction) then channel gets a numeric ID and represented in a more compact form in the client protocol. In Protobuf protocol it may be just a varint (1-10 bytes in the wire) instead of let's say 40-60 bytes channel string (of course this depends on how long channel strings are in your specific use case). This may allow reducing bandwidth significantly in some setups. Now supported only by centrifuge-js SDK.

  • Metrics enhancements
    See MetricsConfig.ExposeTransportAcceptProtocol flag to enable resolution by transport underlying protocol (h1, h2). We extended TransportInfo interface with AcceptProtocol to support that.

Fixes & Maintenance

  • Deadlock prevention for single connections, by @FZambia in #515.
    Resolved a potential deadlock involving node.Disconnect and striking more often when maintaining single connection (this was originally reported to Centrifugo, here we had example for it, it's now updated).

  • CI lint updates and minor lint corrections, by @FZambia in #520.
    Improvements to continuous integration linting setup and corresponding fixes. Using golang-ci lint v2 now.

  • Dependency updates
    General dependency refresh across the project.


❯ gorelease -base v0.37.2 -version v0.38.0
# github.com/centrifugal/centrifuge
## incompatible changes
TransportInfo.AcceptProtocol: added
## compatible changes
MetricsConfig.ExposeTransportAcceptProtocol: added
RedisBrokerConfig.LoadSHA1: added
RedisPresenceManagerConfig.LoadSHA1: added
SubscribeOptions.AllowChannelCompaction: added
SubscribeOptions.AllowTagsFilter: added
TransportAcceptedLabels: added
WebsocketConfig.DisableHTTP1Upgrade: added

Full Changelog: v0.37.2...v0.38.0

v0.37.2

11 Sep 04:12
c2a3246

Choose a tag to compare

What's Changed

Full Changelog: v0.37.1...v0.37.2

v0.37.1

05 Sep 12:11
b2d5f6f

Choose a tag to compare

What's Changed

  • WebSocket frame ping/pong tweaks by @FZambia in #503
  • Client details: connection time, ping/pong latency by @FZambia in #504
  • Up dependencies
❯ gorelease -base v0.37.0 -version v0.37.1
# github.com/centrifugal/centrifuge
## compatible changes
(*Client).ConnectedAtMS: added
(*Client).LatestPingPongLatency: added

# summary
v0.37.1 is a valid semantic version for this release.

Full Changelog: v0.37.0...v0.37.1

v0.37.0

23 Jul 03:00
3d7e182

Choose a tag to compare

What's Changed

This release slightly changes the behaviour of the library by setting a max cap on TTL for connections and subscriptions (in #495). This happens internally and does not require changes in application's code. We expect this to not affect anyone since the max cap is large – one year. But making a new minor version bump to emphasise the change.

  • Fix duration overflow due to buggy exp, max ttl 1 year by @FZambia in #495
  • Make websocket package to not depend on centrifuge internal packages by @FZambia in #492
  • Avoid math/rand usage for ws client masking by @FZambia in #493
  • Method to get redis shard mode by @FZambia in #494
  • Adding recovered publications histogram (must be explicitly enabled via MetricsConfig), has_recovered_publications label for recover counter by @FZambia in #496
  • Up dependencies by @FZambia in #497
❯ gorelease -base=v0.36.2 -version=v0.37.0
# github.com/centrifugal/centrifuge
## compatible changes
(*RedisShard).Mode: added
MetricsConfig.EnableRecoveredPublicationsHistogram: added
RedisShardMode: added
RedisShardModeCluster: added
RedisShardModeSentinel: added
RedisShardModeStandalone: added

# summary
v0.37.0 is a valid semantic version for this release.

Full Changelog: v0.36.2...v0.37.0

v0.36.2

09 Jul 18:34
0033e3e

Choose a tag to compare

What's Changed

Full Changelog: v0.36.1...v0.36.2

v0.36.1

08 Jun 06:36
7e7d5a7

Choose a tag to compare

What's Changed

  • Refactor benchmark layout, remove non-actual examples by @FZambia in #482
  • Up dependencies

Full Changelog: v0.36.0...v0.36.1

v0.36.0

03 May 08:10
e582c1f

Choose a tag to compare

What's Changed

  • Add Controller interface by @FZambia in #467 - cross-node communication may be not a part of Broker now
  • Fix concurrent map iteration and write panic by @FZambia in #473 - the panic could happen during issues with Redis
  • Add FlushLatestPublication option for ChannelBatchConfig by @FZambia in #471 - this is nice to save bandwidth in channels where the loss of intermediary messages is acceptable and beneficial
  • Possibility to provide version and version epoch fields for publication by @FZambia in #472 - drop unordered messages on Centrifuge Broker level, can be useful in channels where the entire state is send in every Publication
  • Possibility to register custom client timer scheduler by @FZambia in #474
  • Remove one alloc on subprotocol selection by @FZambia in #476 - speed ups WebSocket upgrades a bit
  • Channel level batching: keep latest publication separate by @FZambia in #479 - makes per-channel batching more memory effective since Centrifuge only keeps latest publication in the intermediary buffer
  • Use base64.StdEncoding.AppendEncode in encodeAcceptKey by @FZambia in #481 - simplifies code a bit by using a new helper from Go std lib.
❯ gorelease -base v0.35.0 -version v0.36.0
# github.com/centrifugal/centrifuge
## incompatible changes
(*MemoryBroker).PublishControl: removed
(*MemoryBroker).Run: removed
(*RedisBroker).Run: removed
Broker.PublishControl: removed
Broker.RegisterBrokerEventHandler: added
Broker.Run: removed
BrokerEventHandler.HandleControl: removed
## compatible changes
(*MemoryBroker).RegisterBrokerEventHandler: added
(*Node).SetController: added
(*RedisBroker).RegisterBrokerEventHandler: added
(*RedisBroker).RegisterControlEventHandler: added
ChannelBatchConfig.FlushLatestPublication: added
Config.ClientTimerScheduler: added
ControlEventHandler: added
Controller: added
PublishOptions.Version: added
PublishOptions.VersionEpoch: added
TimerCanceler: added
TimerScheduler: added
WithVersion: added

# summary
v0.36.0 is a valid semantic version for this release.

Full Changelog: v0.35.0...v0.36.0

v0.35.0

21 Mar 17:57

Choose a tag to compare

What's Changed

  • Support rediss:// scheme in Redis address and autodetect Redis Cluster by @FZambia in #463. Modern cloud providers usually provide redis://host:port or rediss://host:port URLs to users, which may correspond to either standalone Redis or Redis Cluster under the hood. Things should now work out of the box for Centrifuge users when using this string as the Redis address, making Centrifuge Redis Broker more cloud-friendly.
  • Per channel writer for per channel batching by @FZambia in #466 - experimental API for joining messages on channel level. Enabling batching on channel level adds overhead since messages go through additional buffers for every connection. But at the same time in channels with many messages per second it can actually result into drastically reduced CPU usage since less syscalls are being made.
  • Up rueidis to v1.0.56, min Go version 1.23 by @FZambia in #468
❯ gorelease -base v0.34.4 -version v0.35.0
# github.com/centrifugal/centrifuge
## compatible changes
ChannelBatchConfig: added
Config.GetChannelBatchConfig: added

# summary
v0.35.0 is a valid semantic version for this release.

Full Changelog: v0.34.4...v0.35.0

v0.34.4

04 Mar 06:20

Choose a tag to compare

What's Changed

  • Cache preflight requests by @FZambia in #461 - this allows to reduce number of preflight requests in cross-origin bidirectional emulation scenarios for http_stream and emulation endpoints. Good to reduce total number of requests and get only one RTT instead of two. Cache value used is 300 seconds.
  • Return 204 instead of 200 for preflight requests
  • Document http.ResponseController usage in emulation transports
  • Downgrade rueidis to v1.0.53 to avoid auth errors when forcing RESP2 (should be fixed in the next rueidis version)

Full Changelog: v0.34.3...v0.34.4

v0.34.3

20 Feb 18:34
37f5699

Choose a tag to compare

What's Changed

  • Unidirectional transports: optimizations and delta encoding support enabler by @FZambia in #459
  • Add Valkey (standalone and cluster) to integration tests by @FZambia in #460
  • Only redact non-empty tokens by @FZambia in #455
  • Fix not using redis prefix for xrange support check by @FZambia in #456
  • Redact Connect.Headers values by @FZambia in #458

Full Changelog: v0.34.2...v0.34.3

❯ gorelease -base v0.34.2 -version v0.34.3
# github.com/centrifugal/centrifuge
## compatible changes
(*Client).ProtocolConnect: added
(*Client).ProtocolConnectNoErrorToDisconnect: added
ConnectRequest.Headers: added