feat: complete jetstream mirror source strict runtime parity

This commit is contained in:
Joseph Doherty
2026-02-23 14:50:18 -05:00
parent 7bea35aaa8
commit 3896512f84
3 changed files with 47 additions and 0 deletions

View File

@@ -18,6 +18,13 @@ public sealed class SourceCoordinator
public async Task OnOriginAppendAsync(StoredMessage message, CancellationToken ct)
{
if (!string.IsNullOrWhiteSpace(_sourceConfig.SourceAccount)
&& !string.IsNullOrWhiteSpace(message.Account)
&& !string.Equals(_sourceConfig.SourceAccount, message.Account, StringComparison.Ordinal))
{
return;
}
var subject = message.Subject;
if (!string.IsNullOrWhiteSpace(_sourceConfig.SubjectTransformPrefix))
subject = $"{_sourceConfig.SubjectTransformPrefix}{subject}";

View File

@@ -6,5 +6,6 @@ public sealed class StoredMessage
public string Subject { get; init; } = string.Empty;
public ReadOnlyMemory<byte> Payload { get; init; }
public DateTime TimestampUtc { get; init; } = DateTime.UtcNow;
public string? Account { get; init; }
public bool Redelivered { get; init; }
}