Skip to content

HiveMQ Extension

Etcd Cluster Discovery

This extension allows your HiveMQ cluster nodes to discover each other dynamically by regularly exchanging their information via etcd.

Category: Cluster Discovery

Version: 0.1

License: Apache 2.0

Provider: MaibornWolff

Verified: No

Purpose

This HiveMQ extension allows your HiveMQ cluster nodes to discover each other dynamically by regularly exchanging their information via etcd.

HiveMQ instances are added at runtime as soon as they become available by placing their information, on how to connect to them, to the configured key. The extension will regularly check the configured etcd key for files from other HiveMQ nodes. Additionally every broker updates its own entry on a regular basis to prevent the entry from expiring.

Installation

Installing the extension for HiveMQ is very easy:

  1. Download the extension from GitHub’s release page.

  2. Copy the content of the zip file to the extensions folder of your HiveMQ nodes.

  3. Modify the etcdDiscovery.properties file for your needs or set environment variables

  4. Change the discovery mechanism of HiveMQ to extension.

Configuration

The information each node writes into etcd consists of an ip-address and a port. The ip-address and port are taken from the external-address and external-port which is configured in the cluster transport (config.xml). If they are not set, the bind-address and bind-port will be used.

The etcdDiscovery.properties can be reloaded during runtime.

Configuration from etcdDiscovery.properties will always take precedent over environment variables.

General Configuration

Config name Environment Required Description
key HIVEMQ_ETCD_KEYKey to store discovery entries at
etcd-endpoint HIVEMQ_ETCD_ENDPOINTXThe region in which this S3 bucket resides
etcd-port HIVEMQ_ETCD_PORTetcd port to connect at
expiration HIVEMQ_ETCD_EXPIRATIONTime in seconds after which an entry in etcd is considered expired
update-interval HIVEMQ_ETCD_UPDATE_INTERVALTime in seconds after which an entry in etcd is refreshed (Must be smaller than file-expiration)
use-tls HIVEMQ_ETCD_USE_TLSUse TLS for connection to etcd
ca-path HIVEMQ_ETCD_CA_PATHCertificate authority to use for validating tls connection to etcd - if not set, system certificates will be used

Default Configuration

key=/hivemq/discovery
etcd-endpoint=
etcd-port=2379
expiration=360
update-interval=180
use-tls=false
ca-path=

Need Help?

We're always happy to answer any questions you may have during installation. The best place to get in contact is our community forum.

Get started with HiveMQ today

Choose between a fully-managed cloud or self-managed MQTT platform. Our MQTT experts can help you with your solution and demonstrate HiveMQ in action.

HiveMQ logo
Review HiveMQ on G2