Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete a User at RabbitMQ using Python

I have written that code but queue is not deleted:

import pika
import time
import json
import datetime

connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
channel = connection.channel()
channel.queue_delete(queue='hello')

I can delete queue name. but how can I delete user

like image 307
Arifur Rahim Avatar asked Oct 22 '25 07:10

Arifur Rahim


1 Answers

You can use the following command:

import os
os.system("rabbitmqctl delete_user my_user")

Here complete documentation: https://www.rabbitmq.com/rabbitmqctl.8.html

like image 94
sashaboulouds Avatar answered Oct 24 '25 20:10

sashaboulouds



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!