Table of Contents

Namespace Signal.Application.Pipeline

Classes

AccessControlMiddleware

Applies AccessControlOptions: drops own messages, blocked senders, and — when an allow list is configured — everyone not on it. Dropped messages reach neither event handlers nor commands.

DomainEventMiddleware

Publishes the envelope's domain event (ToDomainEvent()) to all registered IEventHandler<TEvent>s, then continues with command handling.

ExceptionHandlingMiddleware

First pipeline step: logs and swallows unhandled exceptions so that one bad message never stops the receiver. Cancellation caused by host shutdown is rethrown.

LoggingMiddleware

Logs every processed envelope with its duration at Debug.

MessageContext

Per-envelope state flowing through the middleware pipeline. Each envelope gets its own DI scope, so scoped services (middleware, handlers, commands, DbContexts, …) live exactly as long as the message.

MiddlewareRegistry

Ordered list of middleware types. Built-in guards run first (exception handling, logging, access control, rate limiting), then user middleware in registration order, then event dispatching and finally command handling.

RateLimitingMiddleware

Drops data messages of senders that exceeded RateLimitOptions. Receipts and typing indicators are not limited.

Interfaces

IMessageMiddleware

A step of the incoming message pipeline (ASP.NET Core style). Instances are resolved from the message's DI scope, so constructor injection of scoped services is supported.

IMessagePipeline

Runs a message through all registered middlewares.

ISenderRateLimiter

Decides whether a sender may send another message. Replace it for distributed or custom limits.

Delegates

MessageDelegate

A step of the pipeline, representing "the rest of the pipeline" when passed to a middleware.