delete

suspend fun delete(queue: String, id: Long): Result<Boolean>(source)

Deletes an item with the specified ID from the given queue.

Return

A Result indicating whether the deletion was successful as a Boolean.

Parameters

queue

The name of the queue from which the item will be deleted.

id

The unique identifier of the item to be deleted.


suspend fun delete(queue: String, ids: List<Long>): Result<List<Long>>(source)

Deletes the specified items from the given queue.

Return

A Result containing a list of successfully deleted item identifiers.

Parameters

queue

The name of the queue from which items will be deleted.

ids

A list of identifiers representing the items to be deleted from the queue.


context(db: QueryExecutor)
suspend fun delete(queue: String, id: Long): Result<Boolean>(source)

Deletes a message from the specified queue based on its unique identifier.

Return

a Result wrapping a Boolean indicating whether the deletion was successful

Parameters

queue

the name of the queue from which the message should be deleted

id

the unique identifier of the message to delete


context(db: QueryExecutor)
suspend fun delete(queue: String, ids: List<Long>): Result<List<Long>>(source)

Deletes messages from the specified queue based on the provided list of IDs.

Return

A Result containing a list of IDs that were successfully deleted. If not all IDs could be deleted, the operation will fail with an exception.

Parameters

queue

The name of the queue from which messages should be deleted.

ids

A list of message IDs to be deleted.