question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there a way to check if a group has any open connections?

See original GitHub issue

I would like to be able to check if a group I am about to send a message to has any open connections and possibly how many. I see this information is available internally on the client hub in the lifetime manager > client connection manager but i don’t see any of this exposed in any way. The reason I want to perform this check is to decide if I should send a SignalR message to the connected clients or send a push notifications (I’m dealing with iOS mobile clients). Currently I don’t see any way of doing something like that.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
vicancycommented, Mar 27, 2020

We plan to add an existence check in the service REST API to check “if a group has any open connections”, according to the deployment schedule it would be available in late April, and ManagementAPI will be updated accordingly after the service is ready.

2reactions
danielleiszencommented, Mar 26, 2020

So if I understand correctly in a simple scenario when there is only one SignalR server. The internal lifetime manager already maintains a collection of connected clients. But the suggested way is to replicate that collection and maintain it for myself just because the API does not provide a readonly way of querying it.

I think it should be opened as a readonly collection because for debug purposes it is just way more convenient than writing a whole infrastructure in order to create something that is already there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - How can I check how many connections are in a Group ...
I see the group coming back as Microsoft.AspNetCore.SignalR.Internal.GroupProxy<ChatHub> at runtime with no public methods. Internal private ...
Read more >
Finding Servers in Connections and Groups
You can look up a specific server to see all the connections and groups it is part of. This is useful in several...
Read more >
How do I find out which process is using up all the TCP ...
Open a command prompt window as administrator . From there type the following command: netstat -b -a. This will give you a list...
Read more >
Working with Groups in SignalR
Verifying group membership when reconnecting​​ By default, SignalR automatically re-assigns a user to the appropriate groups when reconnecting ...
Read more >
How to See Active SQL Server Connections For Database
Here is the script which will give us answer to the question. SELECT DB_NAME(dbid) AS DBName, COUNT(dbid) AS NumberOfConnections, loginame
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found