queue_purge
Purges all messages from a specified AMQP queue and displays the count of deleted messages. This function requires an active broker connection and will attempt to reconnect if the channel is unavailable or an error occurs during the operation.
def queue_purge(
amqp_context: object,
queue: string
) - > null
Removes all messages from a specified AMQP queue without deleting the queue itself.
Parameters
| Name | Type | Description |
|---|---|---|
| amqp_context | object | The application context containing the active AMQP channel, connection state, and CLI output utilities. |
| queue | string | The name of the AMQP queue to be emptied of all pending messages. |
Returns
| Type | Description |
|---|---|
null | This function does not return a value; it outputs the count of deleted messages to the console. |