Table of Contents

Class CallbackExceptionEventArgs

Namespace
RabbitMQ.Client.Events
Assembly
RabbitMQ.Client.dll

Describes an exception that was thrown during the library's invocation of an application-supplied callback handler.

public class CallbackExceptionEventArgs : BaseExceptionEventArgs
Inheritance
CallbackExceptionEventArgs
Inherited Members

Remarks

When an exception is thrown from a callback registered with part of the RabbitMQ .NET client library, it is caught, packaged into a CallbackExceptionEventArgs, and passed through the appropriate IChannel's or IConnection's CallbackException event handlers. If an exception is thrown in a CallbackException handler, it is silently swallowed, as CallbackException is the last chance to handle these kinds of exception.

Code constructing CallbackExceptionEventArgs instances will usually place helpful information about the context of the call in the IDictionary available through the Detail property.

Constructors

CallbackExceptionEventArgs(IDictionary<string, object>, Exception, CancellationToken)

public CallbackExceptionEventArgs(IDictionary<string, object> detail, Exception exception, CancellationToken cancellationToken = default)

Parameters

detail IDictionary<string, object>
exception Exception
cancellationToken CancellationToken

Methods

Build(Exception, string, object, CancellationToken)

public static CallbackExceptionEventArgs Build(Exception e, string context, object consumer, CancellationToken cancellationToken = default)

Parameters

e Exception
context string
consumer object
cancellationToken CancellationToken

Returns

CallbackExceptionEventArgs

Build(Exception, string, CancellationToken)

public static CallbackExceptionEventArgs Build(Exception e, string context, CancellationToken cancellationToken = default)

Parameters

e Exception
context string
cancellationToken CancellationToken

Returns

CallbackExceptionEventArgs