'Init the connection to the rabbitmq server.'

def init(self):

    if (not self.export_enable):
        return None
    try:
        parameters = pika.URLParameters((((((((('amqp://' + self.user) + ':') + self.password) + '@') + self.host) + ':') + self.port) + '/'))
        connection = pika.BlockingConnection(parameters)
        channel = connection.channel()
        return channel
    except Exception as e:
        logger.critical(('Connection    to    rabbitMQ    failed    :    %s    ' % e))
        return None
