Open elylv opened 2 years ago
@rsivanov Any idea what could cause this?
Are you working behind a "special" firewall? For test purposes change the HttpTransportType from your Hub to HttpTransportType.WebSockets | HttpTransportType.LongPolling
:
app.UseEndpoints(endpoints =>
{
endpoints.MapHub<RegistrationHub>("/registrationHub", options =>
{
options.Transports = HttpTransportType.WebSockets | HttpTransportType.LongPolling;
});
});
I had a similar issue with load balancer. This is probably not an issue with Rebus package.
I am using Rebus with SQL Server backing, to send SignalR messages from the server to the client.
When it comes to sending a message e.g.
await hubContext.Clients.User(user.UserName).SendAsync("NewNotification", unreadNotifs, notifdtos);
it works, but very intermittently.I can view the websocket communication between the browser and the server, and I see valid pings back and forward between them, but intermittently, it doesn't send some messages (no websocket communication seen, but no errors raised), and I can't work out why. If I remove the AddRebusBackplane and just use normal SignalR, everything works fine. But in my production environment, I am load balanced and need to have the SignalR hubs centralized, so need to use Rebus.
Any ideas?