purge

suspend fun purge(queue: PgMqClient.Queue): Result<Long>(source)

Removes all messages from the specified queue.

This function purges the queue by deleting all messages it contains. The number of messages removed as a result of the operation is returned.

Return

A Result containing the number of messages purged from the queue, or an error if the operation fails.

Parameters

queue

The queue to be purged, represented by its configuration.