feat: execute post-baseline jetstream parity plan
This commit is contained in:
@@ -220,6 +220,24 @@ public static class StreamApiHandlers
|
||||
if (root.TryGetProperty("max_age_ms", out var maxAgeMsEl) && maxAgeMsEl.TryGetInt32(out var maxAgeMs))
|
||||
config.MaxAgeMs = maxAgeMs;
|
||||
|
||||
if (root.TryGetProperty("max_msg_size", out var maxMsgSizeEl) && maxMsgSizeEl.TryGetInt32(out var maxMsgSize))
|
||||
config.MaxMsgSize = maxMsgSize;
|
||||
|
||||
if (root.TryGetProperty("duplicate_window_ms", out var dupWindowEl) && dupWindowEl.TryGetInt32(out var dupWindow))
|
||||
config.DuplicateWindowMs = dupWindow;
|
||||
|
||||
if (root.TryGetProperty("sealed", out var sealedEl) && sealedEl.ValueKind is JsonValueKind.True or JsonValueKind.False)
|
||||
config.Sealed = sealedEl.GetBoolean();
|
||||
|
||||
if (root.TryGetProperty("deny_delete", out var denyDeleteEl) && denyDeleteEl.ValueKind is JsonValueKind.True or JsonValueKind.False)
|
||||
config.DenyDelete = denyDeleteEl.GetBoolean();
|
||||
|
||||
if (root.TryGetProperty("deny_purge", out var denyPurgeEl) && denyPurgeEl.ValueKind is JsonValueKind.True or JsonValueKind.False)
|
||||
config.DenyPurge = denyPurgeEl.GetBoolean();
|
||||
|
||||
if (root.TryGetProperty("allow_direct", out var allowDirectEl) && allowDirectEl.ValueKind is JsonValueKind.True or JsonValueKind.False)
|
||||
config.AllowDirect = allowDirectEl.GetBoolean();
|
||||
|
||||
if (root.TryGetProperty("discard", out var discardEl))
|
||||
{
|
||||
var discard = discardEl.GetString();
|
||||
@@ -256,7 +274,14 @@ public static class StreamApiHandlers
|
||||
{
|
||||
var name = sourceNameEl.GetString();
|
||||
if (!string.IsNullOrWhiteSpace(name))
|
||||
config.Sources.Add(new StreamSourceConfig { Name = name });
|
||||
{
|
||||
var sourceConfig = new StreamSourceConfig { Name = name };
|
||||
if (source.TryGetProperty("subject_transform_prefix", out var prefixEl))
|
||||
sourceConfig.SubjectTransformPrefix = prefixEl.GetString();
|
||||
if (source.TryGetProperty("source_account", out var accountEl))
|
||||
sourceConfig.SourceAccount = accountEl.GetString();
|
||||
config.Sources.Add(sourceConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user