Interface IProtoMessageAwaitSource
The ordered deliveries one consumer awaits over, plus the wait that wakes its scan. An adapter implements it over its own storage: the in-memory broker and the MassTransit harness over their published history, the RabbitMQ tap over its log and channel. The consumer owns a ProtoMessageAwaitQueue and supplies this source; the queue enforces the serialized, consumed-once semantics.
public interface IProtoMessageAwaitSource
- Extension Methods
Methods
SnapshotAsync(string, long, CancellationToken)
Returns the candidate deliveries at or after position, in arrival order. The
scan arms the wait that follows it: a delivery that lands after this call completes the next
WaitAsync(ProtoMessageAwaitSnapshot, TimeSpan, CancellationToken) immediately, so the scan-then-wait cannot miss it. A source whose
deliveries are already held can ignore the arming and leave Changed null.
ValueTask<ProtoMessageAwaitSnapshot> SnapshotAsync(string destination, long position, CancellationToken cancellationToken)
Parameters
destinationstringpositionlongcancellationTokenCancellationToken
Returns
WaitAsync(ProtoMessageAwaitSnapshot, TimeSpan, CancellationToken)
Waits until a delivery may have arrived since the last snapshot, or the remaining time elapses,
whichever comes first; a cancelled cancellationToken throws. The queue always
scans after this returns, so a delivery that landed exactly at the deadline is still seen.
ValueTask WaitAsync(ProtoMessageAwaitSnapshot snapshot, TimeSpan remaining, CancellationToken cancellationToken)
Parameters
snapshotProtoMessageAwaitSnapshotremainingTimeSpancancellationTokenCancellationToken