Skip to content

Class MessagingBehaviorBindingsBuilder

Namespace: Cephalon.Behaviors.Messaging.Hosting
Assembly: Cephalon.Behaviors.Messaging.dll

Fluent builder for selectively registering messaging transport bindings.

public sealed class MessagingBehaviorBindingsBuilder

object ← MessagingBehaviorBindingsBuilder

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Use this builder to register only the transports your application actually requires instead of registering all built-in transports unconditionally.

When an instance is available, each transport automatically binds its options from the conventional configuration section (Engine:Messaging:{Transport}). An optional callback can be passed to override or extend the bound values.

// Auto-bind from config — no manual mapping needed
behaviors.AddMessagingBehaviorBindings(config)
    .AddInMemory()
    .AddRabbitMq()
    .AddKafka();

// Override specific values after config bind behaviors.AddMessagingBehaviorBindings(config) .AddRabbitMq(rmq => rmq.VirtualHost = “/custom”);

AddInMemory(Action<InMemoryTransportOptions>?)

Section titled “ AddInMemory(Action<InMemoryTransportOptions>?)”

Registers the in-memory messaging transport binding. Options are bound from Engine:Messaging:InMemory when configuration is available.

public MessagingBehaviorBindingsBuilder AddInMemory(Action<InMemoryTransportOptions>? configure = null)

configure Action<InMemoryTransportOptions>?

Optional callback to override or extend configuration-bound options.

MessagingBehaviorBindingsBuilder

The same builder for fluent chaining.

Registers the Kafka messaging transport binding. Options are bound from Engine:Messaging:Kafka when configuration is available.

public MessagingBehaviorBindingsBuilder AddKafka(Action<KafkaTransportOptions>? configure = null)

configure Action<KafkaTransportOptions>?

Optional callback to override or extend configuration-bound options.

MessagingBehaviorBindingsBuilder

The same builder for fluent chaining.

AddRabbitMq(Action<RabbitMqTransportOptions>?)

Section titled “ AddRabbitMq(Action<RabbitMqTransportOptions>?)”

Registers the RabbitMQ messaging transport binding. Options are bound from Engine:Messaging:RabbitMQ when configuration is available.

public MessagingBehaviorBindingsBuilder AddRabbitMq(Action<RabbitMqTransportOptions>? configure = null)

configure Action<RabbitMqTransportOptions>?

Optional callback to override or extend configuration-bound options.

MessagingBehaviorBindingsBuilder

The same builder for fluent chaining.