'This method connects to RabbitMQ, returning the connection handle.
When the connection is established, the on_connection_open method
will be invoked by pika. If you want the reconnection to work, make
sure you set stop_ioloop_on_close to False, which is not the default
behavior of this adapter.
:rtype: pika.SelectConnection'

def connect(self):

    LOGGER.info('Connecting    to    %s', self._url)
    return pika.SelectConnection(pika.URLParameters(self._url), on_open_callback=self.on_connection_open, on_close_callback=self.on_connection_closed, stop_ioloop_on_close=False)
