Redundancy Configuration

The connector has three leader election modes for redundancy:

Leader Election Mode Description

Standalone (Default)

A single instance of a connector without any leader election capabilities.

Active-Active

A participant in a cluster of connector instances where all instances are active.

Active-Standby

A participant in a cluster of connector instances where only one instance is active (i.e. the leader), and the others are standby.

Operators can configure the leader election mode by setting the following configuration:

solace.connector.management.leader-election.mode
=(standalone|active_active|active_standby)

Leader Election Modes: Standalone and Active-Active

When the connector starts, all enabled workflows start at the same time. The connector itself is considered as always active.

Leader Election Mode: Active-Standby

If the connector is in the active-standby mode, a PubSub+ management session and management queue must be configured as follows:

solace.connector.leader-election.mode=active_standby

# Management session
# Exact same interface as solace.java.*
solace.connector.management.session.host=<management-host>
solace.connector.management.session.msgVpn=<management-vpn>
solace.connector.management.session.client-username=<client-username>
solace.connector.management.session.client-password=<client-password>
solace.connector.management.session.<other-property-name>=<value>

# Management queue name accessible by the management session
# Must have exclusive access type
solace.connector.management.queue=<management-queue-name>

To determine if the connector is active or standby, it creates a flow to the management queue. If this flow is active, the connector’s state is active and it will start its enabled workflows. If this flow is inactive, the connector’s state is standby and it will stop its enabled workflows.

At a macro level for a cluster of connectors, failover only happens when there are infrastructure failures (for example, the JVM goes down or networking failures to the management queue occur).

If a workflow fails to start or stop during failover, it will retry up to some maximum defined by the configuration option, solace.connector.management.leader-election.fail-over.max-attempts.

During failover, the connector attempts to start or stop all enabled workflows. After an attempt has been made to start or stop each workflow, the connector transitions to the active/standby mode regardless of the status of the workflows.

Leader Election Management Endpoint

A custom leaderelection management endpoint was provided using Spring Actuator.

Operators can navigate to the connector’s leaderelection management endpoint to view its leader election status.

Endpoint Operation Payloads

/leaderelection

Read

(HTTP GET)

Request: None.

Response:

For connector versions 2.0.0 and later:

{
  "mode": {
    "type": "(standalone |
              active_active |
              active_standby)",
    "state": "(active | standby)",
    "source": {
      "queue": "<management-queue-name>",
      "host": "<management-host>",
      "msgVpn": "<management-vpn>"   
    }
  }
}

The type and state objects always appear in the response, while source only appears in the response when the response for type is active_standby.

For connector versions earlier than 2.0.0:

{
 "state": "(active|standby)",
 "mode":
"(standalone|active_active|active_standby)"
}