title: Change DefaultMessageBufferSize in SignalR
body: <p>I have a problem with the SignalR library. When I broadcast a lot of data, the SignalR's buffer starts to stack up and allocates as much memory as is available, which ends with application crash due to:</p>
  
  <blockquote>
    <p>Out of memory</p>
  </blockquote>
  
  <p>In .NET Framework, this may be solved by setting the <code>GlobalHost.Configuration.DefaultMessageBufferSize</code>, but I can't find the .NET Core setting for it.</p>
  
  <p>Thanks to <a href="https://stackoverflow.com/questions/39220093/change-global-settings-config-in-signalr-core">this</a> post I managed to configure my <code>Transport</code> options:</p>
  
  <pre><code>app.UseSignalR(routes =&gt;
  {
       routes.MapHub&lt;MonitoringHub&gt;("/MonitoringHub", options =&gt; {
          options.TransportMaxBufferSize = 256000;
          options.ApplicationMaxBufferSize = 256000; 
          options.Transports = TransportType.All;
          options.WebSockets.CloseTimeout = TimeSpan.FromSeconds(10);
          options.LongPolling.PollTimeout = TimeSpan.FromSeconds(10);
       });
  }); 
  </code></pre>
  
  <p>Moreover, I set up my SignalR options:</p>
  
  <pre><code>services.AddSignalR(options =&gt; {
      options.EnableDetailedErrors = true;
  });  
  </code></pre>
  
  <p>But how to set the <code>DefaultMessageBufferSize</code>?</p>