.NET Core based SignalR client with Redis Backplane receiving duplicate messages

435 views Asked by At

I'm trying to create a pub/sub design based on ASP.NET Core SignalR (Server), Redis, .NET Core Hosted Service (Client).

With Docker, I've created a cluster consisting of two SignalR servers running on Port 8080 & 8081 respectively and a Redis running on port 6379. Both the servers are listening for messages sent to a Redis channel (topic).

Next, I fire up two instances of Client, one subscribing for a specific SignalR group to the SignalR server running on port 8080 and another client doing the same thing for SignalR server running on port 8081.

When this system is running, I publish messages to Redis channel by another service, those messages are picked up by SignalR servers because they both are listening to the same channel. My problem starts from here, on every client I am receiving same message twice. Remember one client is connected to one server. Any suggestions?

N.B.: In Redis-cli I am getting each message only once. So no issues with Redis.

0

There are 0 answers