dotnet / dotnet/aspnetcore

Provide access to signalr message size

Open
#56,338 7 comments 2 reactions 0 assignees View on GitHub
area-signalr
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

Currently there is a setting to limit maximum received message size:

```
services.AddSignalR(options =>
{
options.MaximumReceiveMessageSize = 32768;
});
```

However there is no any API to get actual message size. It could be useful when there is a need to track messages size and then provide it as a metric or use it any other way.

### Describe the solution you'd like

It would be nice to have message size information somewhere in places like `HubInvocationContext`, in order to get access to it from `IHubFilter` implementation.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.