High Quality JMS Messaging.

Introduction

CLI is a command line interface for remote configuration and administration of SwiftMQ routers. CLI's access takes place via JMS, so every JMS listener with his specific socketfactory (i.e. SSL) can be used for configuration.

By accessing one router of a connected router network via CLI, all routers of this network can be configured if the specific user has a send grant for queue swiftmqmgmt on each of this routers. The grant must be defined on the router where CLI is connected to.

Starting CLI

CLI can be started by the platform specific scripts provided in the scripts directory of the SwiftMQ distribution or by the following command:

    java com.swiftmq.admin.cli.CLI <jndi-url> <qcf>

Where <jndi-url> is the JNDI-Provider-URL for JNDI-Lookups and <qcf> is the name of the queue connection factory to lookup.

The JNDI provider URL specifies the properties of the underlying JMS connection with the following format:

   smqp://[<user>[:<password>]@](<host>:<port>)|"intravm"[/[type=<type>]
    [;timeout=<long>][;keepalive=<long>]

Where

   smqp       ::=  Specifies the SwiftMQ Protocol
   <user>     ::=  Username. Default is 'anonymous'
   <password> ::=  User's password. Default is null.
   <host>     ::=  DNS hostname of the router or the keyword "intravm" to connect intra-VM
   <port>     ::=  JMS listener port
   type       ::=  Class name of the socket factory used by this JMS listener.
                   In this release, com.swifmq.net.PlainSocketFactory and
                   com.swiftmq.net.JSSESocketFactory are available. Default is
                   com.swifmq.net.PlainSocketFactory. See JMSSwiftlet configuration for details.
   timeout    ::=  Specifies a timeout in milliseconds for lookups. If no JNDI object is
                   received within this time, the lookup throws a NamingException. Default is no timeout;
                   lookups are waiting until they receive the requested JNDI objects.
   keepalive  ::=  Specifies a keepalive interval in milliseconds. If this value is greater 0, a
                   timer is created on the client side to send keepalive messages to detect broken
                   JNDI connections. Default is 0 (no keepalive). This option is new since SwiftMQ 5.0.0.

Connect to an older versioned SwiftMQ Router (since 7.3.2)

Since SwiftMQ 7.3.2 it is possible to connect with a newer versioned CLI to an older versioned SwiftMQ Router to manage it, e.g. to use the CLI features of 7.3.0 on a SwiftMQ Router 5.2.5. More here.

Management Tree

CLI is organized as a tree of management contexts. At the top level there are the available routers. Each router has a number of Swiftlets, and each Swiftlet can have entity lists and properties, each entity list can have a number of entities, and each entity can have a number of properties.

CLI provides commands to switch between router contexts, to navigate within a context, to add/remove entities, to change properties, to save router configurations, and to reboot or halt routers.