exchange_delete
Deletes a specified exchange from the AMQP broker, optionally checking if it is currently unused. This function requires an active channel connection and will attempt to reconnect if the connection is missing or an error occurs during the deletion process.
def exchange_delete(
amqp_context: object,
exchange: string,
if_unused: boolean
) - > null
Deletes an existing exchange from the AMQP broker to stop it from routing messages.
Parameters
| Name | Type | Description |
|---|---|---|
| amqp_context | object | The application context containing the active AMQP channel and connection state. |
| exchange | string | The name of the exchange to be removed from the broker. |
| if_unused | boolean | If true, the exchange will only be deleted if it has no active bindings. |
Returns
| Type | Description |
|---|---|
null | Nothing is returned; the function outputs success or error messages to the console via the context object. |