From 30e7d1bedee64b6df428c58cd5f3210fd149c340 Mon Sep 17 00:00:00 2001 From: Alexander Emelin Date: Fri, 2 Oct 2020 01:10:16 +0300 Subject: [PATCH] v0.12.0 changelog (#162) --- changelog.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/changelog.md b/changelog.md index 65e57be8..b266745b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,55 @@ +v0.12.0 +======= + +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. + +* `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) +* Cleaner `Broker` interface methods without `ChannelOptions` +* Fix reconnects due to `InsufficientState` errors in channels with `HistoryRecover` option on when using Memory Engine and frequently publishing in parallel (from different goroutines) +* Fix reconnects due to `InsufficientState` errors when using legacy seq, gen fields - [#157](https://github.com/centrifugal/centrifuge/pull/157) +* Fix returning custom disconnect for SockJS transport +* Possibility to define history stream options in `Publish` call +* Deprecate Broker/Engine `Channels` method – see [#147](https://github.com/centrifugal/centrifuge/issues/147) +* Increase test coverage up to 83% so [#106](https://github.com/centrifugal/centrifuge/issues/106) is finally closed +* Test Sentinel scenario in CI +* Refactor queue writer to prevent possible message loss on connection close - [160](https://github.com/centrifugal/centrifuge/pull/160) +* Fix inconsistent tests of Redis Cluster recovery due to PUB/SUB buffering +* Minor improvements in Gin auth example - [#154](https://github.com/centrifugal/centrifuge/pull/154) + +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). + +``` +$ gorelease -base v0.11.2 -version v0.12.0 +github.com/centrifugal/centrifuge +--------------------------------- +Incompatible changes: +- (*MemoryEngine).AddHistory: removed +- (*MemoryEngine).Publish: changed from func(string, *Publication, *ChannelOptions) error to func(string, *Publication, PublishOptions) (StreamPosition, error) +- (*MemoryEngine).PublishJoin: changed from func(string, *ClientInfo, *ChannelOptions) error to func(string, *ClientInfo) error +- (*MemoryEngine).PublishLeave: changed from func(string, *ClientInfo, *ChannelOptions) error to func(string, *ClientInfo) error +- (*Node).SetHistoryManager: removed +- (*RedisEngine).AddHistory: removed +- (*RedisEngine).Publish: changed from func(string, *Publication, *ChannelOptions) error to func(string, *Publication, PublishOptions) (StreamPosition, error) +- (*RedisEngine).PublishJoin: changed from func(string, *ClientInfo, *ChannelOptions) error to func(string, *ClientInfo) error +- (*RedisEngine).PublishLeave: changed from func(string, *ClientInfo, *ChannelOptions) error to func(string, *ClientInfo) error +- Broker.History: added +- Broker.Publish: changed from func(string, *Publication, *ChannelOptions) error to func(string, *Publication, PublishOptions) (StreamPosition, error) +- Broker.PublishJoin: changed from func(string, *ClientInfo, *ChannelOptions) error to func(string, *ClientInfo) error +- Broker.PublishLeave: changed from func(string, *ClientInfo, *ChannelOptions) error to func(string, *ClientInfo) error +- Broker.RemoveHistory: added +- HistoryManager.AddHistory, method set of Engine: removed +- HistoryManager: removed +- MemoryEngine: old is comparable, new is not +- PublishOptions.SkipHistory: removed +- RedisEngineConfig.PublishOnHistoryAdd: removed +Compatible changes: +- PublishOptions.HistorySize: added +- PublishOptions.HistoryTTL: added +- WithHistory: added + +v0.12.0 is a valid semantic version for this release. +``` + v0.11.2 =======