Skip to content

Cephalon.Behaviors.Messaging

Maturity: M1 · Ownership: application-managed · Family: behaviors · See audit, matrix.

Cephalon.Behaviors.Messaging is the messaging transport baseline for the Adaptive Behavior Topology (ABT).

  • InMemoryTransportBinding — zero-infra bounded Channel<T> for tests and local dev
  • RabbitMqTransportBinding — AMQP/RabbitMQ transport with lazy connect, retry, and dead-letter routing
  • KafkaTransportBinding — Confluent Kafka transport with consumer group, manual offset commit
  • MessagingBehaviorBindingRegistryFrozenDictionary O(1) registry for all 3 bindings
  • HostingAddMessagingBehaviorBindings() extension on IBehaviorCollectionBuilder
Transport IDBindingInfrastructure
in-memoryInMemoryTransportBindingNone (in-process Channel<T>)
rabbitmqRabbitMqTransportBindingRabbitMQ / AMQP 0-9-1
kafkaKafkaTransportBindingApache Kafka / Confluent
services.AddCephalon(config, engine => engine
.AddBehaviors(behaviors => behaviors
.AddMessagingBehaviorBindings(
rabbitMq: opts => opts.HostName = "rabbitmq.internal",
kafka: opts => opts.BootstrapServers = "kafka:9092"
)
)
);

When IEventStore is registered, the Kafka and RabbitMQ bindings now create a per-message or per-delivery DI scope and flow the scoped store into IBehaviorContext.EventStore. That keeps durable execution and other replay-aware behavior patterns transport-neutral: the messaging pack does not own replay logic itself, but it does preserve the shared event-store truth when a messaging-triggered behavior needs it.

Status: ✅ Shipped — commit 9183407 · 527/527 tests

  • Cephalon.Behaviors — dispatcher, catalog, resolver (M1)
  • Cephalon.Behaviors.Http — HTTP transport bindings (M2)
  • Cephalon.Behaviors.Patterns — pattern execution strategies (M4, shipped)