Remove unused PubSubConfig props
This commit is contained in:
1 parent
f72ea96d20
commit
c8ffa1489e
6 files changed
+16
-258
No files matched your search
@@ -18,18 +18,8 @@
|
||||
"EnablePosition": true
|
||||
},
|
||||
"PubSub": {
|
||||
"MillisecondsBetweenSubInfoUpdates": 1000,
|
||||
"MillisecondsBetweenTimeSliceUpdates": 5000,
|
||||
"MillisecondsBetweenNoBufferSpaceRetries": 100,
|
||||
"RetriesOnNoBufferSpace": 1,
|
||||
"DoItAllSecondsBetweenLogs": 0,
|
||||
"HeartbeatInterval": 15000,
|
||||
"MissingHeartbeatsBeforeGc": 50,
|
||||
"UseManagedSockets": true,
|
||||
"StateUpdatePeriod": 5000,
|
||||
"StatisticsUpdatePeriod": 5000,
|
||||
"DisposedConnectionCheckPeriod": 1000,
|
||||
"MessageProcessingWarningThreshold": 1000,
|
||||
"ServerPort": 12345,
|
||||
"Routing": {
|
||||
"PublisherRoutes": [
|
||||
@@ -47,9 +37,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"MaxPacketSize": 500000000,
|
||||
"BlueCommMustDie": true,
|
||||
"CrushableTags": [],
|
||||
"TagTypeToAssemblyMap": {
|
||||
"Entries": [
|
||||
{
|
||||
@@ -58,26 +45,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"ServerQueue": "PubSubQueue",
|
||||
"PortRange": {
|
||||
"First": 30400,
|
||||
"Last": 31700
|
||||
},
|
||||
"BindToRandomPort": false,
|
||||
"DebugTags": "^NOTAGS$",
|
||||
"LatencyReportThresholdMs": 1500,
|
||||
"UseSubstations": false,
|
||||
"UseDynamicClients": false,
|
||||
"IsSubstation": false,
|
||||
"InternallyPublishSubInfo": true,
|
||||
"UseManagedClientsInNativeCode": false,
|
||||
"CompressedTags": "^NOTAGS$",
|
||||
"TagsToReportCompressionRatio": "^NOTAGS$",
|
||||
"DisableMsmq": false,
|
||||
"UsePrepublishedServerState": false,
|
||||
"IpTranslation": null,
|
||||
"GcActivationThreshold": 0,
|
||||
"WaitPeriodAfterGc": 1000,
|
||||
"TagHandlerFactory": {
|
||||
"Handlers": [
|
||||
{
|
||||
@@ -112,5 +79,19 @@
|
||||
"Url": "https://localhost:8443"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"CannedQueries": [
|
||||
{
|
||||
"Name": "BBO",
|
||||
"Query": [
|
||||
"bbo"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "Trades",
|
||||
"Query": [
|
||||
"timesales"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -18,18 +18,9 @@
|
||||
"Interval": "00:00:00.1"
|
||||
},
|
||||
"PubSub": {
|
||||
"MillisecondsBetweenSubInfoUpdates": 1000,
|
||||
"MillisecondsBetweenTimeSliceUpdates": 5000,
|
||||
"MillisecondsBetweenNoBufferSpaceRetries": 100,
|
||||
"RetriesOnNoBufferSpace": 1,
|
||||
"DoItAllSecondsBetweenLogs": 0,
|
||||
"HeartbeatInterval": 15000,
|
||||
"MissingHeartbeatsBeforeGc": 50,
|
||||
"UseManagedSockets": true,
|
||||
"StateUpdatePeriod": 5000,
|
||||
"StatisticsUpdatePeriod": 5000,
|
||||
"DisposedConnectionCheckPeriod": 1000,
|
||||
"MessageProcessingWarningThreshold": 1000,
|
||||
"ServerPort": 12345,
|
||||
"Routing": {
|
||||
"PublisherRoutes": [
|
||||
@@ -47,9 +38,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"MaxPacketSize": 500000000,
|
||||
"BlueCommMustDie": true,
|
||||
"CrushableTags": [],
|
||||
"TagTypeToAssemblyMap": {
|
||||
"Entries": [
|
||||
{
|
||||
@@ -81,27 +69,7 @@
|
||||
"Class": "bts.PubsubServerGenericDataHandler"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ServerQueue": "PubSubQueue",
|
||||
"PortRange": {
|
||||
"First": 30400,
|
||||
"Last": 31700
|
||||
},
|
||||
"BindToRandomPort": false,
|
||||
"DebugTags": "^NOTAGS$",
|
||||
"LatencyReportThresholdMs": 1500,
|
||||
"UseSubstations": false,
|
||||
"UseDynamicClients": false,
|
||||
"IsSubstation": false,
|
||||
"InternallyPublishSubInfo": true,
|
||||
"UseManagedClientsInNativeCode": false,
|
||||
"CompressedTags": "^NOTAGS$",
|
||||
"TagsToReportCompressionRatio": "^NOTAGS$",
|
||||
"DisableMsmq": false,
|
||||
"UsePrepublishedServerState": false,
|
||||
"IpTranslation": null,
|
||||
"GcActivationThreshold": 0,
|
||||
"WaitPeriodAfterGc": 1000
|
||||
}
|
||||
},
|
||||
"DataStreamPublisher": {
|
||||
"PublisherNodes": [
|
||||
|
||||
-33
@@ -18,18 +18,8 @@
|
||||
"EnablePosition": true
|
||||
},
|
||||
"PubSub": {
|
||||
"MillisecondsBetweenSubInfoUpdates": 1000,
|
||||
"MillisecondsBetweenTimeSliceUpdates": 5000,
|
||||
"MillisecondsBetweenNoBufferSpaceRetries": 100,
|
||||
"RetriesOnNoBufferSpace": 1,
|
||||
"DoItAllSecondsBetweenLogs": 0,
|
||||
"HeartbeatInterval": 15000,
|
||||
"MissingHeartbeatsBeforeGc": 50,
|
||||
"UseManagedSockets": true,
|
||||
"StateUpdatePeriod": 5000,
|
||||
"StatisticsUpdatePeriod": 5000,
|
||||
"DisposedConnectionCheckPeriod": 1000,
|
||||
"MessageProcessingWarningThreshold": 1000,
|
||||
"ServerPort": 12345,
|
||||
"Routing": {
|
||||
"PublisherRoutes": [
|
||||
@@ -47,9 +37,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"MaxPacketSize": 500000000,
|
||||
"BlueCommMustDie": true,
|
||||
"CrushableTags": [],
|
||||
"TagTypeToAssemblyMap": {
|
||||
"Entries": [
|
||||
{
|
||||
@@ -58,26 +45,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"ServerQueue": "PubSubQueue",
|
||||
"PortRange": {
|
||||
"First": 30400,
|
||||
"Last": 31700
|
||||
},
|
||||
"BindToRandomPort": false,
|
||||
"DebugTags": "^NOTAGS$",
|
||||
"LatencyReportThresholdMs": 1500,
|
||||
"UseSubstations": false,
|
||||
"UseDynamicClients": false,
|
||||
"IsSubstation": false,
|
||||
"InternallyPublishSubInfo": true,
|
||||
"UseManagedClientsInNativeCode": false,
|
||||
"CompressedTags": "^NOTAGS$",
|
||||
"TagsToReportCompressionRatio": "^NOTAGS$",
|
||||
"DisableMsmq": false,
|
||||
"UsePrepublishedServerState": false,
|
||||
"IpTranslation": null,
|
||||
"GcActivationThreshold": 0,
|
||||
"WaitPeriodAfterGc": 1000,
|
||||
"TagHandlerFactory": {
|
||||
"Handlers": [
|
||||
{
|
||||
|
||||
@@ -26,34 +26,11 @@ public class PubSubConfig {
|
||||
|
||||
public bool? SimpleEchoServer { get; set; }
|
||||
|
||||
// unused
|
||||
public int? MillisecondsBetweenSubInfoUpdates { get; set; } = 1000;
|
||||
|
||||
// unused
|
||||
public int? MillisecondsBetweenTimeSliceUpdates { get; set; } = 5000;
|
||||
|
||||
// unused
|
||||
public int? MillisecondsBetweenNoBufferRetries { get; set; } = 100;
|
||||
|
||||
// unused
|
||||
public int? RetriesOnNoBufferSpace { get; set; } = 1;
|
||||
|
||||
// unused
|
||||
public int? DoItAllSecondsBetweenLog { get; set; } = 0;
|
||||
|
||||
// Used by the PubSubMessageReactor to pass to the ManagedTCPMessageHb (but unsed within it)
|
||||
public int? HeartbeatInterval { get; set; } = 15000;
|
||||
|
||||
public int? MissingHeartbeatsBeforeGc { get; set; } = 50;
|
||||
|
||||
// unused
|
||||
// Milliseconds
|
||||
public int? StateUpdatePeriod { get; set; } = 5000;
|
||||
|
||||
// unused
|
||||
// Milliseconds
|
||||
public int? StatisticsUpdatePeriod { get; set; } = 5000;
|
||||
|
||||
// Milliseconds
|
||||
public int? DisposedConnectionCheckPeriod { get; set; } = 1000;
|
||||
|
||||
@@ -61,45 +38,19 @@ public class PubSubConfig {
|
||||
|
||||
public PubSubTagHandlerFactoryConfig? TagHandlerFactory { get; set; }
|
||||
|
||||
// unused
|
||||
public int? LatencyReportThresholdMs { get; set; }
|
||||
|
||||
// unused
|
||||
public bool? InternallyPublishSubInfo { get; set; }
|
||||
|
||||
public string? CompressedTags { get; set; }
|
||||
|
||||
public int? GcActivationThreshold { get; set; }
|
||||
|
||||
// Milliseconds
|
||||
public int? WaitPeriodAfterGc { get; set; }
|
||||
|
||||
public PubSubRouterConfig? Routing { get; set; }
|
||||
|
||||
public List<PubSubRoute>? PublisherRoutes => Routing?.PublisherRoutes;
|
||||
public List<PubSubRoute>? SubscriberRoutes => Routing?.SubscriberRoutes;
|
||||
|
||||
public static PubSubConfig Default() {
|
||||
const string NOTAGS = "^NOTAGS$";
|
||||
var rv = new PubSubConfig() {
|
||||
MillisecondsBetweenSubInfoUpdates = 1000,
|
||||
MillisecondsBetweenTimeSliceUpdates = 5000,
|
||||
MillisecondsBetweenNoBufferRetries = 100,
|
||||
RetriesOnNoBufferSpace = 1,
|
||||
DoItAllSecondsBetweenLog = 0,
|
||||
HeartbeatInterval = 15000,
|
||||
MissingHeartbeatsBeforeGc = 50,
|
||||
StateUpdatePeriod = 5000,
|
||||
StatisticsUpdatePeriod = 5000,
|
||||
DisposedConnectionCheckPeriod = 1000,
|
||||
ServerPort = 12345,
|
||||
TagTypeToAssemblyMap = new(),
|
||||
TagHandlerFactory = PubSubTagHandlerFactoryConfig.Default(),
|
||||
LatencyReportThresholdMs = 1500,
|
||||
InternallyPublishSubInfo = true,
|
||||
CompressedTags = NOTAGS,
|
||||
GcActivationThreshold = 0,
|
||||
WaitPeriodAfterGc = 1000,
|
||||
SimpleEchoServer = false,
|
||||
Routing = new() {
|
||||
PublisherRoutes = new() {
|
||||
@@ -114,24 +65,12 @@ public class PubSubConfig {
|
||||
}
|
||||
|
||||
public void MergeWith(PubSubConfig other) {
|
||||
MillisecondsBetweenSubInfoUpdates ??= other.MillisecondsBetweenSubInfoUpdates;
|
||||
MillisecondsBetweenTimeSliceUpdates ??= other.MillisecondsBetweenTimeSliceUpdates;
|
||||
MillisecondsBetweenNoBufferRetries ??= other.MillisecondsBetweenNoBufferRetries;
|
||||
RetriesOnNoBufferSpace ??= other.RetriesOnNoBufferSpace;
|
||||
DoItAllSecondsBetweenLog ??= other.DoItAllSecondsBetweenLog;
|
||||
HeartbeatInterval ??= other.HeartbeatInterval;
|
||||
MissingHeartbeatsBeforeGc ??= other.MissingHeartbeatsBeforeGc;
|
||||
StateUpdatePeriod ??= other.StateUpdatePeriod;
|
||||
StatisticsUpdatePeriod ??= other.StatisticsUpdatePeriod;
|
||||
DisposedConnectionCheckPeriod ??= other.DisposedConnectionCheckPeriod;
|
||||
ServerPort ??= other.ServerPort;
|
||||
TagTypeToAssemblyMap ??= other.TagTypeToAssemblyMap;
|
||||
TagHandlerFactory ??= other.TagHandlerFactory;
|
||||
LatencyReportThresholdMs ??= other.LatencyReportThresholdMs;
|
||||
InternallyPublishSubInfo ??= other.InternallyPublishSubInfo;
|
||||
CompressedTags ??= other.CompressedTags;
|
||||
GcActivationThreshold ??= other.GcActivationThreshold;
|
||||
WaitPeriodAfterGc ??= other.WaitPeriodAfterGc;
|
||||
SimpleEchoServer ??= other.SimpleEchoServer;
|
||||
if (other.Routing is not null) {
|
||||
if (Routing is null) {
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BCG
|
||||
{
|
||||
/*
|
||||
* PubSubPortRange.cs
|
||||
*
|
||||
* This class represents a range of ports that could be used by a server.
|
||||
* Servers that wish to provide services ask the blue pages for a port they can use,
|
||||
* and blue pages replies with a port.
|
||||
*
|
||||
* */
|
||||
[JsonConverter(typeof(PubSubPortRangeJsonConverter))]
|
||||
public class PubSubPortRange
|
||||
{
|
||||
|
||||
public PubSubPortRange()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public PubSubPortRange(int min, int max)
|
||||
{
|
||||
minPort = min;
|
||||
maxPort = max;
|
||||
|
||||
}
|
||||
|
||||
public int minPort;
|
||||
public int maxPort;
|
||||
|
||||
}
|
||||
|
||||
public class PubSubPortRangeJsonConverter : JsonConverter<PubSubPortRange> {
|
||||
public override PubSubPortRange? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) {
|
||||
var rv = new PubSubPortRange();
|
||||
var jsonObj = JsonSerializer.Deserialize<JsonObject>(ref reader, options);
|
||||
if (jsonObj is null) {
|
||||
return null;
|
||||
}
|
||||
ReadPrimitive("min_port", ref rv.minPort);
|
||||
ReadPrimitive("max_port", ref rv.maxPort);
|
||||
return rv;
|
||||
|
||||
void ReadPrimitive<T>(string key, ref T valueOut) where T : struct {
|
||||
if (jsonObj.TryGetPropertyValue(key, out var valueJson)) {
|
||||
var valueInt = valueJson?.GetValue<T>();
|
||||
// Only (over)write valueOut if non-null
|
||||
if (valueInt.HasValue) {
|
||||
valueOut = valueInt.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, PubSubPortRange value, JsonSerializerOptions options) {
|
||||
var jsonObj = new JsonObject {
|
||||
["min_port"] = value.minPort,
|
||||
["max_port"] = value.maxPort,
|
||||
};
|
||||
JsonSerializer.Serialize(writer, jsonObj, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,18 +4,9 @@
|
||||
"Interval": "00:00:00.1"
|
||||
},
|
||||
"PubSub": {
|
||||
"MillisecondsBetweenSubInfoUpdates": 1000,
|
||||
"MillisecondsBetweenTimeSliceUpdates": 5000,
|
||||
"MillisecondsBetweenNoBufferSpaceRetries": 100,
|
||||
"RetriesOnNoBufferSpace": 1,
|
||||
"DoItAllSecondsBetweenLogs": 0,
|
||||
"HeartbeatInterval": 15000,
|
||||
"MissingHeartbeatsBeforeGc": 50,
|
||||
"UseManagedSockets": true,
|
||||
"StateUpdatePeriod": 5000,
|
||||
"StatisticsUpdatePeriod": 5000,
|
||||
"DisposedConnectionCheckPeriod": 1000,
|
||||
"MessageProcessingWarningThreshold": 1000,
|
||||
"ServerPort": 12345,
|
||||
"Routing": {
|
||||
"PublisherRoutes": [
|
||||
@@ -33,9 +24,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"MaxPacketSize": 500000000,
|
||||
"BlueCommMustDie": true,
|
||||
"CrushableTags": [],
|
||||
"TagTypeToAssemblyMap": {
|
||||
"Entries": [
|
||||
{
|
||||
@@ -44,24 +32,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"ServerQueue": "PubSubQueue",
|
||||
"PortRange": {
|
||||
"First": 30400,
|
||||
"Last": 31700
|
||||
},
|
||||
"BindToRandomPort": false,
|
||||
"DebugTags": "^NOTAGS$",
|
||||
"LatencyReportThresholdMs": 1500,
|
||||
"UseSubstations": false,
|
||||
"UseDynamicClients": false,
|
||||
"IsSubstation": false,
|
||||
"InternallyPublishSubInfo": true,
|
||||
"UseManagedClientsInNativeCode": false,
|
||||
"CompressedTags": "^NOTAGS$",
|
||||
"TagsToReportCompressionRatio": "^NOTAGS$",
|
||||
"DisableMsmq": false,
|
||||
"UsePrepublishedServerState": false,
|
||||
"IpTranslation": null,
|
||||
"TagHandlerFactory": {
|
||||
"Handlers": [
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user