Table of Contents

Class ExceptionHandlingMiddleware

Namespace
Signal.Application.Pipeline
Assembly
Signal.Application.dll

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

public sealed class ExceptionHandlingMiddleware : IMessageMiddleware
Inheritance
ExceptionHandlingMiddleware
Implements
Inherited Members

Constructors

ExceptionHandlingMiddleware(ILogger<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.

public ExceptionHandlingMiddleware(ILogger<ExceptionHandlingMiddleware> logger)

Parameters

logger ILogger<ExceptionHandlingMiddleware>

The logger.

Methods

InvokeAsync(MessageContext, MessageDelegate)

Processes the message. Call next to continue; skip it to stop processing.

public Task InvokeAsync(MessageContext context, MessageDelegate next)

Parameters

context MessageContext

The message being processed.

next MessageDelegate

The rest of the pipeline.

Returns

Task

A task that completes when this step (and everything it invoked) has finished.