Skip to content

Configure AMQPConnection

Nathan Leach edited this page May 21, 2021 · 1 revision

An example AMQP connection configuration element is shown below:

  <AMQPConnection UserName="foo" Password="bar">
    <ClusterNodes>
      <Endpoint AmqpUri="amqp://localhost:5672"/>
      <Endpoint AmqpUri="amqps://hostname:5671">
        <SSLOptions AllowCertNameMismatch="false" AllowCertificateChainErrors="false" ServerName="myserver"/>
      </Endpoint>
    </ClusterNodes>
  </AMQPConnection>

AMQPConnection Element

The top level element of the connection configuration.

Attribute Name Required Default Description
UserName N guest The user name used to authenticate with the AMQP endpoint.
Password N guest The password used to authenticate with the AMQP endpoint.

Note that it is normal for the broker to block connections for the guest account unless it originates from the loopback interface.

ClusterNodes Element

A sub-element to AMQPConnection that contains zero or more Endpoint elements.

Endpoint Element

A sub-element to ClusterNodes that defines an AMQP endpoint. More than one endpoint can be configured and connections will be made on the first endpoint found to successfully connect and authenticate with the broker.

Attribute Name Required Default Description
AmqpUri Y N/A The amqp or amqps URI for the message broker.

SSLOptions Element

A sub-element to the Endpoint element. It is optional and only required to set specific SSL options when connecting to the parent Endpoint.

Attribute Name Required Default Description
ServerName N N/A The name expected on the SSL certificate presented by the r
ClientCertPath N N/A A filepath to a PEM encoded client certificate.
ClientCertPassphrase N N/A The password for the PEM encoded client certificate.
AllowCertNameMismatch N false Failures to match the host name in the AmqpUri to the certificate are ignored.
AllowCertificateChainErrors N false Missing certificates in the CA chain are accepted.