Table of Contents

Namespace Ratatoskr.Core

Classes

ChannelHandlerRegistration

Describes a handler registered on a specific consume channel for a specific message type.

ChannelHandlerRegistry

Immutable registry of channel-scoped handler registrations, built at startup from channel configuration. Replaces DI-based handler discovery with explicit lookups by channel name and message type.

ChannelRegistration
ChannelRegistry
HandlerInvoker

Invokes a single message handler in its own DI scope. Shared by MessageDispatcher (for non-inbox handlers) and the inbox processor (for inbox-managed handlers with per-handler retry and timeout).

MessageActivity

Represents an observed message activity at a specific pipeline stage.

MessageDispatcher

Dispatches incoming messages to registered fire-and-forget handlers for the given channel. Uses ChannelHandlerRegistry for handler lookup instead of DI discovery.

MessageProperties
MessagePropertiesEnricher

Default implementation that enriches MessageProperties with metadata from the ChannelRegistry.

MessageRegistration
MessageRouter

Routes incoming messages through registered IMessageRouteInterceptor instances (e.g. inbox acceptance per DbContext) and then to the MessageDispatcher for handler invocation.

Transport consumers call RouteAsync(byte[], MessageProperties, string, CancellationToken, string) instead of interacting with interceptors and MessageDispatcher separately.

PublishInformation
RatatoskrDiagnostics

Provides access to the ActivitySource used for OpenTelemetry tracing in Ratatoskr.

RouteInterceptResult

Result of BeforeDispatchAsync(byte[], MessageProperties, string, string, CancellationToken).

TransportMessageSnapshot

Transport-agnostic snapshot of a message as it appears on the wire. For the Sent stage, this captures the state after envelope mapping (outgoing). For the Received stage, this captures the state before envelope mapping (incoming).

Interfaces

IMessageActivityObserver

Observer interface for monitoring message activities in the pipeline. Implementations are called at various stages of message processing. When no observers are registered, the pipeline has zero overhead.

IMessageHandler<TMessage>

Handles messages of a specific type.

IMessagePropertiesEnricher

Service that enriches MessageProperties with metadata from the MessageTypeRegistry.

IMessageRouteInterceptor

Intercepts message routing before dispatch. Called by MessageRouter to allow infrastructure packages (e.g. inbox) to accept or persist handlers before the MessageDispatcher invokes them.

IMessageSender
IMessageSerializer
IMessageSerializerResolver

Resolves the serializer to use for a message type. Falls back to the global IMessageSerializer when no message-specific serializer is configured.

ITransportMessageMetadataEnricher

Enums

ChannelType
DispatchResult

Outcome of message dispatch.

MessageStage

Defines the stages in the message lifecycle where activities can be observed.