def METHOD_NAME(self):
    if pika is None:
        raise MissingDependencyError("pika")
    self._connection = None
    self.channel = None
    pika_version = tuple(int(x) for x in pika.__version__.split('.'))
    self.kwargs = {}
    if pika_version < (0, 11):
        self.kwargs['heartbeat_interval'] = self.connection_heartbeat
    else:
        self.kwargs['heartbeat'] = self.connection_heartbeat
    if pika_version < (1, ):
        # https://groups.google.com/forum/#!topic/pika-python/gz7lZtPRq4Q
        self.publish_raises_nack = False
    else:
        self.publish_raises_nack = True
    if self.username is not None and self.password is not None:
        self.kwargs['credentials'] = pika.PlainCredentials(self.username,
                                                           self.password)
    if self.use_ssl:
        self.kwargs['ssl_options'] = pika.SSLOptions(context=ssl.create_default_context(ssl.Purpose.CLIENT_AUTH))
    self.connection_parameters = pika.ConnectionParameters(
        host=self.connection_host,
        port=self.connection_port,
        virtual_host=self.connection_vhost,
        connection_attempts=self.connection_attempts,
        **self.kwargs)
    self.routing_key = self.routing_key
    self.properties = pika.BasicProperties(
        content_type=self.content_type, delivery_mode=self.delivery_mode)
    self.connect_server()