High Availability Cluster 2.7.0

This document describes the topic based mechanism for controlling high availability clusters in Mosquitto.

JSON commands are published to the topic $CONTROL/cedalo/ha/v1. Responses will be published to $CONTROL/cedalo/ha/v1/response.

The HA plugin also integrates the Dynamic Security plugin for access control.

Operations

  • PUB $CONTROL/cedalo/ha/v1

    Accepts the following message:

    Request to execute commands on the control APIcontrolRequest
    object
    uid: controlRequestPayload

    Examples

  • SUB $CONTROL/cedalo/ha/v1/response

    Accepts the following message:

    Response to processed control commandscontrolResponse
    object
    uid: controlResponsePayload

    Examples

Messages

  • #1Request to execute commands on the control APIcontrolRequest
    object
    uid: controlRequestPayload
  • #2Response to processed control commandscontrolResponse
    object
    uid: controlResponsePayload

Schemas

  • object
    uid: controlRequestPayload
  • object
    uid: controlResponsePayload
  • command
    string
    uid: command

    Command which describes the action processed by the plugin.

      Allowed values:
    • "createCluster"
    • "addNode"
    • "removeNode"
    • "joinCluster"
    • "leaveCluster"
    • "deleteCluster"
    • "getCluster"
    • "getRaftStatus"
    • "isLeader"
    • "setLeader"
  • clustername
    string
    uid: clustername

    clustername currently has no purpose other than being a human friendly identifier.

  • array<object>
    >= 3 itemsuid: nodes
  • address
    string
    uid: address

    IP address or hostname of the cluster node.

  • port
    integer
    uid: port

    Port used for the cluster communication, typically 7000.

  • nodeid
    integer
    >= 1uid: nodeid

    Unique identifier of the cluster node.

  • correlationData
    string
    uid: correlationData

    This is an optional value to be able to identify the relation between request and response. The plugin will add the provided value in the response message.

      Examples values:
    • "1234-request"