namespace NATS.Server.JetStream.Publish; public sealed class PublishOptions { /// /// Gets the idempotency token used to deduplicate retried publishes on the stream. /// public string? MsgId { get; init; } /// /// Gets the expected stream last sequence precondition for optimistic concurrency checks. /// public ulong ExpectedLastSeq { get; init; } /// /// Gets the expected last sequence for a specific subject when enforcing subject-level ordering. /// public ulong ExpectedLastSubjectSeq { get; init; } /// /// Gets the subject associated with precondition checks. /// public string? ExpectedLastSubjectSeqSubject { get; init; } // Go: Nats-Batch-Id header — identifies which atomic batch this message belongs to. /// /// Gets the batch identifier used to group staged messages into a single commit set. /// public string? BatchId { get; init; } // Go: Nats-Batch-Sequence header — 1-based position within the batch. /// /// Gets the 1-based position of this message within its JetStream publish batch. /// public ulong BatchSeq { get; init; } // Go: Nats-Batch-Commit header — "1" or "eob" to commit, null/empty to stage only. /// /// Gets the batch commit marker signaling end-of-batch or explicit commit behavior. /// public string? BatchCommit { get; init; } // Go: Nats-Expected-Last-Msg-Id header — unsupported inside a batch. /// /// Gets the expected last message id precondition used to guard against duplicate writes. /// public string? ExpectedLastMsgId { get; init; } }