Table of Contents

Interface IMessageMappingBuilder

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

Fluent builder for configuring message mapping between transports.

public interface IMessageMappingBuilder
Extension Methods

Remarks

Follows the Microsoft.AspNetCore.Builder.IEndpointConventionBuilder pattern: a single Add(Action<IMessageMappingConventions>) method with all fluent configuration via extension methods.

builder.WithMessageMapping(mapping => mapping
    .MapMessage<OrderCreatedEvent>()
        .ToRabbitMq(ctx => ctx.RoutingKey = "orders.created")
        .ToKafka(ctx => ctx.Topic = "orders")
    .MapMessage<PaymentProcessedEvent>()
        .ToRabbitMq(ctx => ctx.Exchange = "payments")
        .ToAzureServiceBus(ctx => ctx.TopicOrQueueName = "payments"));

Methods

Add(Action<IMessageMappingConventions>)

Adds a convention to the message mapping builder.

void Add(Action<IMessageMappingConventions> convention)

Parameters

convention Action<IMessageMappingConventions>

The convention to add.