11.8. Connection Options Reference

Table 11.5. Connection Options (General)

Option name Value type Semantics
username string The username to use when authenticating to the broker.
password string The password to use when authenticating to the broker.
heartbeat integer Requests that heartbeats be sent every N seconds. If two successive heartbeats are missed, the connection is considered lost and will fail or start the reconnect process if configured to do so.
max-channels integer Restricts the maximum number of supported channels, to assist with tuning the Messaging API. Not supported in AMPQ 1.0.
max-frame-size integer
Restricts the maximum frame size, to assist with tuning the Messaging API. Not supported in AMPQ 1.0.
The minimum value should be at least 4096B; anything lower will cause authentication failures. The product does not enforce this restriction.
protocol string The AMQP protocol to use. The recognized values are 'amqp1.0' and 'amqp0-10'. AMQP 0-10 is the default. Note: Not supported in Python client.
reconnect boolean Transparently reconnect if the connection is lost.
reconnect_urls Broker address list A list of one or more brokers to attempt communication with when a connection fails.
reconnect_urls_replace boolean Controls how setting the reconnect_urls option is treated. If true, setting reconnect_urls causes the old list to be replaced with the new one. If false, the new list is appended to the old list. The default value is false.
reconnect_timeout float Total number of seconds to continue reconnection attempts before giving up and raising an exception.
reconnect_limit integer Maximum number of reconnection attempts before giving up and raising an exception.
reconnect_interval_min float Minimum number of seconds between reconnection attempts. The first reconnection attempt is made immediately; if that fails, the first reconnection delay is set to the value of reconnect_interval_min; if that attempt fails, the reconnect interval increases exponentially until a reconnection attempt succeeds or reconnect_interval_max is reached. This value can be fractional. For example, 0.001 sets the maximum reconnect interval to one millisecond.
reconnect_interval_max float Maximum reconnect interval in seconds. This value can be fractional. For example, 0.001 sets the maximum reconnect interval to one millisecond.
reconnect_interval float Sets both reconnection_interval_min and reconnection_interval_max to the same number of seconds.
sasl_mechanisms string The specific SASL mechanisms to use when authenticating to the broker as a space separated list.
sasl_service string The service name if needed by the SASL mechanism in use.
sasl_min_ssf integer The minimum acceptable security strength factor.
sasl_max_ssf integer The maximum acceptable security strength factor.
ssl_cert_name string Name of the certificate to use for a given client.
ssl_ignore_hostname_verification_failure boolean Disables authentication of the server to the client (and should be used only as a last resort). If set to true, the client can connect to the server even if the hostname used (or IP address) does not match what is in the servers certificate.
tcp_nodelay boolean Set tcp_no_delay, i.e. disable Nagle algorithm. Note: Not Supported in Python client.
transport string Sets the underlying transport protocol used. The default option is tcp. To enable ssl, set to ssl. The C++ client additionally supports rdma.

Table 11.6. Connection Options (Python Client Only)

Option name Value type Semantics
address_ttl float Time until cached address resolution expires.
host string The name or ip address of the remote host (overridden by url).
port integer The port number of the remote host (overridden by url).
ssl_certfile string File with client's public key (PEM format).
ssl_keyfile string File with client's private key (PEM format).
ssl_trustfile string File with trusted certificates to validate the server.
url string [ <username> [ / <password> ] @ ] <host> [ : <port> ].

Table 11.7. Connection Options (AMPQ 1.0 Only)

Option name Value type Semantics
container_id string The container ID to use for the connection.
nest_annotations boolean If true, annotations in received messages are presented as properties with keys x-amqp-delivery-annotations or x-amqp-delivery-annotations. The values consist of nested maps containing the annotations. If false, the annotations are merged in with the properties.
set_to_on_send boolean If true, all sent messages will have the to field set to the node name of the sender.
properties or client_properties integer The properties to include in the open frame sent.