Table of Contents

Interface IMessageQueueService<T>

Namespace
FoundationaLLM.DataPipelineEngine.Interfaces
Assembly
FoundationaLLM.DataPipelineEngine.dll

Defines the interface for a message queue service.

public interface IMessageQueueService<T>

Type Parameters

T
Extension Methods

Methods

DeleteMessage(DequeuedMessage<T>)

Deletes a message from the queue.

Task<bool> DeleteMessage(DequeuedMessage<T> message)

Parameters

message DequeuedMessage<T>

The message to be deleted.

Returns

Task<bool>

true if the message was successfully deleted, false otherwise.

MessagesAvailable()

Inidicates whether there are messages available in the queue.

Task<bool> MessagesAvailable()

Returns

Task<bool>

true if there are messages available, false otherwise.

ReceiveMessages(int)

Receives a specified number of messages from the queue.

Task<IEnumerable<DequeuedMessage<T>>> ReceiveMessages(int messageCount)

Parameters

messageCount int

The number of messages to receive.

Returns

Task<IEnumerable<DequeuedMessage<T>>>

A list of dequeued messages.

UpdateMessageVisibilityTimeout(DequeuedMessage<T>, bool)

Updates the visibility timeout of a message in the queue.

Task<DequeuedMessage<T>?> UpdateMessageVisibilityTimeout(DequeuedMessage<T> message, bool recoverFromError = false)

Parameters

message DequeuedMessage<T>

The message whose visibility timeout is updated.

recoverFromError bool

Indicates whether the reason for the update is the need to recover from an error or not.

Returns

Task<DequeuedMessage<T>>

A copy of the original dequeued message with the updated visibility timeout.