High Quality JMS Messaging.

Enabling JMX (Java Management Extensions)

The Management Swiftlet of SwiftMQ 6.1.0 onwards provide JMX support by wrapping the router's management tree with MBeans and thus expose the management tree with all attributes and operations via a standard JMX interface.

Because creating and maintaining hundreds of dynamic MBeans consumes resources, JMX support is disabled by default. Enabling JMX requires that the SwiftMQ Router runs with JDK 1.5 or above. To enable JMX, set attribute "enabled" of entity "jmx" to "true":

    <swiftlet name="sys$mgmt">
      <jmx enabled="true" />
    </swiftlet>

This can be done in the routerconfig.xml before router startup or dynamically via SwiftMQ Explorer/CLI.

JMX must further be enabled on the JVM level by specifying the following system properties:

    -Dcom.sun.management.jmxremote.port=8999
    -Dcom.sun.management.jmxremote.ssl=false
    -Dcom.sun.management.jmxremote.authenticate=false

The port and whether to use JMX via SSL, with/without authentication is configurable, of course. Please consult the JMX documentation for further information.

The router is now managable with your favorite JMX management tool.

Object Names

SwiftMQ's management tree is hierachical. Some JMX management tools like jConsole are able to group MBeans if the MBean's object name contains a hierachy within their key=value pairs. The content of the MBean's object name can be controlled via attribute "groupable-objectnames" of entity "jmx". If set to "true" (default), an object name is grouped by using "node" and a sequence number as the key name. The following example shows a groupable object name of entity "/sys$queuemanager/queues/testqueue":

      com.swiftmq.router1:node0=sys$queuemanager, node1=queues, node2=testqueue

As shown, the JMX domain name is always "com.swiftmq." appended with the router name.

Appearance in jConsole with grouped object names:

If attribute "groupable-objectnames" is set to "false", the object names are flat and equal to the CLI context names:

      com.swiftmq.router1:type=/sys$queuemanager/queues/testqueue

Example to configure flat object names:

      <swiftlet name="sys$mgmt">
        <jmx enabled="true" groupable-objectnames="false"/>
      </swiftlet>

Appearance in jConsole with flat object names:

MBean Server

MBeans are registered at a MBean server. SwiftMQ registers its MBeans per default at the platform MBean server. However, it can also be configured to register at another one or even create a new one. This is controlled via entity "mbean-server" which is a sub-entity of "jmx".

Example to use a named MBean server:

      <swiftlet name="sys$mgmt">
        <jmx enabled="true">
          <mbean-server usage-option="use-named-server" server-name="SwiftMQ" />
        </jmx>
      </swiftlet>

If the named MBean server is not defined, it is created and a message is logged to the warning.log.

Example to create a named MBean server:

      <swiftlet name="sys$mgmt">
        <jmx enabled="true">
          <mbean-server usage-option="create-named-server" server-name="SwiftMQ" />
        </jmx>
      </swiftlet>