Check if a RabbitMQ Queue exists

In order to use the management module you first need to install the python library, requests.

pip install amqpstorm[management]
from amqpstorm import management

if __name__ == '__main__':
    # If using a self-signed certificate, change verify=True to point at your CA bundle.
    # You can disable certificate verification for testing by passing in verify=False.
    API = management.ManagementApi('', 'guest',
                                   'guest', verify=True)
        API.queue.declare('my_queue', virtual_host='/', passive=True)
        print('Queue does exist...')
    except management.ApiConnectionError as why:
        print('Connection Error: %s' % why)
    except management.ApiError as why:
        if why.error_code != 404:
        print('Queue does not exist')