'Establish a connection to the message broker.
Please use :meth:`connection_for_read` and
:meth:`connection_for_write` instead, to convey the intent
of use for this connection.
Arguments:
url: Either the URL or the hostname of the broker to use.
hostname (str): URL, Hostname/IP-address of the broker.
If a URL is used, then the other argument below will
be taken from the URL instead.
userid (str): Username to authenticate as.
password (str): Password to authenticate with
virtual_host (str): Virtual host to use (domain).
port (int): Port to connect to.
ssl (bool, Dict): Defaults to the :setting:`broker_use_ssl`
setting.
transport (str): defaults to the :setting:`broker_transport`
setting.
transport_options (Dict): Dictionary of transport specific options.
heartbeat (int): AMQP Heartbeat in seconds (``pyamqp`` only).
login_method (str): Custom login method to use (AMQP only).
failover_strategy (str, Callable): Custom failover strategy.
**kwargs: Additional arguments to :class:`kombu.Connection`.
Returns:
kombu.Connection: the lazy connection instance.'

def connection(self, hostname=None, userid=None, password=None, virtual_host=None, port=None, ssl=None, connect_timeout=None, transport=None, transport_options=None, heartbeat=None, login_method=None, failover_strategy=None, **kwargs):

    return self.connection_for_write((hostname or self.conf.broker_write_url), userid=userid, password=password, virtual_host=virtual_host, port=port, ssl=ssl, connect_timeout=connect_timeout, transport=transport, transport_options=transport_options, heartbeat=heartbeat, login_method=login_method, failover_strategy=failover_strategy, **kwargs)
