Real-time messaging library for Go. The simplest way to add feature-rich and scalable WebSocket support to your application. The core of Centrifugo server.
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.32.1...v0.32.2
io: read/write on closed pipe
) in JSON protocol case, see commit in centrifugal/protocol
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.32.0...v0.32.1
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.31.0...v0.32.0
This is quite a huge release. It has several backwards incompatible changes: in PresenceManager
and Broker
interfaces. Also, SockJS transport was removed. And several nice improvements are here. Check out the details below.
Publish
API by @FZambia in https://github.com/centrifugal/centrifuge/pull/336 . Centrifuge keeps publications with idempotency key set in cache for 5 mins by default and drops publications with the same key. See WithIdempotencyKey
and WithIdempotentResultTTL
. Check out how this could be useful in practice in Centrifugo chat/messenger tutorial. This required change in Broker
interface Publish
method (should not affect most users until they use custom Broker, but simple to adopt otherwise)RedisPresenceManager
called EnableUserMapping
- this allows increasing performance of PresenceStats
call drastically. For channels with huge amount of subscribers the benefit may be up to 10000x
better performance. Though more memory may be required on Redis side (up to 2x) since Centrifuge keeps additional data structure in that case. See also related discussion in Centrifugo
Using gorelease tool:
❯ gorelease -base v0.30.6 -version v0.31.0
# github.com/centrifugal/centrifuge
## incompatible changes
(*MemoryBroker).Publish: changed from func(string, []byte, PublishOptions) (StreamPosition, error) to func(string, []byte, PublishOptions) (StreamPosition, bool, error)
(*MemoryPresenceManager).RemovePresence: changed from func(string, string) error to func(string, string, string) error
(*RedisBroker).Publish: changed from func(string, []byte, PublishOptions) (StreamPosition, error) to func(string, []byte, PublishOptions) (StreamPosition, bool, error)
(*RedisPresenceManager).RemovePresence: changed from func(string, string) error to func(string, string, string) error
Broker.Publish: changed from func(string, []byte, PublishOptions) (StreamPosition, error) to func(string, []byte, PublishOptions) (StreamPosition, bool, error)
NewSockjsHandler: removed
PresenceManager.RemovePresence: changed from func(string, string) error to func(string, string, string) error
SockjsConfig: removed
SockjsHandler: removed
## compatible changes
PublishOptions.IdempotencyKey: added
PublishOptions.IdempotentResultTTL: added
PublishResult.FromCache: added
RedisBrokerConfig.SkipPubSub: added
RedisPresenceManagerConfig.EnableUserMapping: added
WithIdempotencyKey: added
WithIdempotentResultTTL: added
# summary
v0.31.0 is a valid semantic version for this release.
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.30.6...v0.31.0
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.30.5...v0.30.6
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.30.4...v0.30.5
❯ gorelease -base v0.30.3 -version v0.30.4
# github.com/centrifugal/centrifuge
## compatible changes
Config.ChannelNamespaceLabelForTransportMessagesReceived: added
Config.ChannelNamespaceLabelForTransportMessagesSent: added
Config.GetChannelNamespaceLabel: added
TransportWriteEvent.Channel: added
TransportWriteEvent.FrameType: added
# summary
v0.30.4 is a valid semantic version for this release.
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.30.3...v0.30.4
❯ gorelease -base v0.30.2 -version v0.30.3
# github.com/centrifugal/centrifuge
## compatible changes
(*Client).WritePublication: added
SubscribeReply.SubscriptionReady: added
# summary
v0.30.3 is a valid semantic version for this release.
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.30.2...v0.30.3
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.30.1...v0.30.2
github.com/redis/rueidis
to v1.0.16github.com/google/uuid
to v1.3.1Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.30.0...v0.30.1