We currently use SignalR to receive realtime messages from our backend on our UI Client. The UI client receives messages while it is online and connected to SignalR and misses the messages while it was disconnected (example: user closed the page and SignalR disconnected the client). However, now we need to show all messages to the user, including the ones that were sent by SignalR when the UI Client was offline. Can SignalR support this scenario? The requirement is similar to a persistent queue for UI client mesages, but we use SignalR to broadcast messages to all clients.
Can SignalR queue up messages when client is disconnected and resend them to client when client connects back?
2.9k Views Asked by Dhruv Joshi At
1
There are 1 best solutions below
Related Questions in SIGNALR
- React-native Long-polling or SignalR/websocket?
- Problem when use SignalR with ASP.NET Boilerplate - Connection ID required
- Websocket/SignalR stops receving data consistently on low-end machine
- Implementing User-Specific Notifications with SignalR in an ASP.NET Core Web API & React Project
- SignalR Client won't print the Queue Position
- ANR about Unsafe.park (Native method) in play console
- SignalR client in Unity Android platform doesn't receive messages from server
- Why signal R app throwing SocketClosed exception for RedisConnection(in aws) for and state is "ConnectedEstablished" and app works fine?
- How cobrowsing works?
- SignalR timer event unsubscribe if user disconnected or browser closed
- Issue with Microsoft.AspNet.SignalR.Client hanging/crashing app after app being in background for 10 + minutes
- How to configure WebSocket for SignalR for successful response in listener? How to capture messages from developer console using WebSocket samplers?
- Blazor StateHasChanged() method not working with SignalR
- How to check if SignalR is using redis elasticache programmatically in C#. Is there any code to get stored key value pairs
- Can I get results from multiple SignalR clients from Hub
Related Questions in SIGNALR-HUB
- SignalR timer event unsubscribe if user disconnected or browser closed
- Can I get results from multiple SignalR clients from Hub
- FailedToNegotiateWithServerError when making connection between NodeJs express api and .net signal r hub
- Dynamically define Hub methods in SignalR
- Serverless signalR: Adding a user to a group and sending a message to the group simultaneously in upstream
- Use ASP.NET Core SignalR with Blazor: Error Invalid negotiation response received
- Memory Storage for Notifications Service using SignalR
- SignalR hub connection failed while run the android emulator
- How to send Javascript Blob to SingleR hub?
- Kubernetes + SignalR / Websockets with Traefik
- C# Hub: Listener in the frontend only receives a new notification/message if the message is sent to all clients
- SignalR: InvalidDataException: Reading 'target' as String failed.'
- Ionic Angular - cannot signal after peer is destroyed
- 403 Forbidden Error for HubConnection.StartAsync() Method with active Azure AD Authentication
- How to use in SignalR method name different than actual method name in C# code?
Related Questions in SIGNALR.CLIENT
- Problem when use SignalR with ASP.NET Boilerplate - Connection ID required
- ANR about Unsafe.park (Native method) in play console
- FailedToNegotiateWithServerError when making connection between NodeJs express api and .net signal r hub
- Interoperability between client using Microsoft.AspNet.SignalR 2.4.3 and server built on Microsoft.AspNetCore.SignalR 6.0.1
- What steps are involved in establishing a successful connection to a SignalR Hub?
- Can´t run SignalR with Identity, .Net 7 and Angular 17
- SignalR hub connection failed while run the android emulator
- SignalR "withAutomaticReconnect" issue
- Why SignalR servers encrypted with der certificates and PEM private keys cannot connect successfully
- Why is Context.User null in SignalR hub when I use C# client?
- Unexpected status code returned from negotiate: 404 Not Found - Getting it while handshaking with SignalR from Client side Android
- Can't call signalR server method from java client. is this possible?
- Signalr client not receiving messages after upgrading to 2.4.1
- Is there a way to connect to a SignalR hub using server and by using current session for authentication?
- Blazor with signalR: Attempting to reconnect to the server: x of 8
Related Questions in ASP.NET-CORE-SIGNALR
- Injecting IHubContext into my background service for SignalR in .NET 5
- SignalR Client won't print the Queue Position
- Accessing SignalR Hub instance from Outside Class in .net Core
- Blazor 8 Push Notifications
- Print Queue State Every 10 seconds C# SignalR
- SignalR net core 3.1 start the server via hamachi
- Rapidly opening new tabs with SignalR using Long Polling causes the last several tabs to never finish loading
- FailedToNegotiateWithServerError when making connection between NodeJs express api and .net signal r hub
- Why is SignalR starting up to 8 servers per Blazor Server app start?
- SignalR mysql connection string .NET Core
- Connection failure when using SignalR with Azure APIM and an Application Gateway
- SignalR: WebSocket closed with status code: 1006 (no reason given) called while in state Connected
- Interoperability between client using Microsoft.AspNet.SignalR 2.4.3 and server built on Microsoft.AspNetCore.SignalR 6.0.1
- Upload SignalR Server to Windows Server IIS
- ASP.NET Core multiple types of web convergence cases
Related Questions in SIGNALR-BACKPLANE
- Masstransit and signalR override consumer definition
- Can we rely on IRedisFeature from SignalR Redis backplane to track groups to which connection belongs?
- How to deserialize SignalR messages from Redis backplane
- Why am I getting a 404 error in SignalR Backplane with SQL Server in .Net Core?
- How does SignalR's scaleout dependencyResolver UseSqlServer work under the hood?
- Azure SignalR Service: No active connection for user
- SignalR Scaleout using Sql Server (.net6)
- Signalr connection failed for API hosted on webgarden
- IIS maximum worker processors and Signalr
- SignalR backplane expected behavior
- Can I avoid of using a SignalR backplane behind a load balancer?
- Inject service to configure SignalR backplane
- ASP.NET SignalR with Redis scaleout/backplane causes linear increase in server load
- .NET Core based SignalR client with Redis Backplane receiving duplicate messages
- External Messaging SignalR (DB ==> WebServer)
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
SignalR does not support this scenario, you need to do it on your own. You need to store the the messages and implement a hub method that will send the pending data to the connected client. So what you need to do is:
readbyoption, so you can see data that was already send to the client and delete it.Code example, on the client side, connect and get previous data:
And hub method to get data:
public async Task<OperationResult> GetNotificationsAsync(Groups groups) { IList<MyData> data = await this.DataManager.GetDataForThisClientAsync(groups).ConfigureAwait(false); if (data.Count != 0) { // Send the notifications foreach (MyData data in datas) { await this.BroadcastDataToCallerAsync(data).ConfigureAwait(false); } } return OperationResult.Success(); }