Table of Contents

Class EventsQueue

Namespace
ReflectionEventing.Queues
Assembly
ReflectionEventing.dll
public class EventsQueue : IEventsQueue
Inheritance
EventsQueue
Implements
Inherited Members

Methods

EnqueueAsync<TEvent>(TEvent, CancellationToken)

Appends an event to the queue asynchronously.

public virtual Task EnqueueAsync<TEvent>(TEvent @event, CancellationToken cancellationToken = default) where TEvent : class

Parameters

event TEvent

The event to append to the queue.

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

Task

A task that represents the asynchronous append operation.

Type Parameters

TEvent

EnqueueError(FailedEvent)

Appends a failed event to the error queue.

public void EnqueueError(FailedEvent fail)

Parameters

fail FailedEvent

The failed event to append to the error queue.

GetErrors()

Gets the events that failed processing from the error queue.

public IEnumerable<FailedEvent> GetErrors()

Returns

IEnumerable<FailedEvent>

An IEnumerable<T> of events that failed processing.

ReadEventsAsync(CancellationToken)

Reads the events from the queue asynchronously.

public IAsyncEnumerable<object> ReadEventsAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A token to monitor for cancellation requests.

Returns

IAsyncEnumerable<object>

An IAsyncEnumerable<T> of events from the queue.