Releases: socketio/socket.io-redis-streams-adapter
0.3.0
Features
Add multiplexing support
The streamCount option is added to be able to use multiple Redis streams, allowing to split the load between several Redis nodes.
Note: each namespace is routed to a specific stream to ensure the ordering of messages, so this option only improves scalability when using multiple namespaces.
const io = new Server({
adapter: createAdapter(redisClient, {
streamCount: 4
})
});Added in ee693d0.
Add option to skip hasBinary() checks
The onlyPlaintext option allows skipping the hasBinary() checks during payload serialization (those checks are necessary as binary data must be base-64 encoded before being sent in the Redis stream).
const io = new Server({
adapter: createAdapter(redisClient, {
onlyPlaintext: true
})
});Added in 1f7e6fc.
Make BLOCK timeout configurable
The blockTimeInMs option allows configuring the BLOCK timeout used when fetching data from the Redis stream:
const io = new Server({
adapter: createAdapter(redisClient, {
blockTimeInMs: 2_000
})
});Added in e7653c4.
Use PUB/SUB for fetchSockets() and serverSideEmit() requests
Redis PUB/SUB is now used for transient requests, instead of sending them in the Redis stream.
Two new options:
channelPrefix: the prefix of the Redis PUB/SUB channels (defaults to "socket.io")useShardedPubSub: whether to use sharded PUB/SUB (added in Redis 7.0) (defaults to false)
Each server will use two PUB/SUB channels:
- one common for receiving requests
- one private for receiving responses
Added in dacb88d.
Links
- Diff: 0.2.3...0.3.0
0.2.3
0.2.2
The redis package is no longer required if you use the ioredis package to create a Redis client.
Links
- Diff: 0.2.1...0.2.2
0.2.1
0.2.0
Features
- add support for the ioredis package (58faa1d)
- allow to modify the Redis key for the session (1898586)
Links
- Diff: 0.1.0...0.2.0
0.1.0
First release!