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.
MIT License
Bot releases are hidden (Show)
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.32.1...v0.32.2
Published by FZambia 6 months ago
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
Published by FZambia 7 months ago
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.31.0...v0.32.0
Published by FZambia 8 months ago
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
Published by FZambia 11 months ago
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.30.5...v0.30.6
Published by FZambia 12 months ago
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.30.4...v0.30.5
Published by FZambia 12 months ago
❯ 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
Published by FZambia about 1 year ago
❯ 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
Published by FZambia about 1 year ago
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.30.1...v0.30.2
Published by FZambia about 1 year ago
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
Published by FZambia about 1 year ago
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.29.4...v0.30.0
Published by FZambia about 1 year ago
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.29.3...v0.29.4
Published by FZambia over 1 year ago
cf_ws_frame_ping_pong
url param to simplify WebSocket protocol debugging with Postman, wscat, etc. #306
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.29.2...v0.29.3
Published by FZambia over 1 year ago
http.ResponseController
to set write timeout in SSE and HTTP-streaming handlers #292
gorelease -base v0.29.1 -version v0.29.2
# github.com/centrifugal/centrifuge
## compatible changes
(*Client).AcquireStorage: added
ConnectReply.Storage: added
# summary
v0.29.2 is a valid semantic version for this release.
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.29.1...v0.29.2
Published by FZambia over 1 year ago
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.28.1...v0.28.2
Published by FZambia over 1 year ago
ForceRESP2
option for RedisShardConfig
. If set to true
forces using RESP2 protocol for communicating with Redis. By default, Redis client tries to detect supported Redis protocol automatically trying RESP3 first.gorelease -base v0.29.0 -version v0.29.1
# github.com/centrifugal/centrifuge
## compatible changes
RedisShardConfig.ForceRESP2: added
# summary
v0.29.1 is a valid semantic version for this release.
Full Changelog: https://github.com/centrifugal/centrifuge/compare/v0.29.0...v0.29.1
Published by FZambia over 1 year ago
This release contains several breaking changes.
Config.HistoryMetaTTL
option. By default, it's 30 days.AppLevelPing
#286 by @bfwbbrj.❯ gorelease -base v0.28.0 -version v0.29.0
# github.com/centrifugal/centrifuge
## incompatible changes
(*Disconnect).CloseText, method set of *DisconnectEvent: removed
(*Disconnect).CloseText: removed
AppLevelPing: removed
DisableProtocolVersion1: removed
Disconnect.Reconnect: removed
DisconnectEvent.Reconnect: removed
HistoryEvent.Filter: changed from HistoryFilter to HistoryFilter
HistoryFilter.Limit: removed
HistoryFilter.Reverse: removed
HistoryFilter.Since: removed
HistoryFilter: changed from HistoryFilter to HistoryFilter
HistoryOptions.Limit: removed
HistoryOptions.Reverse: removed
HistoryOptions.Since: removed
MemoryBrokerConfig.HistoryMetaTTL: removed
ProtocolVersion1: removed
RedisBrokerConfig.HistoryMetaTTL: removed
SockjsConfig.HeartbeatDelay: removed
SockjsConfig.ProtocolVersion: removed
TransportInfo.AppLevelPing, method set of Transport: removed
TransportInfo.AppLevelPing: removed
TransportInfo.PingPongConfig: added
WebsocketConfig.PingInterval: removed
WebsocketConfig.PongTimeout: removed
WebsocketConfig.ProtocolVersion: removed
WithHistory: changed from func(int, time.Duration) PublishOption to func(int, time.Duration, ...time.Duration) PublishOption
## compatible changes
(*Node).Config: added
Config.HistoryMetaTTL: added
ConnectReply.PingPongConfig: added
HistoryFilter.Filter: added
HistoryFilter.MetaTTL: added
HistoryOptions.Filter: added
HistoryOptions.MetaTTL: added
PublishOptions.HistoryMetaTTL: added
SubscribeOptions.HistoryMetaTTL: added
WithHistoryFilter: added
WithHistoryMetaTTL: added
WithSubscribeHistoryMetaTTL: added
# summary
v0.29.0 is a valid semantic version for this release.
Published by FZambia over 1 year ago
Broker
and PresenceManager
were improved in both standalone and Cluster Redis setups. See #262 and blog post Improving Centrifugo Redis Engine throughput and allocation efficiency with Rueidis Go library for the reasoning and numbers behind.CommandReadHandler
and CommandProcessedHandler
. These handlers are only available for client protocol v2, client protocol v1 will be removed soon. While it's not removed DisableProtocolVersion1
global var may be used to disable possibility for clients to connect to server with ProtocolVersion1
.Send
method) to the server while MessageHandler
not setConnectReply
: WriteDelay
, ReplyWithoutQueue
, MaxMessagesInFrame
, QueueInitialCap
which allow tweaking Centrifuge message write loop. See #270 for more details.gorelease -base v0.27.2 -version v0.28.0
# github.com/centrifugal/centrifuge
## incompatible changes
(*Client).Handle: removed
(*Client).HandleCommand: changed from func(*github.com/centrifugal/protocol.Command) bool to func(*github.com/centrifugal/protocol.Command, int) bool
CommandReadHandler: changed from func(*Client, CommandReadEvent) to func(*Client, CommandReadEvent) error
DefaultRedisBrokerPrefix: removed
DefaultRedisConnectTimeout: removed
DefaultRedisPresenceManagerPrefix: removed
DefaultRedisPresenceTTL: removed
DefaultRedisReadTimeout: removed
DefaultRedisWriteTimeout: removed
RedisBrokerConfig.PubSubNumWorkers: removed
RedisShardConfig.IdleTimeout: removed
RedisShardConfig.ReadTimeout: removed
RedisShardConfig.TLSSkipVerify: removed
RedisShardConfig.UseTLS: removed
RedisShardConfig.WriteTimeout: removed
## compatible changes
(*Node).OnCommandProcessed: added
CommandProcessedEvent: added
CommandProcessedHandler: added
CommandReadEvent.CommandSize: added
ConnectReply.MaxMessagesInFrame: added
ConnectReply.QueueInitialCap: added
ConnectReply.ReplyWithoutQueue: added
ConnectReply.WriteDelay: added
DisableProtocolVersion1: added
DisconnectNotAvailable: added
DisconnectPermissionDenied: added
DisconnectTooManyErrors: added
DisconnectTooManyRequests: added
HandleReadFrame: added
RedisShardConfig.ClientName: added
RedisShardConfig.IOTimeout: added
RedisShardConfig.SentinelClientName: added
RedisShardConfig.SentinelTLSConfig: added
# summary
v0.28.0 is a valid semantic version for this release.
Published by FZambia almost 2 years ago
v0.28.0-rc.3 contains fix of decoding large client protocol messages. The bug was introduced by v0.28.0-rc.2. This could lead to client disconnections in v0.28.0-rc.2
Published by FZambia almost 2 years ago
One more release candidate for Centrifuge v0.28.0. See changelog about v0.28.0 to find out details of upcoming release.
v0.28.0-rc.2 contains an important fix compared to v0.28.0-rc.1 which relates to new Redis Engine we introduced in v0.28.0-rc.2: slow down subscription dissolver workers while Redis PUB/SUB is unavailable. This solves a high CPU usage which may happen while Redis PUB/SUB is unavailable and last client unsubscribes from some channel.