Debian Codegraph @

changelog.md

raw
1 v0.15.0
2 =======
3
4 * Add `Node.Survey` method – it allows gathering results from all running nodes. It's possible to define your own survey handlers. See [example](https://github.com/centrifugal/centrifuge/tree/master/_examples/survey). Keep in mind that `Survey` does not scale very well as number of Centrifuge Nodes grows. Though it has reasonably good performance to perform rare tasks even with relatively large number of nodes – see [benchmark in pull request](https://github.com/centrifugal/centrifuge/pull/174)
5 * The main motivation of adding `Node.Survey` was attempt to remove `Broker.Channels` method – which is not supported by most of existing PUB/SUB brokers and does not work in Redis cluster. `Broker.Channels` now removed, but it can be replaced with survey if needed
6 * Improve clustering - node will now send a SHUTDOWN message so other nodes have a chance to realize that node left cluster almost immediately
7 * Signature of `Since` history call option changed – it now accepts a pointer to StreamPosition. This change simplifies a code to construct history call
8 * Added `SubscribeOptions.Position` boolean flag to enable positioning in channel stream. Positioning means that Centrifuge will check that the client did not miss any message from PUB/SUB system, as soon as loss detected client will be disconnected with `Insufficient State` reason. This is very similar to what `Recover: true` option did, but `Position: true` does not enable recovery. As soon as `Position` flag enabled Centrifuge will expose top stream `StreamPosition` information to a client in Subscribe Reply
9 * Added possibility to iterate over a channel history stream from client side. See [an example that demonstrates this](https://github.com/centrifugal/centrifuge/tree/master/_examples/history_pagination)
10 * New `Config` options: `HistoryMaxPublicationLimit` and `RecoveryMaxPublicationLimit` to control maximum number of publications to return during history call or recovery process. See Centrifuge documentation for detailed description
11 * New example that shows [Centrifuge integration with Tarantool](https://github.com/centrifugal/centrifuge/tree/master/_examples/custom_engine_tarantool). Tarantool engine implementation can outperform Redis (up to 5-10x for presence and history operations), though while example contains a full-featured fast Engine implementation – it's still just an example at the moment and have not been tested in production environment
12 * New blog post in Centrifugo blog where we [introduce Centrifuge library](https://centrifugal.github.io/centrifugo/blog/intro_centrifuge/)
13 * Most [examples](https://github.com/centrifugal/centrifuge/tree/master/_examples) now do not use jQuery which was replaced by vanilla JS
14
15 ```
16 $ gorelease -base v0.14.2 -version v0.15.0
17 github.com/centrifugal/centrifuge
18 ---------------------------------
19 Incompatible changes:
20 - (*MemoryEngine).Channels: removed
21 - (*MemoryEngine).PublishControl: changed from func([]byte) error to func([]byte, string) error
22 - (*Node).Channels: removed
23 - (*RedisEngine).Channels: removed
24 - (*RedisEngine).PublishControl: changed from func([]byte) error to func([]byte, string) error
25 - Broker.Channels, method set of Engine: removed
26 - Broker.Channels: removed
27 - Broker.PublishControl: changed from func([]byte) error to func([]byte, string) error
28 - BrokerEventHandler.HandlePublication: changed from func(string, *Publication) error to func(string, *Publication, StreamPosition) error
29 - Since: changed from func(StreamPosition) HistoryOption to func(*StreamPosition) HistoryOption
30 Compatible changes:
31 - (*Node).ID: added
32 - (*Node).OnSurvey: added
33 - (*Node).Survey: added
34 - Config.HistoryMaxPublicationLimit: added
35 - Config.RecoveryMaxPublicationLimit: added
36 - ErrorUnrecoverablePosition: added
37 - HistoryEvent.Filter: added
38 - SubscribeOptions.Position: added
39 - SurveyCallback: added
40 - SurveyEvent: added
41 - SurveyHandler: added
42 - SurveyReply: added
43 - SurveyResult: added
44
45 v0.15.0 is a valid semantic version for this release.
46 ```
47
48 v0.14.2
49 =======
50
51 * fix concurrent map access which could result in runtime crash when using presence feature.
52
53 v0.14.1
54 =======
55
56 * remove unused `history_full` metric, add `history` action metric to track all history calls.
57
58 v0.14.0
59 =======
60
61 * Add possibility to disconnect user with custom `Disconnect` object, and with client ID whitelist.
62 * Thus fixing non-working `WithReconnect` option when calling `node.Disconnect` method.
63 * No error returned from `client.Disconnect` method anymore. It was always `nil` before.
64
65 Here is what changed since v0.13.0:
66
67 ```
68 gorelease -base v0.13.0 -version v0.14.0
69 github.com/centrifugal/centrifuge
70 ---------------------------------
71 Incompatible changes:
72 - (*Client).Disconnect: changed from func(*Disconnect) error to func(*Disconnect)
73 - DisconnectOptions.Reconnect: removed
74 - DisconnectOptions: old is comparable, new is not
75 - WithReconnect: removed
76 Compatible changes:
77 - DisconnectOptions.ClientWhitelist: added
78 - DisconnectOptions.Disconnect: added
79 - WithClientWhitelist: added
80 - WithDisconnect: added
81
82 v0.14.0 is a valid semantic version for this release.
83 ```
84
85 v0.13.0
86 =======
87
88 This release solves two important issues from v1.0.0 library milestone. It has API changes, though as always it's possible to implement the same as before, and adapting new version should be pretty straightforward.
89
90 * [#163](https://github.com/centrifugal/centrifuge/issues/163) Provide a way to add concurrent processing of protocol commands. Before this change protocol commands could only be processed one by one. The obvious drawback in this case is that one slow RPC could result into stopping other requests from being processed thus affecting overall latency. This required changing client handler API and use asynchronous callback style API for returning replies from event handlers. This approach while not being very idiomatic allows using whatever concurrency strategy developer wants without losing the possibility to control event order.
91 * [#161](https://github.com/centrifugal/centrifuge/issues/161) Eliminating `ChannelOptionsFunc` – now all channel options can be provided when calling `Publish` operation (history size and TTL) or by returning from event handlers inside `SubscribeReply` (enabling channel presence, join/leave messages, recovery in a channel). This means that channel options can now be controlled per-connection (not only per channel as before). For example if you need admin connection to subscribe to channel but not participate in channel presence – you are able to not enable presence for that connection.
92 * Server-side subscriptions now set over `Subscriptions` map (instead of `Channels`). Again – subscribe options can be set with per-connection resolution.
93 * Change signature of `Publish` method in `Broker` interface – method now accepts `[]byte` data instead of `*Publication`.
94 * Function options for `Unsubbscribe` and `Disconnect` methods now have boolean argument.
95 * History functional option `WithNoLimit` removed – use `WithLimit(centrifuge.NoLimit)` instead.
96 * Config option `ClientUserConnectionLimit` renamed to `UserConnectionLimit`. If `UserConnectionLimit` set then now connection will be disconnected with `DisconnectConnectionLimit` instead of returning a `LimitExceeded` error.
97
98 Since API changes are pretty big, let's look at example program and how to adapt it from v0.12.0 to v0.13.0.
99
100 The program based on v0.12.0 API:
101
102 ```go
103 package main
104
105 import (
106 "context"
107
108 "github.com/centrifugal/centrifuge"
109 )
110
111 func main() {
112 cfg := centrifuge.DefaultConfig
113 cfg.ChannelOptionsFunc = func(channel string) (centrifuge.ChannelOptions, bool, error) {
114 return centrifuge.ChannelOptions{
115 Presence: true,
116 JoinLeave: true,
117 HistorySize: 100,
118 HistoryLifetime: 300,
119 HistoryRecover: true,
120 }, true, nil
121 }
122
123 node, _ := centrifuge.New(cfg)
124
125 node.OnConnecting(func(ctx context.Context, e centrifuge.ConnectEvent) (centrifuge.ConnectReply, error) {
126 return centrifuge.ConnectReply{
127 Credentials: &centrifuge.Credentials{UserID: "42"},
128 // Subscribe to a server-side channel.
129 Channels: []string{"news"},
130 }, nil
131 })
132
133 node.OnConnect(func(c *centrifuge.Client) {
134 println("client connected")
135 })
136
137 node.OnSubscribe(func(c *centrifuge.Client, e centrifuge.SubscribeEvent) (centrifuge.SubscribeReply, error) {
138 return centrifuge.SubscribeReply{}, nil
139 })
140
141 node.OnPublish(func(c *centrifuge.Client, e centrifuge.PublishEvent) (centrifuge.PublishReply, error) {
142 return centrifuge.PublishReply{}, nil
143 })
144
145 node.OnDisconnect(func(c *centrifuge.Client, e centrifuge.DisconnectEvent) {
146 println("client disconnected")
147 })
148
149 _ = node.Run()
150 }
151 ```
152
153 With v0.13.0 the same program becomes:
154
155 ```go
156 package main
157
158 import (
159 "context"
160 "time"
161
162 "github.com/centrifugal/centrifuge"
163 )
164
165 func main() {
166 node, _ := centrifuge.New(centrifuge.DefaultConfig)
167
168 node.OnConnecting(func(ctx context.Context, e centrifuge.ConnectEvent) (centrifuge.ConnectReply, error) {
169 return centrifuge.ConnectReply{
170 Credentials: &centrifuge.Credentials{UserID: "42"},
171 // Subscribe to a server-side channel.
172 Subscriptions: map[string]centrifuge.SubscribeOptions{
173 "news": {Presence: true, JoinLeave: true, Recover: true},
174 },
175 }, nil
176 })
177
178 node.OnConnect(func(client *centrifuge.Client) {
179 println("client connected")
180
181 client.OnSubscribe(func(e centrifuge.SubscribeEvent, cb centrifuge.SubscribeCallback) {
182 cb(centrifuge.SubscribeReply{
183 Options: centrifuge.SubscribeOptions{
184 Presence: true,
185 JoinLeave: true,
186 Recover: true,
187 },
188 }, nil)
189 })
190
191 client.OnPublish(func(e centrifuge.PublishEvent, cb centrifuge.PublishCallback) {
192 // BTW you can publish here explicitly using node.Publish method – see Result
193 // field of PublishReply and chat_json example.
194 cb(centrifuge.PublishReply{
195 Options: centrifuge.PublishOptions{
196 HistorySize: 100,
197 HistoryTTL: 5 * time.Minute,
198 },
199 }, nil)
200 })
201
202 client.OnDisconnect(func(e centrifuge.DisconnectEvent) {
203 println("client disconnected")
204 })
205 })
206
207 _ = node.Run()
208 }
209 ```
210
211 As you can see there are three important changes:
212
213 1) You should now set up event handlers inside `node.OnConnect` closure
214 2) Event handlers now have callback argument that you should call with corresponding Reply as soon as you have it
215 3) For server-side subscriptions you should now return `Subscriptions` field in `ConnectReply` which is `map[string]SubscribeOptions` instead of `[]string` slice.
216
217 See [new example that demonstrates concurrency](https://github.com/centrifugal/centrifuge/tree/master/_examples/concurrency) using bounded semaphore.
218
219 Note that every feature enabled for a channel increases resource usage on a server. You should only enable presence, recovery, join/leave features and maintaining history in channels where this is necessary.
220
221 See also updated [Tips and tricks](https://github.com/centrifugal/centrifuge#tips-and-tricks) section in a README – it now contains information about connection life cycle and event handler concurrency.
222
223 v0.12.0
224 =======
225
226 This release is a step back in Engine separation and has some important fixes and improvements. Backwards incompatible changes are all about Engine interfaces so if you are using built-in Memory or Redis engines you should be fine to upgrade. Otherwise, take a closer look on first and second points below.
227
228 * `HistoryManager` interface removed and its methods now part of `Broker` interface{}. The reason behind this is that Broker should be responsible for an atomicity of saving message into history stream and publish to PUB/SUB. More details in [#158](https://github.com/centrifugal/centrifuge/pull/158)
229 * Cleaner `Broker` interface methods without `ChannelOptions`
230 * Fix reconnects due to `InsufficientState` errors in channels with `HistoryRecover` option on when using Memory Engine and frequently publishing in parallel (from different goroutines)
231 * Fix reconnects due to `InsufficientState` errors when using legacy seq, gen fields - [#157](https://github.com/centrifugal/centrifuge/pull/157)
232 * Fix returning custom disconnect for SockJS transport
233 * Possibility to define history stream options in `Publish` call
234 * Deprecate Broker/Engine `Channels` method – see [#147](https://github.com/centrifugal/centrifuge/issues/147)
235 * Increase test coverage up to 83% so [#106](https://github.com/centrifugal/centrifuge/issues/106) is finally closed
236 * Test Sentinel scenario in CI
237 * Refactor queue writer to prevent possible message loss on connection close - [160](https://github.com/centrifugal/centrifuge/pull/160)
238 * Fix inconsistent tests of Redis Cluster recovery due to PUB/SUB buffering
239 * Minor improvements in Gin auth example - [#154](https://github.com/centrifugal/centrifuge/pull/154)
240
241 I have a plan for future library versions to remove `ChannelOptionFunc` completely (but still have a control over channel feature set). This is still in research – if you are interested welcome to [#161](https://github.com/centrifugal/centrifuge/issues/161).
242
243 ```
244 $ gorelease -base v0.11.2 -version v0.12.0
245 github.com/centrifugal/centrifuge
246 ---------------------------------
247 Incompatible changes:
248 - (*MemoryEngine).AddHistory: removed
249 - (*MemoryEngine).Publish: changed from func(string, *Publication, *ChannelOptions) error to func(string, *Publication, PublishOptions) (StreamPosition, error)
250 - (*MemoryEngine).PublishJoin: changed from func(string, *ClientInfo, *ChannelOptions) error to func(string, *ClientInfo) error
251 - (*MemoryEngine).PublishLeave: changed from func(string, *ClientInfo, *ChannelOptions) error to func(string, *ClientInfo) error
252 - (*Node).SetHistoryManager: removed
253 - (*RedisEngine).AddHistory: removed
254 - (*RedisEngine).Publish: changed from func(string, *Publication, *ChannelOptions) error to func(string, *Publication, PublishOptions) (StreamPosition, error)
255 - (*RedisEngine).PublishJoin: changed from func(string, *ClientInfo, *ChannelOptions) error to func(string, *ClientInfo) error
256 - (*RedisEngine).PublishLeave: changed from func(string, *ClientInfo, *ChannelOptions) error to func(string, *ClientInfo) error
257 - Broker.History: added
258 - Broker.Publish: changed from func(string, *Publication, *ChannelOptions) error to func(string, *Publication, PublishOptions) (StreamPosition, error)
259 - Broker.PublishJoin: changed from func(string, *ClientInfo, *ChannelOptions) error to func(string, *ClientInfo) error
260 - Broker.PublishLeave: changed from func(string, *ClientInfo, *ChannelOptions) error to func(string, *ClientInfo) error
261 - Broker.RemoveHistory: added
262 - HistoryManager.AddHistory, method set of Engine: removed
263 - HistoryManager: removed
264 - MemoryEngine: old is comparable, new is not
265 - PublishOptions.SkipHistory: removed
266 - RedisEngineConfig.PublishOnHistoryAdd: removed
267 Compatible changes:
268 - PublishOptions.HistorySize: added
269 - PublishOptions.HistoryTTL: added
270 - WithHistory: added
271
272 v0.12.0 is a valid semantic version for this release.
273 ```
274
275 v0.11.2
276 =======
277
278 * Fix non-working websocket close with custom disconnect code: this is a regression introduced by v0.11.0.
279
280 v0.11.1
281 =======
282
283 * Added `MetricsNamespace` field of `Config` to configure Prometheus metrics namespace used by Centrifuge library internal metrics
284 * Fix `messages_sent_counter` – it now correctly counts Control, Join and Leave messages
285 * Redis cluster integration now tested in CI
286
287 ```
288 $ gorelease -base v0.11.0 -version v0.11.1
289 github.com/centrifugal/centrifuge
290 ---------------------------------
291 Compatible changes:
292 - Config.MetricsNamespace: added
293
294 v0.11.1 is a valid semantic version for this release.
295 ```
296
297 v0.11.0
298 =======
299
300 * Refactor client channels API – see detailed changes below, [#146](https://github.com/centrifugal/centrifuge/pull/146)
301 * Fix atomic alignment in struct for 32-bit builds, [commit](https://github.com/centrifugal/centrifuge/commit/cafa94fbf4173ae46d1f5329a33adec97d0620c8)
302 * Field `Code` of `Disconnect` has `uint32` type now instead of `int`, [commit](https://github.com/centrifugal/centrifuge/commit/d86cea2c8b309e6d2ce1f1fa8ba6fcc7d06f7320)
303 * Refactor WebSocket graceful close – do not use a new goroutine for every read, [#144](https://github.com/centrifugal/centrifuge/pull/144)
304 * Support client name and version fields of `Connect` command which will be available in `ConnectEvent` struct (if set on client side), [#145](https://github.com/centrifugal/centrifuge/pull/145)
305
306 ```
307 $ gorelease -base v0.10.1 -version v0.11.0
308 github.com/centrifugal/centrifuge
309 ---------------------------------
310 Incompatible changes:
311 - (*Client).Channels: changed from func() map[string]ChannelContext to func() []string
312 - ChannelContext: removed
313 - Disconnect.Code: changed from int to uint32
314 Compatible changes:
315 - (*Client).IsSubscribed: added
316 - ConnectEvent.Name: added
317 - ConnectEvent.Version: added
318 - ErrorTooManyRequests: added
319
320 v0.11.0 is a valid semantic version for this release.
321 ```
322
323 v0.10.1
324 =======
325
326 * Fix Redis Engine errors when epoch is missing inside stream/list meta hash. See [commit](https://github.com/centrifugal/centrifuge/commit/f5375855e3df8e1679e11775455597cc91b8e0e5)
327
328 v0.10.0
329 =======
330
331 This release is a massive rewrite of Centrifuge library (actually of some part of it) which should make library a more generic solution. Several opinionated and restrictive parts removed to make Centrifuge feel as a reasonably thin wrapper on top of strict client-server protocol.
332
333 Most work done inside [#129](https://github.com/centrifugal/centrifuge/pull/129) pr and relates to [#128](https://github.com/centrifugal/centrifuge/issues/128) issue.
334
335 Release highlights:
336
337 * Layer with namespace configuration and channel rules removed. Now developer is responsible for all permission checks and channel rules.
338 * Hard dependency on JWT and predefined claims removed. Users are now free to use any token implementation – like [Paceto](https://github.com/paragonie/paseto) tokens for example, use any custom claims etc.
339 * Event handlers that not set now always lead to `Not available` error returned to client.
340 * All event handlers now should be set to `Node` before calling its `Run` method.
341 * Centrifuge still needs to know some core options for channels to understand whether to use presence inside channels, keep Publication history stream or not. It's now done over user-defined callback function in Node Config called `ChannelOptionsFunc`. See its detailed description in [library docs](https://godoc.org/github.com/centrifugal/centrifuge#ChannelOptionsFunc).
342 * More idiomatic error handling in event handlers, see [#134](https://github.com/centrifugal/centrifuge/pull/134).
343 * Aliases to `Raw`, `Publication` and `ClientInfo` Protobuf types removed from library public API, see [#136](https://github.com/centrifugal/centrifuge/issues/136)
344 * Support Redis Sentinel password option
345
346 Look at updated [example in README](https://github.com/centrifugal/centrifuge#quick-example) and [examples](https://github.com/centrifugal/centrifuge/tree/master/_examples) folder to find out more.
347
348 I hope to provide more guidance about library concepts in the future. I feel sorry for breaking things here but since we don't have v1 release yet, I believe this is acceptable. An important note is that while this release has lots of removed parts it's still possible (and not too hard) to implement the same functionality as before on top of this library. Feel free to ask any questions in our community chats.
349
350 v0.9.1
351 ======
352
353 * fix `Close` method – do not use error channel since this leads to deadlock anyway, just close in goroutine.
354 * fix presence timer scheduling
355
356 ```
357 gorelease -base=v0.9.0 -version=v0.9.1
358 github.com/centrifugal/centrifuge
359 ---------------------------------
360 Incompatible changes:
361 - (*Client).Close: changed from func(*Disconnect) chan error to func(*Disconnect) error
362
363 v0.9.1 is a valid semantic version for this release.
364 ```
365
366 v0.9.0
367 ======
368
369 This release has some API changes. Here is a list of all changes in release:
370
371 ```
372 Incompatible changes:
373 - (*Client).Close: changed from func(*Disconnect) error to func(*Disconnect) chan error
374 - (*Client).Handle: removed
375 - Config.ClientPresencePingInterval: removed
376 - NewClient: changed from func(context.Context, *Node, Transport) (*Client, error) to func(context.Context, *Node, Transport) (*TransportClient, CloseFunc, error)
377 - NodeEventHub.ClientRefresh: removed
378 - RefreshHandler: changed from func(context.Context, *Client, RefreshEvent) RefreshReply to func(RefreshEvent) RefreshReply
379 Compatible changes:
380 - (*ClientEventHub).Presence: added
381 - (*ClientEventHub).Refresh: added
382 - CloseFunc: added
383 - Config.ClientPresenceUpdateInterval: added
384 - ConnectReply.ClientSideRefresh: added
385 - PresenceEvent: added
386 - PresenceHandler: added
387 - PresenceReply: added
388 - RefreshEvent.Token: added
389 - RefreshReply.Disconnect: added
390 - TransportClient: added
391 ```
392
393 Now let's try to highlight most notable changes and reasoning behind:
394
395 * `NewClient` returns `TransportClient` and `CloseFunc` to limit possible API on transport implementation level
396 * `ClientPresencePingInterval` config option renamed to `ClientPresenceUpdateInterval`
397 * Centrifuge now has `client.On().Presence` handler which will be called periodically while connection alive every `ClientPresenceUpdateInterval`
398 * `Client.Close` method now creates a goroutine internally - this was required to prevent deadlock when closing client from Presence and SubRefresh callback handlers.
399 * Refresh handler moved to `Client` scope instead of being `Node` event handler
400 * `ConnectReply` now has new `ClientSideRefresh` field which allows setting what kind of refresh mechanism should be used for a client: server-side refresh or client-side refresh.
401 * It's now possible to do client-side refresh with custom token implementation ([example](https://github.com/centrifugal/centrifuge/tree/master/_examples/custom_token))
402 * Library now uses one concurrent timer per each connection instead of 3 - should perform a bit better
403
404 All examples updated to reflect all changes here.
405
406 v0.8.2
407 ======
408
409 * Fix Disconnect Code field unmarshalling, introduce helper method `Disconnect.CloseText()` to build close text sent to client in Close Frame.
410 * Fix server-side Join event wrong channel when server subscribed client to several channels with JoinLeave feature on
411
412 v0.8.1
413 ======
414
415 * Fix closing connections with `insufficient state` after publish when history recovery feature is on and `PublishOnHistoryAdd` is `false` in Redis Engine config. [#119](https://github.com/centrifugal/centrifuge/issues/119).
416
417 v0.8.0
418 ======
419
420 This release is huge. In general, it does not change any previously defined semantics but changes API. The [list of changes is big enough](https://gist.github.com/FZambia/f59ce1c82ceb23286ccf427623a45e37) but fixes you need to do for this version adoption are mostly minimal. Except one thing emphasized below.
421
422 **So here is that thing.** Centrifuge now uses new `offset` `uint64` protocol field for Publication position inside history stream instead of previously used `seq` and `gen` (both `uint32`) fields. It replaces both `seq` and `gen`. This change required to simplify working with history API in perspective. This is a breaking change for library users in case of using history recovery feature – read migration steps below.
423
424 Our client libraries `centrifuge-js` and `centrifuge-go` were updated to use `offset` field. So if you are using these two libraries and utilizing recovery feature then you need to update `centrifuge-js` to at least `2.6.0`, and `centrifuge-go` to at least `0.5.0` to match server protocol (see the possibility to be backwards compatible on server below). All other client libraries do not support recovery at this moment so should not be affected by field changes described here.
425
426 It's important to mention that to provide backwards compatibility on client side both `centrifuge-js` and `centrifuge-go` will continue to properly work with a server which is using old `seq` and `gen` fields for recovery in its current form until v1 version of this library. It's possible to explicitly enable using old `seq` and `gen` fields on server side by calling:
427
428 ```
429 centrifuge.CompatibilityFlags |= centrifuge.UseSeqGen
430 ```
431
432 This allows doing migration to v0.8.0 and keeping everything compatible. Those `CompatibilityFlags` **will be supported until v1 library release**. Then we will only have one way to do things.
433
434 Other release highlights:
435
436 * support [Redis Streams](https://redis.io/topics/streams-intro) - radically reduces amount of allocations during recovery in large history streams, also provides a possibility to paginate over history stream (an API for pagination over stream added to `Node` - see `History` method)
437 * support [Redis Cluster](https://redis.io/topics/cluster-tutorial), client-side sharding between different Redis Clusters also works
438 * use [alternative library](https://github.com/cristalhq/jwt) for JWT parsing and verification - HMAC-based JWT parsing is about 2 times faster now. Related issues: [#109](https://github.com/centrifugal/centrifuge/pull/109) and [#107](https://github.com/centrifugal/centrifuge/pull/107).
439 * new data structure for in-memory streams (linked list + hash table) for faster insertion and recovery in large streams, also it's now possible to expire a stream meta information in case of Memory engine
440 * fix server side subscriptions to private channels (were ignored before)
441 * fix `channels` counter update frequency ([commit](https://github.com/centrifugal/centrifuge/commit/23a87fd538e44894f220146ced47a7e946bcf60d))
442 * drop Dep support - library now uses Go mod only for dependency management
443 * slightly improved test coverage
444 * lots of internal refactoring and style fixes
445
446 Thanks to [@Skarm](https://github.com/Skarm), [@cristaloleg](https://github.com/cristaloleg) and [@GSokol](https://github.com/GSokol) for contributions.
447
448 v0.7.0
449 ======
450
451 * Refactor automatic subscribing to personal channel option. Option that enables feature renamed from `UserSubscribePersonal` to `UserSubscribeToPersonal`, also instead of `UserPersonalChannelPrefix` users can set `UserPersonalChannelNamespace` option, the general advice here is to create separate namespace for automatic personal channels if one requires custom channel options
452 * `WebsocketUseWriteBufferPool` option for SockJS handler
453
454 v0.6.0
455 ======
456
457 * Simplify server-side subscription API replacing `[]centrifuge.Subscription` with just `[]string` - i.e. a slice of channels we want to subscribe connection to. For now it seems much more simple to just use a slice of strings and this must be sufficient for most use cases. It is also a bit more efficient for JWT use case in terms of its payload size. More complex logic can be introduced later over separate field of `ConnectReply` or `connectToken` if needed
458 * Support server-side subscriptions via JWT using `channels` claim field
459
460 v0.5.0
461 ======
462
463 This release introduces server-side subscription support - see [#89](https://github.com/centrifugal/centrifuge/pull/89) for details. Release highlights:
464
465 * New field `Subscriptions` for `ConnectReply` to provide server side subscriptions
466 * New `Client.Subscribe` method
467 * New node configuration options: `UserSubscribePersonal` and `UserPersonalChannelPrefix`
468 * New `ServerSide` boolean namespace option
469 * Method `Client.Unsubscribe` now accepts one main argument (`channel`) and `UnsubscribeOptions`
470 * New option `UseWriteBufferPool` for WebSocket handler config
471 * Internal refactor of JWT related code, many thanks to [@Nesty92](https://github.com/Nesty92)
472 * Introduce subscription dissolver - node now reliably unsubscribes from PUB/SUB channels, see details in [#77](https://github.com/centrifugal/centrifuge/issues/77)
473
474 v0.4.0
475 ======
476
477 * `Secret` config option renamed to `TokenHMACSecretKey`, that was reasonable due to recent addition of RSA-based tokens so we now have `TokenRSAPublicKey` option