SwiftMQ Documentation

SwiftMQ Documentation

  • Client
  • CE
  • UR
  • HA
  • Javadocs
  • Release Notes

›SwiftMQ HA

SwiftMQ Client

  • Getting Started
  • JNDI Client
  • JMS Client
  • AMQP 1.0 Client
  • Filetransfer Client

SwiftMQ CE

  • Getting Started
  • Installation
  • Upgrade
  • Software Architecture
  • Administration

    • Preconfig
    • CLI Command Line Interface
    • JMX Administration
    • CLI Message Interface
    • routerconfig.xml Watch Dog
    • System Properties

    Swiftlets

    • AMQP Swiftlet
    • Authentication Swiftlet
    • Deploy Swiftlet
    • JMS Swiftlet
    • JNDI Swiftlet
    • Log Swiftlet
    • Management Swiftlet
    • MQTT Swiftlet
    • Network Swiftlet
    • Queue Manager Swiftlet
    • Routing Swiftlet
    • Scheduler Swiftlet
    • Store Swiftlet
    • Streams Swiftlet
    • Threadpool Swiftlet
    • Timer Swiftlet
    • Topic Manager Swiftlet
    • Trace Swiftlet
    • XA Resource Manager Swiftlet

    APIs

    • CLI Admin API

    How To

    • TLS Configuration
    • HTTP Tunneling Configuration
    • Upgrade SwiftMQ Router and Clients

    In Depth

    • Versioning
    • File Store

SwiftMQ UR

  • Getting Started
  • License
  • Installation
  • Upgrade
  • Administration

    • SwiftMQ Explorer

    Swiftlets

    • JDBC Authentication Swiftlet
    • FileCache Swiftlet
    • JMS Application Container Swiftlet
    • JMS XA Swiftlet
    • JDBC Store Swiftlet
    • AMQP Bridge Extension Swiftlet
    • JMS Bridge Extension Swiftlet
    • JavaMail Bridge Extension Swiftlet
    • Replicator Extension Swiftlet

SwiftMQ HA

  • Getting Started
  • License
  • Installation
  • Upgrade
  • HA Introduction
  • HA Deployment
  • Administration
  • JNDI/JMS under HA
  • Routing under HA
  • Advanced Configuration
  • HA Test Suite

Administration

CLI Command Line Interface

Connect to SwiftMQ HA Router

CLI connects to the ACTIVE HA instance. The STANDBY HA instance is hidden. CLI automatically reconnects after a failover and has always a connection to the ACTIVE HA instance.

Requests during Failover

CLI interacts with the Management Swiftlet of the ACTIVE HA instance in a request/reply manner. If a request (e.g. configuration change or viewing queue messages) is issued and a failover occurs before a reply to this request is received, the request will be canceled with a warning message. The request must be issued again after the failover.

CLI Admin API

There is a new CLIReconnectedException (extends CLIException) that can be used to recreate a CLI context after a failover. See the CLI Admin API documentation for detailed information and code samples.

Additional Commands

To manage both HA instances, CLI in HA edition has additional commands resp commands have changed behavior. These commands are located at the level of the router's Swiftlet Manager.

Commands with different behavior are:

Command Description
reboot Reboot ACTIVE and STANDBY HA instance
halt Halt ACTIVE and STANDBY HA instance
save Save ACTIVE and STANDBY configuration

New commands are:

Command Description
rebootactive Reboot ACTIVE HA instance
rebootstandby Reboot STANDBY HA instance
haltactive Halt ACTIVE HA instance
haltstandby Halt STANDBY HA instance

SwiftMQ Explorer

Connect to SwiftMQ HA Router

SwiftMQ Explorer connects to the ACTIVE HA instance. The STANDBY HA instance is hidden. SwiftMQ Explorer automatically reconnects after a failover and displays the same set of open frames. So it has always a connection to the ACTIVE HA instance.

Administration

Configuration Changes

Configuration changes are automatically replicated to the STANDBY HA instance. It doesn't matter if the STANDBY HA instance is not connected (state STANDALONE). Once it connects, the ACTIVE HA instance replicates the whole configuration to the STANDBY, so both HA instances are always in sync and consistent and configuration changes can be done at any time, no matter if the STANDBY is connected or not.

There are some configuration entities that are bound to the resp. HA instance (e.g. trace settings). These entities are not replicated. The High Availability Controller Swiftlet controls configuration replication. Under Configuration Controller / Replication Excludes is a list of configuration contexts (SQL LIKE predicates) that defines the elements that are excluded from replication. Never change this list! Example:

Requests during Failover

SwiftMQ Explorer interacts with the Management Swiftlet of the ACTIVE HA instance in a request/reply manner. If a request (e.g. configuration change or viewing queue messages) is issued and a failover occurs before a reply to this request is received, the request will be canceled with a warning message. The request must be issued again after the failover.

Additional Commands

SwiftMQ Explorer in HA edition has additional commands to manage both HA instances. These commands are located at the router node and shown in a popup menu on a right mouse click. See below (self-explanatory):

Router Configuration File

SwiftMQ HA Router consists of 2 HA instances. Each HA instance has a configuration file. It is recommended to apply changes via SwiftMQ Explorer or CLI. If you want to change directly in the configuration file, you must apply changes at both HA instances (hence, both instances must be stopped). If you apply changes at the STANDBY HA instance only, it has no effect (except for instance specific changes, see below), because the STANDBY overwrites its copy with the configuration from the ACTIVE instance during connect.

Release 9.4.2 introduces a watch dog that detects and applies changes directly from the routerconfig.xml to a running HA instance. Note that general changes such as new queues etc must be applied to the ACTIVE resp. STANDALONE HA instance. Instance specific configuration such as logging and tracing can also be applied to the STANDBY HA instance.

The configuration files are store below directory "config" of the HA instance.

Instance specific Configuration

Some parts of the configuration file are instance specific. These are:

  • Deploy Swiftlet (sys$deploy)
  • Parts of the HA Controller Swiftlet (sys$hacontroller), see HA Controller Swiftlet documentation
  • Log Swiftlet (sys$log)
  • Store Swiftlet (sys$store)
  • Trace Swiftlet (sys$trace)

These parts will not be overwritten. For example, if you want to change the JDBC connection pool setting at the STANDBY HA instance, shut it down, apply the change in the routerconfig.xml and restart it. The STANDBY will use the changed configuration when it becomes the ACTIVE HA instance (after a failover).

HA Router specific Configuration

There are some entries at the top of the configuration file to configure the transition from one HA state to another:

<ha-router>
    <state-transition last="UNKNOWN" current="STANDALONE" operation="start" ..."/>
    <state-transition last="UNKNOWN" current="ACTIVE_SYNC_PREPARE" operation="start" ..."/>
    <state-transition last="UNKNOWN" current="STANDBY_SYNC_PREPARE" operation="standby" ..."/>
    <state-transition last="STANDBY%" current="STANDALONE" operation="resume" ..."/>
</ha-router>

These parts are static. Never change it!

← HA DeploymentJNDI/JMS under HA →
  • CLI Command Line Interface
    • Connect to SwiftMQ HA Router
    • Requests during Failover
    • CLI Admin API
    • Additional Commands
  • SwiftMQ Explorer
    • Connect to SwiftMQ HA Router
    • Administration
  • Router Configuration File
    • Instance specific Configuration
    • HA Router specific Configuration
Copyright © 2020 IIT Software GmbH