Table of Contents

Method ConsumeBookmarkAsync

Namespace
Millrace.Storage.SqlServer
Assembly
Millrace.Storage.SqlServer.dll

ConsumeBookmarkAsync(string, string, CancellationToken)

Atomically consumes (removes and returns) the oldest matching bookmark — ordered by CreatedAt, then Id — or returns null when none match. At-most-once under arbitrary concurrency (§4.2.4): a signal resumes exactly one waiting instance.

public ValueTask<BookmarkRecord?> ConsumeBookmarkAsync(string signalName, string correlationId, CancellationToken ct)

Parameters

signalName string
correlationId string
ct CancellationToken

Returns

ValueTask<BookmarkRecord>

Remarks

Consumes the oldest match. Ties on CreatedAt break on the bookmark id in byte order — the order a database sorts a uuid column, and the same order MonitoringCursor.CompareIds defines. Not CompareTo(Guid), which compares the leading fields in native endianness and therefore differs from every provider.