Table of Contents

Class OutboxMessageMapper

Namespace
Excalibur.Dispatch.Outbox
Assembly
Excalibur.Dispatch.dll

Default implementation of IOutboxMessageMapper that integrates the outbox pattern with the message mapping system.

public sealed class OutboxMessageMapper : IOutboxMessageMapper
Inheritance
OutboxMessageMapper
Implements
Inherited Members
Extension Methods

Remarks

This mapper bridges outbound messages from the outbox store with the transport message mapping infrastructure. It creates transport contexts from outbound messages and applies configured mappings for target transports.

Constructors

OutboxMessageMapper(IMessageMapper?, IMessageMapperRegistry?, IMessageRoutingConfiguration?)

Initializes a new instance of the OutboxMessageMapper class.

public OutboxMessageMapper(IMessageMapper? messageMapper = null, IMessageMapperRegistry? mapperRegistry = null, IMessageRoutingConfiguration? routingConfiguration = null)

Parameters

messageMapper IMessageMapper

Optional message mapper for transport transformations.

mapperRegistry IMessageMapperRegistry

Optional mapper registry for specific transport combinations.

routingConfiguration IMessageRoutingConfiguration

Optional routing configuration for multi-transport routing.

Methods

CreateContext(OutboundMessage, string)

Creates a transport message context from an outbound message.

public ITransportMessageContext CreateContext(OutboundMessage message, string targetTransport)

Parameters

message OutboundMessage

The outbound message from the outbox.

targetTransport string

The 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.

public IReadOnlyCollection<string> GetTargetTransports(string messageType)

Parameters

messageType string

A 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.

public ITransportMessageContext MapToTransport(OutboundMessage message, ITransportMessageContext sourceContext, string targetTransport)

Parameters

message OutboundMessage

The outbound message from the outbox.

sourceContext ITransportMessageContext

The source transport context.

targetTransport string

The target transport name.

Returns

ITransportMessageContext

A transport message context mapped for the target transport.