Skip to content

Instantly share code, notes, and snippets.

@MarounMaroun
Created September 4, 2019 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarounMaroun/e8096299b6c6f2f2a157d625fa079465 to your computer and use it in GitHub Desktop.
Save MarounMaroun/e8096299b6c6f2f2a157d625fa079465 to your computer and use it in GitHub Desktop.
Get RabbitMQ queues consumers
import requests
import json
uri = 'http://localhost:15677/api/queues'
res = json.loads(requests.get(uri, auth=('username', 'password')).content)
for i in res:
print('{:<40}: {} {}'.format(i.get('name'), i.get('state'), i.get('consumers')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment