Router Configuration File

Location

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. Read more here.

The configuration files are store below directory "config" of the HA instance. The location depends on the type of persistent store and the instance. For example, HA instance 2 with replicated store can be found under "config/replicated/instance2".

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!