Interface ITransactionalOutboxPreparer
Prepares immutable transaction-participating outbox writes through the selected owning provider.
public interface ITransactionalOutboxPreparer
- Extension Methods
Remarks
This optional capability is discovered on the selected outer outbox store. Payload-bearing decorators must mediate it or withhold it; callers must never bypass selected encryption by resolving a raw concrete store. Preparation performs no database persistence. Provider codec, metadata framing and transforms complete before the coordinating transaction begins. Unsupported composition fails instead of falling back to Enqueue.
Methods
PrepareEnqueueAsync(IDispatchMessage, IMessageContext, CancellationToken)
Prepares the legacy runtime-message workload using the owning provider's actual configured payload codec.
[RequiresUnreferencedCode("The owning runtime-message codec may discover arbitrary consumer payload metadata. Use explicit encoded envelopes for the metadata-safe route.")]
[RequiresDynamicCode("The owning runtime-message codec may require runtime code generation. Use explicit encoded envelopes for the metadata-safe route.")]
ValueTask<IPreparedTransactionalOutboxWrite> PrepareEnqueueAsync(IDispatchMessage message, IMessageContext context, CancellationToken cancellationToken)
Parameters
messageIDispatchMessageThe runtime message.
contextIMessageContextThe caller context whose supported envelope fields are frozen during preparation.
cancellationTokenCancellationTokenThe operation cancellation token.
Returns
- ValueTask<IPreparedTransactionalOutboxWrite>
A fully encoded immutable write without persisting it.
PrepareMessageAsync(OutboundMessage, CancellationToken)
Prepares an explicit already-encoded outbound envelope using the provider's selected metadata configuration.
ValueTask<IPreparedTransactionalOutboxWrite> PrepareMessageAsync(OutboundMessage message, CancellationToken cancellationToken)
Parameters
messageOutboundMessageThe caller-owned envelope, copied before asynchronous processing.
cancellationTokenCancellationTokenThe operation cancellation token.
Returns
- ValueTask<IPreparedTransactionalOutboxWrite>
A fully encoded immutable write that accepts no message until its owner commits.