Class EventHubExceptionReceiver
inherit this class and override it's methods in order to receive event hub exceptions.
Inherited Members
Namespace: FastEndpoints
Assembly: FastEndpoints.Messaging.Remote.dll
Syntax
public abstract class EventHubExceptionReceiver
Methods
OnGetNextBatchError<TEvent>(string, int, Exception, CancellationToken)
this method is triggered when the storage provider has trouble retrieving the next batch of event records.
Declaration
public virtual Task OnGetNextBatchError<TEvent>(string subscriberID, int attemptCount, Exception exception, CancellationToken ct) where TEvent : class, IEvent
Parameters
| Type | Name | Description |
|---|---|---|
| string | subscriberID | the unique ID of the subscriber |
| int | attemptCount | the number of times the operation was attempted |
| Exception | exception | the actual exception that was thrown by the operation |
| CancellationToken | ct | cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
Type Parameters
| Name | Description |
|---|---|
| TEvent | the type of the event |
OnInMemoryQueueOverflow<TEvent>(IEventStorageRecord, CancellationToken)
this method is triggered when the default in-memory storage provider's internal queue for the given event type has been stagnant and in an overflow state.
Declaration
public virtual Task OnInMemoryQueueOverflow<TEvent>(IEventStorageRecord record, CancellationToken ct) where TEvent : class, IEvent
Parameters
| Type | Name | Description |
|---|---|---|
| IEventStorageRecord | record | the event storage record that was supposed to be added to the queue |
| CancellationToken | ct | cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
Type Parameters
| Name | Description |
|---|---|
| TEvent | the type of the event |
OnMarkEventAsCompleteError<TEvent>(IEventStorageRecord, int, Exception, CancellationToken)
this method is triggered when the storage provider has trouble marking an event record as complete.
Declaration
public virtual Task OnMarkEventAsCompleteError<TEvent>(IEventStorageRecord record, int attemptCount, Exception exception, CancellationToken ct) where TEvent : class, IEvent
Parameters
| Type | Name | Description |
|---|---|---|
| IEventStorageRecord | record | the event storage record that was supposed to be marked complete |
| int | attemptCount | the number of times the record was attempted to be marked complete |
| Exception | exception | the actual exception that was thrown by the operation |
| CancellationToken | ct | cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
Type Parameters
| Name | Description |
|---|---|
| TEvent | the type of the event |
OnRestoreSubscriberIDsError(Type, int, Exception, CancellationToken)
this method is triggered when the storage provider has trouble restoring event subscribers.
Declaration
public virtual Task OnRestoreSubscriberIDsError(Type eventType, int attemptCount, Exception exception, CancellationToken ct)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | eventType | the type of the event |
| int | attemptCount | the number of times the subscriber were attempted to be retrieved |
| Exception | exception | the actual exception that was thrown by the operation |
| CancellationToken | ct | cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
OnSerializeEventError<TEvent>(TEvent, Exception, CancellationToken)
this method is triggered when the storage provider has trouble serializing an event object calling the IEventStorageRecord.SetEvent<TEvent>(TEvent) method.
Declaration
public virtual Task OnSerializeEventError<TEvent>(TEvent @event, Exception exception, CancellationToken ct) where TEvent : class, IEvent
Parameters
| Type | Name | Description |
|---|---|---|
| TEvent | event | the event object that failed to serialize |
| Exception | exception | the actual exception that was thrown by the operation |
| CancellationToken | ct | cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
Type Parameters
| Name | Description |
|---|---|
| TEvent | the type of the event |
OnStoreEventRecordsError<TEvent>(IEnumerable<IEventStorageRecord>, int, Exception, CancellationToken)
this method is triggered when the storage provider has trouble persisting event storage records.
Declaration
public virtual Task OnStoreEventRecordsError<TEvent>(IEnumerable<IEventStorageRecord> records, int attemptCount, Exception exception, CancellationToken ct) where TEvent : class, IEvent
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IEventStorageRecord> | records | the event storage records that were supposed to be persisted |
| int | attemptCount | the number of times the operation was attempted |
| Exception | exception | the actual exception that was thrown by the operation |
| CancellationToken | ct | cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
Type Parameters
| Name | Description |
|---|---|
| TEvent | the type of the events |