v0.15.0
- Add
Node.Survey
method – it allows gathering results from all running nodes. It's possible to define your own survey handlers. See example. Keep in mind thatSurvey
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 - The main motivation of adding
Node.Survey
was attempt to removeBroker.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 - Improve clustering - node will now send a SHUTDOWN message so other nodes have a chance to realize that node left cluster almost immediately
- Signature of
Since
history call option changed – it now accepts a pointer to StreamPosition. This change simplifies a code to construct history call - 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 withInsufficient State
reason. This is very similar to whatRecover: true
option did, butPosition: true
does not enable recovery. As soon asPosition
flag enabled Centrifuge will expose top streamStreamPosition
information to a client in Subscribe Reply - Added possibility to iterate over a channel history stream from client side. See an example that demonstrates this
- New
Config
options:HistoryMaxPublicationLimit
andRecoveryMaxPublicationLimit
to control maximum number of publications to return during history call or recovery process. See Centrifuge documentation for detailed description - New example that shows Centrifuge integration with 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
- New blog post in Centrifugo blog where we introduce Centrifuge library
- Most examples now do not use jQuery which was replaced by vanilla JS
$ gorelease -base v0.14.2 -version v0.15.0
github.com/centrifugal/centrifuge
---------------------------------
Incompatible changes:
- (*MemoryEngine).Channels: removed
- (*MemoryEngine).PublishControl: changed from func([]byte) error to func([]byte, string) error
- (*Node).Channels: removed
- (*RedisEngine).Channels: removed
- (*RedisEngine).PublishControl: changed from func([]byte) error to func([]byte, string) error
- Broker.Channels, method set of Engine: removed
- Broker.Channels: removed
- Broker.PublishControl: changed from func([]byte) error to func([]byte, string) error
- BrokerEventHandler.HandlePublication: changed from func(string, *Publication) error to func(string, *Publication, StreamPosition) error
- Since: changed from func(StreamPosition) HistoryOption to func(*StreamPosition) HistoryOption
Compatible changes:
- (*Node).ID: added
- (*Node).OnSurvey: added
- (*Node).Survey: added
- Config.HistoryMaxPublicationLimit: added
- Config.RecoveryMaxPublicationLimit: added
- ErrorUnrecoverablePosition: added
- HistoryEvent.Filter: added
- SubscribeOptions.Position: added
- SurveyCallback: added
- SurveyEvent: added
- SurveyHandler: added
- SurveyReply: added
- SurveyResult: added
v0.15.0 is a valid semantic version for this release.