Skip to content

Releases: socketio/socket.io-redis-streams-adapter

0.3.0

09 Feb 08:40
fa2a7f8

Choose a tag to compare

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

0.2.3

25 Nov 10:16
a04ebab

Choose a tag to compare

Bug Fixes

  • CSR: include the offset in the restored packets (#40) (c260f17)

Links

0.2.2

08 May 19:59
71ed4e4

Choose a tag to compare

The redis package is no longer required if you use the ioredis package to create a Redis client.

Links

0.2.1

11 Mar 23:06
6170118

Choose a tag to compare

Bug Fixes

  • ensure CSR works with a Redis cluster (d2d635d)
  • ensure CSR works with the ioredis package (78075ec)

Links

0.2.0

21 Feb 14:34
88fb39f

Choose a tag to compare

Features

  • add support for the ioredis package (58faa1d)
  • allow to modify the Redis key for the session (1898586)

Links

0.1.0

06 Apr 14:31
7dc9bd3

Choose a tag to compare

First release!