Skip to content

Releases: centrifugal/centrifuge

v0.20.0

26 Jan 21:29
1ff9c45

Choose a tag to compare

  • Support client protocol v2. As of v0.20.0 it's considered experimental and can have some adjustments in the following releases. But the plan is to make it default at some point. The initial motivation described in #217 and implementation is in #218. Client connectors which support client protocol v2 will be released soon. Both WebsocketConfig and SockjsConfig now have an option to set default protocol version handler will expect from connecting clients. It's also possible to override that option by using cf_protocol_version URL parameter (v1 or v2) when connecting to the server. This should provide a way to migrate to new protocol gradually.
  • Refactor disconnect semantics for client protocol v2. We are getting rid of JSON in close reason by introducing strict ranges for disconnect codes - see #221. Client connectors will expose disconnect codes when working with client protocol v2. Client-side disconnect reasons will also have its own codes – according to this comment.
  • Various optimizations in message broadcast, client command handling, client initial connect – fewer things now escape to the heap.
  • TransportWriteEvent.IsPush field is removed (we can discuss putting it back later if required).
  • Node Survey API now allows choosing the node to which we want to send survey request.
  • Warn log level introduced between Info and Error.
  • Publication now has Tags field (map[string]string) – this may help to put some useful info into publication without modifying payload. It can help to avoid processing payload in some scenarios.
  • Support for setting auth user in Redis shard configuration – for Redis itself and for Sentinel. This is useful if ACL-based auth used on Redis side.
gorelease -base v0.19.0 -version v0.20.0
# github.com/centrifugal/centrifuge
## incompatible changes
(*Disconnect).CloseText: changed from func() string to func(ProtocolVersion) string
(*Node).Survey: changed from func(context.Context, string, []byte) (map[string]SurveyResult, error) to func(context.Context, string, []byte, string) (map[string]SurveyResult, error)
LogLevelError: value changed from 4 to 5
PublishOptions: old is comparable, new is not
PublishReply: old is comparable, new is not
TransportInfo.ProtocolVersion: added
TransportWriteEvent.IsPush: removed
## compatible changes
LogLevelWarn: added
ProtocolVersion1: added
ProtocolVersion2: added
ProtocolVersion: added
Publication.Tags: added
PublishOptions.Tags: added
RedisShardConfig.SentinelUser: added
RedisShardConfig.User: added
SockjsConfig.ProtocolVersion: added
WebsocketConfig.ProtocolVersion: added
WithTags: added

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

v0.19.0

03 Dec 08:28
5750d66

Choose a tag to compare

  • JSON protocol performance improvements. See #215 for details. We are now more strict in parsing multiple command frames: in a multiple command JSON frame individual Commands must be separated by exactly one new line symbol and have an optional new line after the last command. This was always this way and current client connectors work according to these requirements – but since the parser becoming more strict this can theoretically cause some problems with third-party connector implementations.
  • Support custom data from a client passed in a subscribe command, this data is then available in SubscribeEvent.
gorelease -base v0.18.9 -version v0.19.0
# github.com/centrifugal/centrifuge
## incompatible changes
SubscribeEvent: old is comparable, new is not
## compatible changes
SubscribeEvent.Data: added

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

v0.18.9

23 Nov 09:15
b473fcd

Choose a tag to compare

  • Add unsubscribe Reason and optional Disconnect to UnsubscribeEvent. See issue #211 and pr #213.
gorelease -base v0.18.8 -version v0.18.9
# github.com/centrifugal/centrifuge
## compatible changes
UnsubscribeEvent.Disconnect: added
UnsubscribeEvent.Reason: added
UnsubscribeReason: added
UnsubscribeReasonClient: added
UnsubscribeReasonDisconnect: added
UnsubscribeReasonServer: added

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

v0.18.8

18 Oct 12:42
926ac84

Choose a tag to compare

v0.18.7

16 Oct 09:05
e842736

Choose a tag to compare

v0.18.6

06 Oct 07:57
8d0eeb8

Choose a tag to compare

  • Fix panic on concurrent subscribe to the same channel with recovery on (#207).

v0.18.5

02 Oct 18:08
0cff72b

Choose a tag to compare

v0.18.4

11 Sep 12:34
c70cc21

Choose a tag to compare

  • Fix bufio: buffer full error when unmarshalling large JSON messages.

v0.18.3

10 Sep 09:13
7fdddde

Choose a tag to compare

  • Fix unexpected end of JSON input errors in Javascript client with Centrifuge >= v0.18.0 when publishing formatted JSON (with new lines). See centrifugal/protocol#10. Pull request also removes one extra allocation (data copy) during JSON and Protobuf protocol Push message encoding. As the result JSON without new lines will be encoded even faster, Protobuf messages will be encoded faster regardless new lines in payloads. JSON encoding of payload with new lines will require additional allocation since we are stripping new lines now. The penalty is not critical though - see benchmarks in mentioned pull request.

v0.18.2

30 Aug 17:53
d0b0e71

Choose a tag to compare

  • Redis: reload data pipeline immediately upon reconnect, this should help to avoid one additional error after reconnecting to Redis (commit)