Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SignalR : How to send message in chunks if size is more

I'm using SignalR to send messages from my .net core application to Angular front end. Sometimes the message size can be more than MaximumReceiveMessageSize configured. In this case what is the optimal way to handle message sending.

like image 634
Akbar Badhusha Avatar asked Dec 28 '25 14:12

Akbar Badhusha


1 Answers

To Summarize:

The default maximum message is 32KB. To increase that use:

builder.Services.Configure<HubOptions>(options =>
{
    options.MaximumReceiveMessageSize = 1024 * 1024;
})

Suggestion: Just send signals with Ids and get the full data by calling the server after receiving these Ids.

Its not possible to increase or decrease these size on a request base.

like image 118
decius Avatar answered Dec 30 '25 05:12

decius



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!