read

suspend fun read(queue: String, quantity: Int = 1, vt: Duration = 30.seconds): Result<List<Message>>(source)

Reads messages from a specified queue.

Return

A Result containing a list of messages read from the queue.

Parameters

queue

The name of the queue to read messages from.

quantity

The number of messages to read. Defaults to 1 if not provided.

vt

The visibility timeout duration for the messages. Defaults to 30 seconds if not provided.


context(db: QueryExecutor)
suspend fun read(queue: String, quantity: Int = 1, vt: Duration = 30.seconds): Result<List<Message>>(source)

Reads messages from a specified queue with the given parameters.

Return

A Result containing a list of read messages.

Parameters

queue

The name of the queue from which messages are to be read.

quantity

The number of messages to read from the queue. Defaults to 1 if not specified.

vt

The visibility timeout duration for the messages. Defaults to 30 seconds if not specified.