17.11. Class PullQueueStorage

Namespace: ArmoniK.Core.Adapters.Amqp
Assembly: ArmoniK.Core.Adapters.Amqp.dll

public class PullQueueStorage : QueueStorage, IPullQueueStorage, IQueueStorage, IInitializable, IHealthCheckProvider

17.11.1. Inheritance

objectQueueStorageBaseQueueStoragePullQueueStorage

17.11.2. Implements

IPullQueueStorage, IQueueStorage, IInitializable, IHealthCheckProvider

17.11.3. Inherited Members

QueueStorage.ConnectionAmqp, QueueStorage.NbLinks, QueueStorage.Init(CancellationToken), QueueStorageBase.Options, QueueStorageBase.IsInitialized, QueueStorageBase.Init(CancellationToken), QueueStorageBase.Check(HealthCheckTag), QueueStorageBase.MaxPriority, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

17.11.4. Constructors

17.11.4.1. PullQueueStorage(Amqp, IConnectionAmqp, ILogger<PullQueueStorage>)

public PullQueueStorage(Amqp options, IConnectionAmqp connectionAmqp, ILogger<PullQueueStorage> logger)

17.11.4.1.1. Parameters

options Amqp

connectionAmqp IConnectionAmqp

logger ILogger<PullQueueStorage>

17.11.5. Methods

17.11.5.1. Check(HealthCheckTag)

Checks the status of a class for the given health check type.

public override Task<HealthCheckResult> Check(HealthCheckTag tag)

17.11.5.1.1. Parameters

tag HealthCheckTag

Health check for which the class has to answer.

17.11.5.1.2. Returns

Task<HealthCheckResult>

The result of the check containing the status of the class for the health check type.

17.11.5.2. Init(CancellationToken)

Executes an initialization process for the class

public override Task Init(CancellationToken cancellationToken)

17.11.5.2.1. Parameters

cancellationToken CancellationToken

Token used to cancel the execution of the method

17.11.5.2.2. Returns

Task

Task representing the asynchronous execution of the method

17.11.5.3. PullMessagesAsync(int, CancellationToken)

Gets messages from the queue

public IAsyncEnumerable<IQueueMessageHandler> PullMessagesAsync(int nbMessages, CancellationToken cancellationToken = default)

17.11.5.3.1. Parameters

nbMessages int

Number of messages to retrieve

cancellationToken CancellationToken

Token used to cancel the execution of the method

17.11.5.3.2. Returns

IAsyncEnumerable<IQueueMessageHandler>

Enumerator allowing async iteration over the message queue