Closed seolhw closed 8 months ago
Bump +1
Doesn't this library support connecting to a Redis Cluster? In either case, cluster connection should be mentioned in the documentation, IMHO
It does indeed support connecting to a Redis cluster.
I have added a test to ensure it: https://github.com/socketio/socket.io-redis-streams-adapter/commit/65d0539eb7eb9649845ee744a4de4e0646fa194e
@seolhw @MGTechTeam1 @titk12 could you please check?
I've added an example in the README:
import { createCluster } from "redis";
import { Server } from "socket.io";
import { createAdapter } from "@socket.io/redis-streams-adapter";
const redisClient = createCluster({
rootNodes: [
{
url: "redis://localhost:7000",
},
{
url: "redis://localhost:7001",
},
{
url: "redis://localhost:7002",
},
],
});
await redisClient.connect();
const io = new Server({
adapter: createAdapter(redisClient)
});
io.listen(3000);
I think this can be closed now, please reopen if needed.
Bump +1