Table of Contents

Class ConfiguredMessageMapper

Namespace
Excalibur.Dispatch.Transport
Assembly
Excalibur.Dispatch.dll

Message mapper that applies configured mappings from the fluent API.

public sealed class ConfiguredMessageMapper : IMessageMapper
Inheritance
ConfiguredMessageMapper
Implements
Inherited Members
Extension Methods

Remarks

This mapper applies type-specific and default mappings configured through IMessageMappingBuilder. It checks for type-specific configurations first, then falls back to default configurations if available.

Properties

Name

Gets the name of this mapper for registration and logging purposes.

public string Name { get; }

Property Value

string

A unique name identifying this mapper.

SourceTransport

Gets the source transport type this mapper handles.

public string SourceTransport { get; }

Property Value

string

The source transport name (e.g., "rabbitmq", "kafka", "*" for any).

TargetTransport

Gets the target transport type this mapper produces.

public string TargetTransport { get; }

Property Value

string

The target transport name (e.g., "rabbitmq", "kafka", "*" for any).

Methods

CanMap(string, string)

Determines whether this mapper can handle the specified source and target transports.

public bool CanMap(string sourceTransport, string targetTransport)

Parameters

sourceTransport string

The source transport name.

targetTransport string

The target transport name.

Returns

bool

true if this mapper can handle the transformation; otherwise, false.

Map(ITransportMessageContext, string)

Maps a source context to a target context for cross-transport delivery.

public ITransportMessageContext Map(ITransportMessageContext source, string targetTransportName)

Parameters

source ITransportMessageContext

The source transport message context.

targetTransportName string

The name of the target transport.

Returns

ITransportMessageContext

A new context configured for the target transport.

Exceptions

ArgumentNullException

Thrown when source is null.

InvalidOperationException

Thrown when the mapper cannot handle the specified transport combination.

Map<TMessage>(ITransportMessageContext, string)

Maps a message with knowledge of its concrete type.

public ITransportMessageContext Map<TMessage>(ITransportMessageContext source, string targetTransportName) where TMessage : class

Parameters

source ITransportMessageContext

The source context.

targetTransportName string

The target transport name.

Returns

ITransportMessageContext

The mapped context.

Type Parameters

TMessage

The message type.