Skip to content
This repository has been archived by the owner on Feb 15, 2018. It is now read-only.

Consul Configuration

D Corbacho edited this page Apr 4, 2017 · 17 revisions

The following settings impact the configuration of the Consul backend for the autocluster plugin:

Consul Scheme
The URI scheme to use when connecting to Consul
Consul Host
The hostname to use when connecting to Consul's API
Consul Port
The port to use when connecting to Consul's API
Consul ACL Token
The Consul access token to use when registering the node with Consul (optional)
Service Name
The name of the service to register with Consul for automatic clustering
Service Address
An IP address or host name to use when registering the service. This is useful when you are testing with a single Consul server instead of having an agent for every RabbitMQ node. If this is specified, the value will automatically be appended to the service ID. (optional) - Added in v0.5
Service Auto Address
Use the hostname of the current machine for the service address when registering the service with Consul. This is useful when you are testing with a single Consul server instead of having an agent for every RabbitMQ node. If this is enabled, the hostname will automatically be appended to the service ID. (optional) - Added in v0.5
Service Auto Address by NIC
Use the IP address of the specified network interface controller (NIC) as the service address when registering with Consul. (optional) - Added in v0.6
Service Port

Used to set a port for the service in Consul, allowing for the automatic clustering service registration to double as a general RabbitMQ service registration.

Note: Set the CONSUL_SVC_PORT to an empty value to disable port announcement and health checking. For example: CONSUL_SVC_PORT=""

Service TTL
Used to specify the Consul health check TTL interval that is used to let Consul know that RabbitMQ is alive an healthy.

Configuration Details

Setting Environment Variable Setting Key Type Default
Consul Scheme CONSUL_SCHEME consul_scheme string http
Consul Host CONSUL_HOST consul_host string localhost
Consul Port CONSUL_PORT consul_port integer 8500
Consul ACL Token CONSUL_ACL_TOKEN consul_acl_token string  
Service Name CONSUL_SVC consul_svc string rabbitmq
Service Address CONSUL_SVC_ADDR consul_svc_addr string  
Service Auto Address CONSUL_SVC_ADDR_AUTO consul_svc_addr_auto boolean false
Service Auto Address by NIC CONSUL_SVC_ADDR_NIC consul_svc_addr_nic string  
Service Port CONSUL_SVC_PORT consul_svc_port integer 5672
Service TTL CONSUL_SVC_TTL consul_svc_ttl integer 30

Example rabbitmq.config

[{autocluster,
  [
    {backend, consul},
    {consul_host, "localhost"},
    {consul_port, 8500},
    {consul_acl_token, "example-acl-token"},
    {consul_svc, "rabbitmq-test"},
    {cluster_name, "test"}
  ]}
].
  • Home
  • Configuration
    • [General Settings](General Settings)
    • [AWS](AWS Configuration)
    • [Consul](Consul Configuration)
    • [DNS](DNS Configuration)
    • [etcd](etcd Configuration)
    • [k8s](k8s Configuration)
  • Development
  • Roadmap
Clone this wiki locally