Method SignalAsync
SignalAsync<TPayload>(string, string, TPayload, CancellationToken)
Delivers a typed signal to whichever instance is waiting on
name and correlationId, and returns whether one was.
ValueTask<bool> SignalAsync<TPayload>(string name, string correlationId, TPayload payload, CancellationToken ct = default)
Parameters
namestringcorrelationIdstringpayloadTPayloadctCancellationToken
Returns
Type Parameters
TPayload
Remarks
The payload type is declared by the definition, so a mismatch is a compile-time error rather than a runtime surprise. It travels as JSON, which keeps webhook and cross-language senders possible โ the typed binder is applied on the engine's side of that boundary.
Delivery is at-most-once: the bookmark is consumed atomically, so two concurrent senders cannot both resume the same wait, and the second gets false.
SignalAsync(string, string, string?, CancellationToken)
Delivers a signal whose payload is already JSON โ the escape hatch for webhooks and senders outside this process (ยง11.5).
ValueTask<bool> SignalAsync(string name, string correlationId, string? payloadJson, CancellationToken ct = default)
Parameters
namestringcorrelationIdstringpayloadJsonstringctCancellationToken