Interface IFailClosedException
Marks an exception as an intentional fail-closed signal that middleware raise to reject a message, rather than an unexpected error.
public interface IFailClosedException
- Extension Methods
Remarks
The dispatch middleware base wraps an unexpected Exception from a middleware's processing in a diagnostic InvalidOperationException (carrying the middleware name). That wrapping would mask a deliberate fail-closed rejection — a consumer catching, say, OutOfOrderMessageException would instead see an opaque InvalidOperationException. Exceptions implementing this marker are therefore rethrown unwrapped (via ExceptionDispatchInfo, preserving the original stack trace) so the typed fail-closed signal reaches the caller intact. Unmarked exceptions keep the diagnostic wrap.