Interface IOutboxMessageMapper
Provides mapping of outbox messages to transport-specific contexts.
public interface IOutboxMessageMapper
- Extension Methods
Remarks
This interface bridges the outbox pattern with the message mapping system, allowing outbound messages to be transformed according to transport-specific configurations before being published.
Methods
CreateContext(OutboundMessage, string)
Creates a transport message context from an outbound message.
ITransportMessageContext CreateContext(OutboundMessage message, string targetTransport)
Parameters
messageOutboundMessageThe outbound message from the outbox.
targetTransportstringThe target transport name.
Returns
- ITransportMessageContext
A transport message context configured for the target transport.
GetTargetTransports(string)
Gets the target transports for a given message type.
IReadOnlyCollection<string> GetTargetTransports(string messageType)
Parameters
messageTypestringA type name for the message that the message type registry can resolve — its simple name, its assembly-qualified name, or "Namespace.TypeName, AssemblyName".
Returns
- IReadOnlyCollection<string>
A collection of target transport names, or empty if using default routing.
MapToTransport(OutboundMessage, ITransportMessageContext, string)
Maps an outbound message to a transport-specific context using configured mappings.
ITransportMessageContext MapToTransport(OutboundMessage message, ITransportMessageContext sourceContext, string targetTransport)
Parameters
messageOutboundMessageThe outbound message from the outbox.
sourceContextITransportMessageContextThe source transport context.
targetTransportstringThe target transport name.
Returns
- ITransportMessageContext
A transport message context mapped for the target transport.