Skip to content

Commit

Permalink
Increase subscription buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Oct 3, 2024
1 parent d24abb5 commit 1cdc774
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Tgstation.Server.Host/Core/Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Elastic.CommonSchema.Serilog;

using HotChocolate.AspNetCore;
using HotChocolate.Subscriptions;
using HotChocolate.Types;

using Microsoft.AspNetCore.Authentication;
Expand Down Expand Up @@ -311,7 +312,11 @@ void ConfigureNewtonsoftJsonSerializerSettingsForApi(JsonSerializerSettings sett
})
#endif
.AddMutationConventions()
.AddInMemorySubscriptions()
.AddInMemorySubscriptions(
new SubscriptionOptions
{
TopicBufferCapacity = 1024, // mainly so high for tests, not possible to DoS the server without authentication and some other access to generate messages
})
.AddGlobalObjectIdentification()
.AddQueryFieldToMutationPayloads()
.ModifyOptions(options =>
Expand Down

0 comments on commit 1cdc774

Please sign in to comment.