Rabbit Mq
Liste le nombres de messages en queue :
rabbitmqctl list_queues | awk '{ print $2 " " $1}' | sort -nr | head -n 20
rabbitmqadmin list queues name
rabbitmqctl list_queues | grep nom de la queue
Suppression d'une queue :
for i in $(rabbitmqctl -q list_queues name | grep 'nomdelaqueue'); do rabbitmqadmin -u username -p password delete queue name=$i; done
rabbitmqadmin delete queue name='queuename'
Boucle d'affichage des queues :
for i in `rabbitmqctl list_vhosts | grep -v Listing`; do echo $i; rabbitmqctl list_queues -p $i | grep -Ev "amq.gen|Listing" | awk '{ print $2 " " $1}' | sort -nr; echo ""; done | grep -Ev '^0 '