Created
September 4, 2019 07:28
-
-
Save MarounMaroun/e8096299b6c6f2f2a157d625fa079465 to your computer and use it in GitHub Desktop.
Get RabbitMQ queues consumers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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