Skip to main content
Skip table of contents

CLI Command Line Interface

Starting CLI (JMS Version)

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

CODE
      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:

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

Where

CODE
     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.

Starting CLI (AMQP Version)

To start CLI (AMQP Version), perform a

CODE
       ./cliamqp

from the scripts directory. As username/password press the return key (anonymous) or use admin, password secret.

The AMQP-URL has the following format:

CODE
     amqp[s]://<host>:<port>[/?<param>[&<param>...]]

     Where

     amqp      ::= AMQP protocol over plain sockets.
     amqps     ::= AMQP protocol over SSL sockets.
     <host>    ::= Hostname.
     <port>    ::= Port. 5672 is for plain, 5661 for SSL.
     <param>   ::= Parameter in form <name>=<value>.

          Possible parameters are:

             maxframesize   Sets the AMQP max frame size. Value is in bytes. Default unlimited.
             idletimeout    Closes the connection after no data has been sent for this amount of time.
                            Value is in milliseconds. Default no timeout.
             mechanism      SASL authentication mechanism like CRAM-MD5.

Executing CLI Scripts

Overview

CLI is able to process CLI commands from a file. These files are called 'CLI Scripts'. To run a CLI script, put the filename as the 3rd parameter of the CLI command line. CLI processes these commands just like they were typed via the keyboard. Comments inside the scriptfiles could be marked with a # in the first column of the line.

Using the 'clis' shell script

Normally, CLI prompts for username/password after starting. To avoid this, define username/password as system properties on the commandline:

Example:

CODE
      java -Dcli.username=admin -Dcli.password=secret com.swiftmq.admin.cli.CLI \
            smqp://localhost:4001 plainsocket@router1 jmsusage.cli

The distribution contains 2 example CLI scripts, jmsusage.cli and shutdown.cli. The first one displays the current JMS connections and running JMS threads, the second one performs a shutdown on the distributions router1.

Here is the content of jmsusage.cli:

CODE
      # CLI-Script to show the actual JMS connections
      #
      sr router1
      lc sys$jms/usage
      exit

The transcript of using it (we've used the 'clis' shell script in the distributions scripts directory):

CODE
      $pamela>./clis admin secret jmsusage.cli
      Router 'router1' is available for administration.

      Entity List: Usage
      Description: List of all active JMS Connections

      Entities in this List:
      ----------------------
      pamela.iit.de:1037
      pamela.iit.de:1039

      $pamela>_

And here that of shutdown.cli:

CODE
      # CLI-Script to shutdown router1
      #
      sr router1
      halt
      exit

And the transcript:

CODE
      $pamela>./clis admin secret shutdown.cli
      Router 'router1' is available for administration.

      Router Halt in 10 Seconds.

      $pamela>_

Using the 'execute' CLI Command

The execute CLI command has the syntax

CODE
        execute <filename>

and can be used to execute CLI scripts during an interactive CLI session. The following example executes the CLI script jmsusage.cli:

CODE
        Welcome to SwiftMQ!

        Username:
        Password:
        Trying to connect ... connected
        Router 'router1' is available for administration.
        Type 'help' to get a list of available commands.
        > execute jmsusage.cli

        Entity List: Usage
        Description: Active JMS Connections

        Entities in this List:
        ----------------------
        192.168.0.47:53409

Command Format

Multiple commands can be executed at once. The delimiter between commands is a semicolon.

Example:

CODE
    sr router1;cc /sys$queuemanager/queues;lc

The default delimiter between command tokens is blank. To specify a command token that includes blanks, the token has to be enclosed in double-quotes. To specify a single double-quote inside a token, use 2 double-quotes.

Example:

CODE
    set "my attribute" "my ""quoted value"""

Command Aliases

Users want to have their familiar command names, e.g. from Unix shells, like cd instead of our cc or ls instead of lc (list context) and so on. The following CLI commands are to manage CLI aliases:

Syntax

Description

aset <alias> <command>

Define a CLI alias.

adel <alias>

Delete a CLI alias.

alist [<alias>]

List a single or all CLI aliases.

asave [<file>]

Saves all defined CLI aliases into the specified file or, if a filename is not specified, into the default .init.cli file.

CLI command aset is used to set an alias. If the aliases is already defined, it is overwritten. The right <command> part can contain any CLI command as well as aliases and also parameters:

Example:

CODE
      aset quit exit
      aset ls lc
      aset cd cc
      aset nq sr router1;cd /sys$queuemanager/queues;new ${1};lc ${1}

The above nq aliases create a new queue and reference a parameter (Note that the cd alias is referenced here). These parameters are referenced as ${number} where number is the sequence number of the parameter, starting with 1. So the following CLI command creates a new queue smsqueue on router1 and shows the attributes after creation (the lc ${1} command):

CODE
      router1> nq smsqueue

      Entity:      Queue
      Description: Queue Definition

      Properties for this Entity:

      Name                                    Current Value
      --------------------------------------------------------------
      cache-size                              500
      cache-size-bytes-kb                     -1
      cleanup-interval                        120000
      duplicate-detection-backlog-size        2000
      duplicate-detection-enabled             true
      flowcontrol-start-queuesize             400
      max-messages                            -1
      persistence-mode                        as_message

      Entity contains no Sub-Entities.

      router1/sys$queuemanager/queues>

This queue uses the default values for its attributes. If I want to have an alias where I can specify a variable number of parameters, I use the ${*} place holder which puts all parameters at this position:

CODE
      aset nq sr router1;cd /sys$queuemanager/queues;new ${*}

So I can issue the following command:

CODE
      nq smsqueue cache-size 2000 flowcontrol-start-queuesize 1800 max-messages 20000

CLI command adel deletes an alias. A list of all defined aliases can be obtained by alist:

Example:

CODE
      router1/sys$queuemanager/queues> alist

      Alias                            Command
      ------------------------------------------------------------------------
      al                               alist
      cd                               cc
      exec                             execute
      ls                               lc
      nq                               sr router1;cd /sys$queuemanager/queues;new ${*}
      q                                exit
      quit                             exit

      router1/sys$queuemanager/queues>

Command asave saves all aliases as aset commands into a file. See next section.

Init File

CLI executes an init file on startup which can contain aset CLI commands. So once a user has defined his own set of aliases, he uses the asave command to save it into the init file. This file is loaded during start and the aliases are available at any time:

Example:

CODE
      router1/sys$queuemanager/queues> alist

      Alias                            Command
      ------------------------------------------------------------------------
      al                               alist
      cd                               cc
      exec                             execute
      ls                               lc
      nq                               sr router;cd /sys$queuemanager/queues;new ${*};lc
      nt                               cd /sys$topic/topics;new xyz
      q                                exit
      quit                             exit

      router1/sys$queuemanager/queues> asave
      Saving aliases to file: /Users/kw/.init.cli
      router1/sys$queuemanager/queues> q
      imac-kw:unix kw$ ./cli

      Welcome to SwiftMQ!

      Username:
      Password:
      Trying to connect ... connected
      Router 'router1' is available for administration.
      Type 'help' to get a list of available commands.
      > alist

      Alias                            Command
      ------------------------------------------------------------------------
      al                               alist
      cd                               cc
      exec                             execute
      ls                               lc
      nq                               sr router;cd /sys$queuemanager/queues;new ${*};lc
      nt                               cd /sys$topic/topics;new xyz
      q                                exit
      quit                             exit

      >

The default file name of the init file is .init.cli and located under the user's home directory. Of course, CLI can be configured to use another init file by specifying the new name with system propertyswiftmq.cli.init:

Example:

CODE
      java -cp (jars not shown) -Dswiftmq.cli.init=./myaliases.cli com.swiftmq.admin.cli.CLI smqp://localhost:4001 plainsocket@router1

To save the aliases into the above file, use:

CODE
      > asave ./myaliases.cli
      Saving aliases to file: ./myaliases.cli

Command Reference

activate

Syntax:

CODE
        activate <queuename>

Toggles a queue state between active and paused. Default is active. In active mode, the queue delivers messages to consumers. In paused mode, messages are not delivered and flow control is disabled to let producers send messages to the queue at full speed. Flow control is enabled when the state is toggled to active.

Since 12.3.0.

Example:

CODE
        router/sys$queuemanager/usage> activate testqueue

adel

Syntax:

CODE
        adel <alias>

Deletes a defined CLI alias.

Example:

CODE
        router1/sys$queuemanager/queues> alist

        Alias                            Command
        ------------------------------------------------------------------------
        al                               alist
        cd                               cc
        exec                             execute
        ls                               lc
        nq                               sr router1;cd /sys$queuemanager/queues;new ${1};lc ${1}
        nqr1                             sr router1;cd /sys$q/queues;new ${1};lc
        q                                exit
        quit                             exit

        router1/sys$queuemanager/queues> adel nqr1
        router1/sys$queuemanager/queues> alist

        Alias                            Command
        ------------------------------------------------------------------------
        al                               alist
        cd                               cc
        exec                             execute
        ls                               lc
        nq                               sr router1;cd /sys$queuemanager/queues;new ${1};lc ${1}
        q                                exit
        quit                             exit

        router1/sys$queuemanager/queues>

alist

Syntax:

CODE
          alist [<alias>]

Lists a single or all defined CLI aliases.

Example:

CODE
          router1/sys$queuemanager/queues> alist

          Alias                            Command
          ------------------------------------------------------------------------
          al                               alist
          cd                               cc
          exec                             execute
          ls                               lc
          nq                               sr router1;cd /sys$queuemanager/queues;new ${1};lc ${1}
          q                                exit
          quit                             exit

          router1/sys$queuemanager/queues> alist al

          Alias                            Command
          ------------------------------------------------------------------------
          al                               alist

          router1/sys$queuemanager/queues>

ar

Syntax:

CODE
        ar

Shows all available routers.

Example:

CODE
        pamela.iit.de/sys$queuemanager> ar

        Available Routers:

        pamela.iit.de
        dev194.iit.de

        pamela.iit.de/sys$queuemanager>_

asave

Syntax:

CODE
        asave [<file>]

Saves all defined CLI aliases into a file. The default init file <user.home>/.init.cli is used, if the file name is not specified.

Example:

CODE
        router1/sys$queuemanager/queues> asave
        Saving aliases to file: /Users/kw/.init.cli
        router1/sys$queuemanager/queues> asave ./myinitfile.cli
        Saving aliases to file: ./myinitfile.cli
        router1/sys$queuemanager/queues>

aset

Syntax:

CODE
        aset <alias> <command>

CLI command aset is used to set an alias. If the alias is already defined, it is overwritten. The right <command> part can contain any CLI command as well as aliases and also parameters:

Example:

CODE
        aset quit exit
        aset ls lc
        aset cd cc
        aset nq sr router1;cd /sys$queuemanager/queues;new ${1};lc ${1}

The above nq aliases create a new queue and reference a parameter (Note that the cd alias is referenced here). These parameters are referenced as ${number} where number is the sequence number of the parameter, starting with 1. So the following CLI command creates a new queue smsqueue on router1 and shows the attributes after creation (the lc ${1} command):

CODE
        router1> nq smsqueue

        Entity:      Queue
        Description: Queue Definition

        Properties for this Entity:

        Name                                    Current Value
        --------------------------------------------------------------
        cache-size                              500
        cache-size-bytes-kb                     -1
        cleanup-interval                        120000
        duplicate-detection-backlog-size        2000
        duplicate-detection-enabled             true
        flowcontrol-start-queuesize             400
        max-messages                            -1
        persistence-mode                        as_message

        Entity contains no Sub-Entities.

        router1/sys$queuemanager/queues>

This queue uses the default values for its attributes. If I want to have an alias where I can specify a variable number of parameters, I use the ${\*} place holder which puts all parameters at this position:

CODE
        aset nq sr router1;cd /sys$queuemanager/queues;new ${*}

So I can issue the following command:

CODE
        nq smsqueue cache-size 2000 flowcontrol-start-queuesize 1800 max-messages 20000

authenticate

Syntax:

CODE
        authenticate <password>

If access to the Management Swiftlet of the router is password protected, this command is used to authenticate access to it. The router can only be managed after successful authentication.

Example:

CODE
        router5> authenticate secret
        router5>_

backup

Syntax:

CODE
        backup

Performs an online backup of the store.

Example:

CODE
        router1> cc /sys$store/backup
        router1/sys$store/backup> backup

        Backup initiated. Please watch Folder 'Generated Backup Save Sets'.

        router1/sys$store/backup>_

The backup runs asynchronously. Once it is finished, you'll find it below the /sys$store/usage/backupcontext:

Example:

CODE
        router1/sys$store/usage> lc

        Entity:      Usage
        Description: Usage

        Entity contains no Properties.

        Sub-Entities of this Entity:
        ----------------------------
        backup
        files

        router1/sys$store/usage> cc backup
        router1/sys$store/usage/backup> lc

        Entity List: Generated Backup Save Sets
        Description: Generated Backup Save Sets

        Entities in this List:
        ----------------------
        saveset_20080304165202798

        router1/sys$store/usage/backup>_

cc

Syntax:

CODE
        cc <context>

Change the current context. The context could be specified absolute or relative to the current context. Specifying double-dots .. switches to the context one level above.

Example:

CODE
        router1/sys$queuemanager> cc queues
        router1/sys$queuemanager/queues> cc /sys$jms/listeners/plainsocket
        router1/sys$jms/listeners/plainsocket> cc ..
        router1/sys$jms/listeners>_

Note that you can abbreviate the context name, i. e. in the above example you can also type cc /sys$j/l/p to switch to context /sys$jms/listeners/plainsocket.

commit

Syntax:

CODE
        commit <entityname>

Commits an in-doubt XA transaction. An XA transaction becomes in doubt if it was prepared but not committed due to an abort of the JTA transaction manager or a computer crash.

Example:

CODE
         router1/sys$xa/usage> cc prepared-tx
         router1/sys$xa/usage/prepared-tx> lc

         Entity List: Prepared XA Transactions
         Description: Prepared XA Transactions

         Entities in this List:
         ----------------------
         1
         2
         3
         4

         router1/sys$xa/usage/prepared-tx> commit 4
         router1/sys$xa/usage/prepared-tx> lc

         Entity List: Prepared XA Transactions
         Description: Prepared XA Transactions

         Entities in this List:
         ----------------------
         1
         2
         3

         router1/sys$xa/usage/prepared-tx>_

copy

Syntax:

CODE
        copy <source> -queue|-topic <target>
             [(-selector <selector>)|(-index <start> <stop>)]
             [-maxlimit <nmsgs>]

Copy messages from queue <source> to queue/topic . A subset can be defined with -selector <selector> or by specifying a range with -index <start> <stop>. The source is always a queue and must reside on the local router (the one of the last `sr" command).

The -maxlimit parameter can be specified to limit this operation to this maximum number of messages to copy. Since SwiftMQ 9.7.1.

The following example copies all messages from queue testqueue to queue testqueue1 on the same router:

CODE
        router1/sys$queuemanager/usage> copy testqueue -queue testqueue1

        1000 messages processed.

        router1/sys$queuemanager/usage>

The next example copies all messages from queue testqueue1 to queue testqueue@router2 on a different router:

CODE
        router1/sys$queuemanager/usage> copy testqueue1 -queue testqueue@router2

        1000 messages processed.

        router1/sys$queuemanager/usage>

The next example copies messages from router2 queue testqueue to queue testqueue@router1, but with a message selector.

CODE
        router2/sys$queuemanager/usage> copy testqueue -queue testqueue@router1 -selector nMsg > 40 and nMsg < 70

        29 messages processed.

        router2/sys$queuemanager/usage>

The next example copies messages from router2 queue testqueue to queue testqueue@router1, but with a range (the first 100 messages).

CODE
        router2/sys$queuemanager/usage> copy testqueue -queue testqueue@router1 -index 0 99

        100 messages processed.

        router2/sys$queuemanager/usage>

The next example copies messages from queue testqueue to topic testtopic (can also be used with a selector or a range):

CODE
        router1/sys$queuemanager/usage> copy testqueue -topic testtopic

        1000 messages processed.

        router1/sys$queuemanager/usage>

The last example copies messages from a durable subscriber queue test$test to queue testqueue1, but with a range. The names of durable subscriber queues are composed of <clientid>$<durablename >. For client id test and durable name test the queue name is test$test.

CODE
        router1/sys$queuemanager/usage> copy test$test -queue testqueue1 -index 200 499

        300 messages processed.

        router1/sys$queuemanager/usage>

delete

Syntax:

CODE
        delete <entity>

Deletes the entity from this entity list.

Example:

CODE
        router1/sys$queuemanager/queues> lc

        Entity List: Queues
        Description: Queue Definitions

        Entities in this List:
        ----------------------
        srvinbound
        testqueue

        router1/sys$queuemanager/queues> delete srvinbound
        router1/sys$queuemanager/queues> lc

        Entity List: Queues
        Description: Queue Definitions

        Entities in this List:
        ----------------------
        testqueue

        router1/sys$queuemanager/queues>_

delfile

Syntax:

CODE
        delfile <cache> <file-key>|*

Delete a single or all files (*) from a file cache.

Example:

CODE
        router1/sys$filecache/usage> delfile test 1378302367352-0000000008
        router1/sys$filecache/usage>

describe

Syntax:

CODE
        describe <prop>

Shows a full description of the specific property.

Example:

CODE
        router1/sys$queuemanager/queues> cc testqueue
        router1/sys$queuemanager/queues/testqueue> describe flowcontrol-start-queuesize

        Property Name  : flowcontrol-start-queuesize
        Display Name   : Flow Control Start Queue Size
        Description    : Flow Control starts at this Queue Size
        Type           : class java.lang.Integer
        Min. Value     : <not set>
        Max. Value     : <not set>
        Default Value  : 400
        Poss. Values   : <not set>
        Actual Value   : 400
        Mandatory      : false
        Read Only      : false
        Reboot Required: false

        router1/sys$queuemanager/queues/testqueue>

echo

Syntax:

CODE
        echo [<message>]

Prints an optional <message> and a new line. The messages must be surrounded by double quotes if it contains a semicolon. Only a new line is printed if the message is not specified.

This following CLI script:

CODE
        echo
        echo Status router1
        echo ==============
        echo
        sr router1
        echo Memory Status
        echo -------------
        echo
        cc /.env/router-memory-list
        sum free-memory total-memory
        echo
        echo Network Throughput in KB/s
        echo --------------------------
        echo
        cc /sys$net/usage
        sum throughput-input throughput-output
        echo
        echo JMS Throughput in Msgs/s and Total
        echo ----------------------------------
        cc /sys$jms/usage
        sum msgs-sent msgs-received total-sent total-received
        echo
        exit

Will produce this output:

CODE
        > execute test.cli

        Status router1
        ==============

        Memory Status
        -------------

        count: 1
        free-memory: 21250
        total-memory: 32448

        Network Throughput in KB/s
        --------------------------

        count: 3
        throughput-input: 369.93
        throughput-output: 338.30

        JMS Throughput in Msgs/s and Total
        ----------------------------------
        count: 3
        msgs-sent: 744
        msgs-received: 744
        total-sent: 24231
        total-received: 24230

execute

Syntax:

CODE
        execute [<file>]

Executes a CLI script.

Example:

CODE
        Welcome to SwiftMQ!

        Username:
        Password:
        Trying to connect ... connected
        Router 'router1' is available for administration.
        Type 'help' to get a list of available commands.
        >
        > execute jmsusage.cli

        Entity List: Usage
        Description: Active JMS Connections

        Entities in this List:
        ----------------------
        192.168.0.47:61562

exit

Syntax:

CODE
        exit

Exits CLI.

export

Syntax:

CODE
        export <queuename> <routerdir> [-delete] [-xml] [-selector <selector>]

Export messages from <queuename>to <routerdir>. <routerdir> means a directory on the host where the SwiftMQ Router or, in the case of SwiftMQ HA Router, the ACTIVE/STANDALONE HA instance is running. The directory can be a relative or absolute pathname. ./ refers to the router's working directory (scripts/by default).

Each message is stored in a single file which filename is in format swiftmq\_<queuename>\_<seqno>.<extension>. The <extension > is message if the format is binary (default).

If the -xml option is specified, the is xml and the format is the XStream XML serialization format. If the -delete option is specified, the messages are deleted from the queue after the export. The optional -selector option can be specified to reduce the number of messages by use of a JMS message selector.

Example:

CODE
        router1> export testqueue ./ -xml -delete
        *** 500 messages exported.
        router1>

gc

Syntax:

CODE
        gc

Runs garbage collection on the router.

Example:

CODE
        router1> cc /.env/router-memory-list
        router1/.env/router-memory-list> gc
        router1/.env/router-memory-list>

halt

Syntax:

CODE
        halt

Halts the router. To activate changes, the configuration must be saved before invoking halt.

Example:

CODE
        router5> halt

        Router Halt in 10 Seconds.

        router5> Connection lost.
        $pamela>_

help

Syntax:

CODE
        help

The help command lists the descriptions of the commands along the current command stack.

Example:

CODE
        router1/sys$jms/listeners> help

        Commands from CLI shell

        exit                             Exit CLI
        sr <router>                      Switch to Router <router>
        ar                               Show all available Routers

        Commands from Router Context 'router1'

        cc <context>                     Change to Context <context>
        lc [<context>]                   List the Content of <context>

        Commands from current Router's Swiftlet Manager

        reboot                           Reboot the Router
        halt                             Halt the Router
        save                             Save this Router Configuration

        Commands from Context 'listeners'

        show template                    Show the Template for new Entities
        new <name> [<prop> <value> ...]  Create a new Entity
        delete <entity>                  Delete Entity

        router1/sys$jms/listeners>_

import

Syntax:

CODE
        import <routerdir> <queuename> [-newid] [-delete] [-filter <regex>]

Import messages from a <routerdir > into a queue with name <queuename >. <routerdir > means a directory on the host where the SwiftMQ Router or, in the case of SwiftMQ HA Router, the ACTIVE/STANDALONE HA instance is running. The directory can be a relative or absolute pathname. ./ refers to the router's working directory (scripts/ by default).

If the -newid option is specified, new message-ids are assigned during import. Otherwise, the old message ids are used. In the latter case keep in mind that messages may be discarded by duplicate message detection (which works on message ids) during import. If the -delete option is specified, the files are deleted after import. The -filter option can be used to filter the files by using a regular expression on the file names.

Import respects filename extensions xml and messages. It is expected that files with xml extensions contain XStream XML serialization format while those with message extensions contain SwiftMQ binary format. Messages are imported as-is without changing their content.

Example:

CODE
        router1> import ./ testqueue -delete
        500 messages imported.
        router1>

lc

Syntax:

CODE
        lc [<context>]

Lists the content of the given context or, if not specified, the content of the current context.

Example:

CODE
        router1/sys$jms/listeners> lc

        Entity List: Listeners
        Description: Listener definitions

        Entities in this List:
        ----------------------
        plainsocket

        router1/sys$jms/listeners> lc /sys$queuemanager/queues/testqueue

        Entity:      Queue Properties
        Description: Properties for each Queue

        Properties for this Entity:

        Name                                    Current Value
        --------------------------------------------------------------
        cache.size                              100
        cleanup.interval                        -1

        Entity contains no Sub-Entities.

        router1/sys$jms/listeners>_

Note that you can abbreviate the context name, i. e. in the above example you can also type lc /sys$q/q/t to list context /sys$queuemanager/queues/testqueue.

Display the Router Environment / Router Memory List

Each Router has a special entity .env which contains data about the environment the router is running in. Use the lc command to display this data.

Example:

CODE
        router1> lc .env

        Entity:      Router Environment
        Description: Environment of this Router

        Properties for this Entity:

        Name                                    Current Value
        --------------------------------------------------------------
        hostname (R/O)                          dev199.iit.de
        jre (R/O)                               1.4.2
        memory-collect-interval                 1000
        os (R/O)                                Windows XP 5.1 x86
        release (R/O)                           5.0.1 Production
        routername                              router1
        startuptime (R/O)                       Fri May 21 11:27:01 CEST 2004
        use-smart-tree                          false

        Sub-Entities of this Entity:
        ----------------------------
        router-memory-list

        router1> cc .env
        router1/.env> cc router-memory-list
        router1/.env/router-memory-list> cc router1
        router1/.env/router-memory-list/router1> lc

        Entity:      Router Memory
        Description: Router Memory

        Properties for this Entity:

        Name                                    Current Value
        --------------------------------------------------------------
        free-memory (R/O)                       3474
        total-memory (R/O)                      7280

        Entity contains no Sub-Entities.

        router1/.env/router-memory-list/router1>_

Display Swiftlet Meta Data

Each Swiftlet has a special entity .meta which contains metadata about the Swiftlet vendor, version, etc. Use the lc command to display this data.

Example:

CODE
        router1/sys$jms> lc .meta

        Entity:      Swiftlet Meta Data
        Description: Describes this Swiftlet

        Properties for this Entity:

        Name                                    Current Value
        --------------------------------------------------------------
        class (R/O)                             com.swiftmq.impl.jms.standard.JMSSwiftletImpl
        description (R/O)                       JMS Swiftlet
        displayname (R/O)                       JMS Swiftlet
        name (R/O)                              sys$jms
        vendor (R/O)                            IIT Software GmbH
        version (R/O)                           3.0.0

        Entity contains no Sub-Entities.

        router1/sys$jms>_

listfile

Syntax:

CODE
        listfile <cache> <startidx> (<stopidx>|*) [<selector>]

List the content of a file cache. The command is available in context sys$filecache/usage. The command parameters are the cache name, start index, stop index, and an optional message selector. The start and stop index just specifies the message numbers in the result set. If a message selector is specified, the result set may be reduced. The index starts at 0 and is inclusive, for example, a start index of 0 and a stop index of 10 display 11 files, if available. If the stop index is greater than the result size, files are displayed until the result size is reached. If * is specified as the stop index, all files are displayed, starting from the start index. The maximum number of files returned is 200.

Example:

CODE
        router1/sys$filecache/usage> listfile test 0 *
        <?xml version="1.0" encoding="UTF-8"?>
        <result>
          <file JMS_SWIFTMQ_FT_FILEKEY="1378302367352-0000000009"
                JMS_SWIFTMQ_FT_FILENAME="zhtml-sources.jar" JMS_SWIFTMQ_FT_SIZE="58712">
            <file-properties>
              <property name="JMS_SWIFTMQ_FT_DELAFTDL" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_DIGESTTYPE" type="java.lang.String" value="MD5"/>
              <property name="JMS_SWIFTMQ_FT_DOWNLOADCOUNT" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_FILEISPRIVATE" type="java.lang.Boolean" value="false"/>
              <property name="JMS_SWIFTMQ_FT_FILEKEY" type="java.lang.String" value="1378302367352-0000000009"/>
              <property name="JMS_SWIFTMQ_FT_FILENAME" type="java.lang.String" value="zhtml-sources.jar"/>
              <property name="JMS_SWIFTMQ_FT_PWDHEXDIGEST" type="java.lang.String"
                        value="a586edb3ff2c4f16faf52ba4cc0b3132"/>
              <property name="JMS_SWIFTMQ_FT_SIZE" type="java.lang.Long" value="58712"/>
              <property name="JMS_SWIFTMQ_FT_STORETIME" type="java.lang.String"
                        value="04 Sep 2013 15:49:18.012 +0200 (1378302558012)"/>
            </file-properties>
            <custom-properties>
              <property name="customerid" type="java.lang.Integer" value="-116569913"/>
              <property name="orderid" type="java.lang.Integer" value="305576251"/>
            </custom-properties>
            <digest JMS_SWIFTMQ_FT_DIGESTTYPE="MD5" DIGEST="f82829cba8cfbc121e0377fad0355194"/>
          </file>
          <file JMS_SWIFTMQ_FT_FILEKEY="1378302367352-0000000010"
                JMS_SWIFTMQ_FT_FILENAME="zel-sources.jar" JMS_SWIFTMQ_FT_SIZE="162198">
            <file-properties>
              <property name="JMS_SWIFTMQ_FT_DELAFTDL" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_DIGESTTYPE" type="java.lang.String" value="MD5"/>
              <property name="JMS_SWIFTMQ_FT_DOWNLOADCOUNT" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_FILEISPRIVATE" type="java.lang.Boolean" value="false"/>
              <property name="JMS_SWIFTMQ_FT_FILEKEY" type="java.lang.String" value="1378302367352-0000000010"/>
              <property name="JMS_SWIFTMQ_FT_FILENAME" type="java.lang.String" value="zel-sources.jar"/>
              <property name="JMS_SWIFTMQ_FT_PWDHEXDIGEST" type="java.lang.String"
                        value="a586edb3ff2c4f16faf52ba4cc0b3132"/>
              <property name="JMS_SWIFTMQ_FT_SIZE" type="java.lang.Long" value="162198"/>
              <property name="JMS_SWIFTMQ_FT_STORETIME" type="java.lang.String"
                        value="04 Sep 2013 15:49:18.034 +0200 (1378302558034)"/>
            </file-properties>
            <custom-properties>
              <property name="customerid" type="java.lang.Integer" value="-893640098"/>
              <property name="orderid" type="java.lang.Integer" value="808241166"/>
            </custom-properties>
            <digest JMS_SWIFTMQ_FT_DIGESTTYPE="MD5" DIGEST="d6436e4050b2cc76dfccd8b144a153bd"/>
          </file>
          <file JMS_SWIFTMQ_FT_FILEKEY="1378302367352-0000000011"
                JMS_SWIFTMQ_FT_FILENAME="zkbind-sources.jar" JMS_SWIFTMQ_FT_SIZE="203970">
            <file-properties>
              <property name="JMS_SWIFTMQ_FT_DELAFTDL" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_DIGESTTYPE" type="java.lang.String" value="MD5"/>
              <property name="JMS_SWIFTMQ_FT_DOWNLOADCOUNT" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_FILEISPRIVATE" type="java.lang.Boolean" value="false"/>
              <property name="JMS_SWIFTMQ_FT_FILEKEY" type="java.lang.String" value="1378302367352-0000000011"/>
              <property name="JMS_SWIFTMQ_FT_FILENAME" type="java.lang.String" value="zkbind-sources.jar"/>
              <property name="JMS_SWIFTMQ_FT_PWDHEXDIGEST" type="java.lang.String"
                        value="a586edb3ff2c4f16faf52ba4cc0b3132"/>
              <property name="JMS_SWIFTMQ_FT_SIZE" type="java.lang.Long" value="203970"/>
              <property name="JMS_SWIFTMQ_FT_STORETIME" type="java.lang.String"
                        value="04 Sep 2013 15:49:18.043 +0200 (1378302558043)"/>
            </file-properties>
            <custom-properties>
              <property name="customerid" type="java.lang.Integer" value="307930717"/>
              <property name="orderid" type="java.lang.Integer" value="305961000"/>
            </custom-properties>
            <digest JMS_SWIFTMQ_FT_DIGESTTYPE="MD5" DIGEST="8b1d789039d9f7b7c9cdd7945ab0987c"/>
          </file>
          <file JMS_SWIFTMQ_FT_FILEKEY="1378302367352-0000000013"
                JMS_SWIFTMQ_FT_FILENAME="zkplus-sources.jar" JMS_SWIFTMQ_FT_SIZE="113905">
            <file-properties>
              <property name="JMS_SWIFTMQ_FT_DELAFTDL" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_DIGESTTYPE" type="java.lang.String" value="MD5"/>
              <property name="JMS_SWIFTMQ_FT_DOWNLOADCOUNT" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_FILEISPRIVATE" type="java.lang.Boolean" value="false"/>
              <property name="JMS_SWIFTMQ_FT_FILEKEY" type="java.lang.String" value="1378302367352-0000000013"/>
              <property name="JMS_SWIFTMQ_FT_FILENAME" type="java.lang.String" value="zkplus-sources.jar"/>
              <property name="JMS_SWIFTMQ_FT_PWDHEXDIGEST" type="java.lang.String"
                        value="a586edb3ff2c4f16faf52ba4cc0b3132"/>
              <property name="JMS_SWIFTMQ_FT_SIZE" type="java.lang.Long" value="113905"/>
              <property name="JMS_SWIFTMQ_FT_STORETIME" type="java.lang.String"
                        value="04 Sep 2013 15:49:18.056 +0200 (1378302558056)"/>
            </file-properties>
            <custom-properties>
              <property name="customerid" type="java.lang.Integer" value="1902722394"/>
              <property name="orderid" type="java.lang.Integer" value="877781449"/>
            </custom-properties>
            <digest JMS_SWIFTMQ_FT_DIGESTTYPE="MD5" DIGEST="8bbf2b7ec15186be67956d9e3adcb2fa"/>
          </file>
          <file JMS_SWIFTMQ_FT_FILEKEY="1378302367352-0000000012"
                JMS_SWIFTMQ_FT_FILENAME="zcommon-sources.jar" JMS_SWIFTMQ_FT_SIZE="306175">
            <file-properties>
              <property name="JMS_SWIFTMQ_FT_DELAFTDL" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_DIGESTTYPE" type="java.lang.String" value="MD5"/>
              <property name="JMS_SWIFTMQ_FT_DOWNLOADCOUNT" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_FILEISPRIVATE" type="java.lang.Boolean" value="false"/>
              <property name="JMS_SWIFTMQ_FT_FILEKEY" type="java.lang.String" value="1378302367352-0000000012"/>
              <property name="JMS_SWIFTMQ_FT_FILENAME" type="java.lang.String" value="zcommon-sources.jar"/>
              <property name="JMS_SWIFTMQ_FT_PWDHEXDIGEST" type="java.lang.String"
                        value="a586edb3ff2c4f16faf52ba4cc0b3132"/>
              <property name="JMS_SWIFTMQ_FT_SIZE" type="java.lang.Long" value="306175"/>
              <property name="JMS_SWIFTMQ_FT_STORETIME" type="java.lang.String"
                        value="04 Sep 2013 15:49:18.059 +0200 (1378302558059)"/>
            </file-properties>
            <custom-properties>
              <property name="customerid" type="java.lang.Integer" value="307545968"/>
              <property name="orderid" type="java.lang.Integer" value="1899819768"/>
            </custom-properties>
            <digest JMS_SWIFTMQ_FT_DIGESTTYPE="MD5" DIGEST="4f53703927aefcc0715a6b9854cc3368"/>
          </file>
          <file JMS_SWIFTMQ_FT_FILEKEY="1378302367352-0000000015"
                JMS_SWIFTMQ_FT_FILENAME="zweb-sources.jar" JMS_SWIFTMQ_FT_SIZE="135246">
            <file-properties>
              <property name="JMS_SWIFTMQ_FT_DELAFTDL" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_DIGESTTYPE" type="java.lang.String" value="MD5"/>
              <property name="JMS_SWIFTMQ_FT_DOWNLOADCOUNT" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_FILEISPRIVATE" type="java.lang.Boolean" value="false"/>
              <property name="JMS_SWIFTMQ_FT_FILEKEY" type="java.lang.String" value="1378302367352-0000000015"/>
              <property name="JMS_SWIFTMQ_FT_FILENAME" type="java.lang.String" value="zweb-sources.jar"/>
              <property name="JMS_SWIFTMQ_FT_PWDHEXDIGEST" type="java.lang.String"
                        value="a586edb3ff2c4f16faf52ba4cc0b3132"/>
              <property name="JMS_SWIFTMQ_FT_SIZE" type="java.lang.Long" value="135246"/>
              <property name="JMS_SWIFTMQ_FT_STORETIME" type="java.lang.String"
                        value="04 Sep 2013 15:49:18.078 +0200 (1378302558078)"/>
            </file-properties>
            <custom-properties>
              <property name="customerid" type="java.lang.Integer" value="1586782480"/>
              <property name="orderid" type="java.lang.Integer" value="1287432511"/>
            </custom-properties>
            <digest JMS_SWIFTMQ_FT_DIGESTTYPE="MD5" DIGEST="d91da073a8d6be0474105a78ec80a179"/>
          </file>
          <file JMS_SWIFTMQ_FT_FILEKEY="1378302367352-0000000008"
                JMS_SWIFTMQ_FT_FILENAME="zk-sources.jar" JMS_SWIFTMQ_FT_SIZE="796137">
            <file-properties>
              <property name="JMS_SWIFTMQ_FT_DELAFTDL" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_DIGESTTYPE" type="java.lang.String" value="MD5"/>
              <property name="JMS_SWIFTMQ_FT_DOWNLOADCOUNT" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_FILEISPRIVATE" type="java.lang.Boolean" value="false"/>
              <property name="JMS_SWIFTMQ_FT_FILEKEY" type="java.lang.String" value="1378302367352-0000000008"/>
              <property name="JMS_SWIFTMQ_FT_FILENAME" type="java.lang.String" value="zk-sources.jar"/>
              <property name="JMS_SWIFTMQ_FT_PWDHEXDIGEST" type="java.lang.String"
                        value="a586edb3ff2c4f16faf52ba4cc0b3132"/>
              <property name="JMS_SWIFTMQ_FT_SIZE" type="java.lang.Long" value="796137"/>
              <property name="JMS_SWIFTMQ_FT_STORETIME" type="java.lang.String"
                        value="04 Sep 2013 15:49:18.097 +0200 (1378302558097)"/>
            </file-properties>
            <custom-properties>
              <property name="customerid" type="java.lang.Integer" value="1569384443"/>
              <property name="orderid" type="java.lang.Integer" value="1591235826"/>
            </custom-properties>
            <digest JMS_SWIFTMQ_FT_DIGESTTYPE="MD5" DIGEST="25e0f59d646cc6c7a7f03865ebb7c93c"/>
          </file>
          <file JMS_SWIFTMQ_FT_FILEKEY="1378302367352-0000000014"
                JMS_SWIFTMQ_FT_FILENAME="zul-sources.jar" JMS_SWIFTMQ_FT_SIZE="502541">
            <file-properties>
              <property name="JMS_SWIFTMQ_FT_DELAFTDL" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_DIGESTTYPE" type="java.lang.String" value="MD5"/>
              <property name="JMS_SWIFTMQ_FT_DOWNLOADCOUNT" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_FILEISPRIVATE" type="java.lang.Boolean" value="false"/>
              <property name="JMS_SWIFTMQ_FT_FILEKEY" type="java.lang.String" value="1378302367352-0000000014"/>
              <property name="JMS_SWIFTMQ_FT_FILENAME" type="java.lang.String" value="zul-sources.jar"/>
              <property name="JMS_SWIFTMQ_FT_PWDHEXDIGEST" type="java.lang.String"
                        value="a586edb3ff2c4f16faf52ba4cc0b3132"/>
              <property name="JMS_SWIFTMQ_FT_SIZE" type="java.lang.Long" value="502541"/>
              <property name="JMS_SWIFTMQ_FT_STORETIME" type="java.lang.String"
                        value="04 Sep 2013 15:49:18.102 +0200 (1378302558102)"/>
            </file-properties>
            <custom-properties>
              <property name="customerid" type="java.lang.Integer" value="-1341822691"/>
              <property name="orderid" type="java.lang.Integer" value="1976673700"/>
            </custom-properties>
            <digest JMS_SWIFTMQ_FT_DIGESTTYPE="MD5" DIGEST="30eb26b156a9bbbc464f80c6844f790f"/>
          </file>
        </result>
        <!-- 8 files displayed, 8 files total in cache -->
        router1/sys$filecache/usage>

The following command uses a selector to select files that are > 500 KB:

Example:

CODE
        router1/sys$filecache/usage> listfile test 0 * `JMS_SWIFTMQ_FT_SIZE > 1024 * 500"
        <?xml version="1.0" encoding="UTF-8"?>
        <result>
          <file JMS_SWIFTMQ_FT_FILEKEY="1378302367352-0000000008"
                JMS_SWIFTMQ_FT_FILENAME="zk-sources.jar" JMS_SWIFTMQ_FT_SIZE="796137">
            <file-properties>
              <property name="JMS_SWIFTMQ_FT_DELAFTDL" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_DIGESTTYPE" type="java.lang.String" value="MD5"/>
              <property name="JMS_SWIFTMQ_FT_DOWNLOADCOUNT" type="java.lang.Integer" value="0"/>
              <property name="JMS_SWIFTMQ_FT_FILEISPRIVATE" type="java.lang.Boolean" value="false"/>
              <property name="JMS_SWIFTMQ_FT_FILEKEY" type="java.lang.String" value="1378302367352-0000000008"/>
              <property name="JMS_SWIFTMQ_FT_FILENAME" type="java.lang.String" value="zk-sources.jar"/>
              <property name="JMS_SWIFTMQ_FT_PWDHEXDIGEST" type="java.lang.String"
                        value="a586edb3ff2c4f16faf52ba4cc0b3132"/>
              <property name="JMS_SWIFTMQ_FT_SIZE" type="java.lang.Long" value="796137"/>
              <property name="JMS_SWIFTMQ_FT_STORETIME" type="java.lang.String"
                        value="04 Sep 2013 15:49:18.097 +0200 (1378302558097)"/>
            </file-properties>
            <custom-properties>
              <property name="customerid" type="java.lang.Integer" value="1569384443"/>
              <property name="orderid" type="java.lang.Integer" value="1591235826"/>
            </custom-properties>
            <digest JMS_SWIFTMQ_FT_DIGESTTYPE="MD5" DIGEST="25e0f59d646cc6c7a7f03865ebb7c93c"/>
          </file>
        </result>
        <!-- 1 files displayed, 8 files total in cache -->
        router1/sys$filecache/usage>

move

Syntax:

CODE
        move <source> -queue|-topic <target>
             [(-selector <selector>)|(-index <start> <stop>)]
             [-maxlimit <nmsgs>]

Moves messages from queue <source> to queue/topic <target>. A subset can be defined with -selector <selector> or by specifying a range with -index <start> <stop>. The source is always a queue and must reside on the local router (the one of the last sr command).

The -maxlimitparameter can be specified to limit this operation to this maximum number of messages to move. Since SwiftMQ 9.7.1.

The following example moves all messages from queue testqueue to queue testqueue1 on the same router:

CODE
        router1/sys$queuemanager/usage> move testqueue -queue testqueue1

        1000 messages processed.

        router1/sys$queuemanager/usage>

The next example moves all messages from queue testqueue1 to queue testqueue@router2 on a different router:

CODE
        router1/sys$queuemanager/usage> move testqueue1 -queue testqueue@router2

        1000 messages processed.

        router1/sys$queuemanager/usage>

The next example moves messages from router2 queue testqueue to queue testqueue@router1, but with a message selector.

CODE
        router2/sys$queuemanager/usage> move testqueue -queue testqueue@router1 -selector nMsg > 40 and nMsg < 70

        29 messages processed.

        router2/sys$queuemanager/usage>

The next example moves messages from router2 queue testqueue to queue testqueue@router1, but with a range (the first 100 messages).

CODE
        router2/sys$queuemanager/usage> move testqueue -queue testqueue@router1 -index 0 99

        100 messages processed.

        router2/sys$queuemanager/usage>

The next example moves messages from queue testqueue to topic testtopic (can also be used with a selector or a range):

CODE
        router1/sys$queuemanager/usage> move testqueue -topic testtopic

        1000 messages processed.

        router1/sys$queuemanager/usage>

The last example moves messages from a durable subscriber queue test$test to queue testqueue1, but with a range. The names of durable subscriber queues are composed of<clientid>$<durablename>. For client id test and durable name test the queue name is test$test.

CODE
        router1/sys$queuemanager/usage> move test$test -queue testqueue1 -index 200 499

        300 messages processed.

        router1/sys$queuemanager/usage>

new

Syntax:

CODE
        new <name> [<prop> <value> ...]

Creates a new entity in this entity list. CLI uses the template (see show template) to create a new entity. All mandatory properties must be set in the new command. For optional properties, the default values are set from CLI.

Example:

CODE
        router1/sys$queuemanager/queues> new srvinbound cache-size 300
        router1/sys$queuemanager/queues> lc srvinbound

        Entity:      Queue
        Description: Queue Definition

        Properties for this Entity:

        Name                                    Current Value
        --------------------------------------------------------------
        cache-size                              300
        cache-size-bytes-kb                     -1
        cleanup-interval                        120000
        duplicate-detection-backlog-size        2000
        duplicate-detection-enabled             true
        flowcontrol-start-queuesize             400
        max-messages                            -1
        persistence-mode                        as_message

        Entity contains no Sub-Entities.

        router1/sys$queuemanager/queues>

output

Syntax:

CODE
        output <filename> | console

Redirects the resulting output to a file or to the console (default). If a filename is specified, the file will be deleted initially and thus further output will not append to it.

The following command uses the view command to view the first message of a queue. Because the default output redirection is the console, the result is displayed on the console. Thereafter, the output is redirected to a file t0.txt and the first 100 messages are viewed.

Example:

CODE
        $pamela> java com.swiftmq.admin.cli.CLI smqp://localhost:4005 QueueConnectionFactory

        Welcome to SwiftMQ!

        Username:
        Password:
        Trying to connect ... connected
        Type 'help' to get a list of available commands.
        > Router 'router1' is available for administration.

        > sr router1
        router1> cc sys$queuemanager/usage
        router1/sys$queuemanager/usage> view t0 0 0

        <?xml version="1.0" encoding="UTF-8"?>
        <result>
          <message index="0" message-key="0" type="BytesMessage">
            <jms-header>
              <JMSDeliveryMode>NON_PERSISTENT</JMSDeliveryMode>
              <JMSDestination>t0@router1</JMSDestination>
              <JMSExpiration>0</JMSExpiration>
              <JMSMessageID>ID:MUELLI/192.168.120.254-10276033151670</JMSMessageID>
              <JMSPriority>4</JMSPriority>
              <JMSRedelivered>false</JMSRedelivered>
              <JMSTimestamp>1027603315167</JMSTimestamp>
            </jms-header>
            <jmsx-header>
              <JMSXUserID>anonymous</JMSXUserID>
            </jmsx-header>
            <jms-vendor-properties/>
            <message-properties>
              <property name="Boolean1" type="java.lang.Boolean" value="true"/>
              <property name="Boolean2" type="java.lang.Boolean" value="false"/>
              <property name="Byte1" type="java.lang.Byte" value="1"/>
              <property name="Byte2" type="java.lang.Byte" value="7"/>
              <property name="Double1" type="java.lang.Double" value="222.22"/>
              <property name="Double2" type="java.lang.Double" value="888.88"/>
              <property name="Float1" type="java.lang.Float" value="4.0"/>
              <property name="Float2" type="java.lang.Float" value="10.0"/>
              <property name="Int1" type="java.lang.Integer" value="4"/>
              <property name="Int2" type="java.lang.Integer" value="10"/>
              <property name="Long1" type="java.lang.Long" value="5"/>
              <property name="Long2" type="java.lang.Long" value="11"/>
              <property name="Short1" type="java.lang.Short" value="6"/>
              <property name="Short2" type="java.lang.Short" value="12"/>
              <property name="String1" type="java.lang.String" value="StringValue1"/>
              <property name="String2" type="java.lang.String" value="StringValue2"/>
            </message-properties>
            <body body-length="56">{1,0,1,255,1,2,3,6,7,0,65,0,66,64,89,6,102,102,102,10
        2,102,64,128,0,0,0,0,0,200,0,0,0,0,0,0,1,44,64,75,192,0,0,0,0,0,0,60,0,7,83,116,
        114,105,110,103,49}</body>
          </message>
        </result>
        <!-- 1 messages displayed, 6 messages total in queue -->
        <!-- If necessary, message body [partly] truncated to 2048 characters -->

        router1/sys$queuemanager/usage> output t0.txt
        router1/sys$queuemanager/usage> view t0 0 100
        router1/sys$queuemanager/usage>_

reboot

Syntax:

CODE
        reboot

Reboot the router. To activate changes, the configuration must be saved before invoking reboot.

Example:

CODE
        router5> reboot

        Reboot Launch in 10 Seconds.

        router5> Connection lost.
        $pamela>_

remove

Syntax:

CODE
        remove <queuename> (<message-key>|*)|(-index <start> <stop>)

Removes messages from a queue. The operation can either use the message key or * for all messages or -index to use a start and stop message index. The message index is the message sequence number in the queue, starting with 0. If, for example, the first 100 messages of a queue should be removed, the command is

CODE
        remove testqueue -index 0 99

Example:

CODE
        router1> cc sys$queuemanager
        router1/sys$queuemanager> cc usage
        router1/sys$queuemanager/usage> view t0 0 *

        <?xml version="1.0" encoding="UTF-8"?>
        <result>
          <message index="0" message-key="0" type="StreamMessage">
            <jms-header>
              <JMSDeliveryMode>PERSISTENT</JMSDeliveryMode>
              <JMSDestination>t0@router1</JMSDestination>
              <JMSExpiration>0</JMSExpiration>
              <JMSMessageID>ID:MUELLI/192.168.120.254-10279503995421</JMSMessageID>
              <JMSPriority>4</JMSPriority>
              <JMSRedelivered>false</JMSRedelivered>
              <JMSTimestamp>1027950399542</JMSTimestamp>
            </jms-header>
            <jmsx-header>
              <JMSXUserID>anonymous</JMSXUserID>
            </jmsx-header>
            <jms-vendor-properties/>
            <message-properties>
              <property name="Boolean1" type="java.lang.Boolean" value="true"/>
              <property name="Boolean2" type="java.lang.Boolean" value="false"/>
              <property name="Byte1" type="java.lang.Byte" value="1"/>
              <property name="Byte2" type="java.lang.Byte" value="7"/>
              <property name="Double1" type="java.lang.Double" value="222.22"/>
              <property name="Double2" type="java.lang.Double" value="888.88"/>
              <property name="Float1" type="java.lang.Float" value="4.0"/>
              <property name="Float2" type="java.lang.Float" value="10.0"/>
              <property name="Int1" type="java.lang.Integer" value="4"/>
              <property name="Int2" type="java.lang.Integer" value="10"/>
              <property name="Long1" type="java.lang.Long" value="5"/>
              <property name="Long2" type="java.lang.Long" value="11"/>
              <property name="Short1" type="java.lang.Short" value="6"/>
              <property name="Short2" type="java.lang.Short" value="12"/>
              <property name="String1" type="java.lang.String" value="StringValue1"/>
              <property name="String2" type="java.lang.String" value="StringValue2"/>
            </message-properties>
            <body>
              <stream-item type="java.lang.Boolean" value="true"/>
              <stream-item type="java.lang.Boolean" value="false"/>
              <stream-item type="java.lang.Byte" value="1"/>
              <stream-item type="java.lang.Byte" value="255"/>
              <stream-item type="[B" value="{1,2,3}"/>
              <stream-item type="[B" value="{6,7}"/>
              <stream-item type="java.lang.Character" value="A"/>
              <stream-item type="java.lang.Character" value="B"/>
              <stream-item type="java.lang.Double" value="100.1"/>
              <stream-item type="java.lang.Float" value="4.0"/>
              <stream-item type="java.lang.Integer" value="200"/>
              <stream-item type="java.lang.Long" value="300"/>
              <stream-item type="java.lang.Double" value="55.5"/>
              <stream-item type="java.lang.Short" value="60"/>
              <stream-item type="java.lang.String" value="String1"/>
            </body>
          </message>
          <message index="1" message-key="1" type="MapMessage">
            <jms-header>
              <JMSDeliveryMode>PERSISTENT</JMSDeliveryMode>
              <JMSDestination>t0@router1</JMSDestination>
              <JMSExpiration>0</JMSExpiration>
              <JMSMessageID>ID:MUELLI/192.168.120.254-10279503995572</JMSMessageID>
              <JMSPriority>4</JMSPriority>
              <JMSRedelivered>false</JMSRedelivered>
              <JMSTimestamp>1027950399557</JMSTimestamp>
            </jms-header>
            <jmsx-header>
              <JMSXUserID>anonymous</JMSXUserID>
            </jmsx-header>
            <jms-vendor-properties/>
            <message-properties>
              <property name="Boolean1" type="java.lang.Boolean" value="true"/>
              <property name="Boolean2" type="java.lang.Boolean" value="false"/>
              <property name="Byte1" type="java.lang.Byte" value="1"/>
              <property name="Byte2" type="java.lang.Byte" value="7"/>
              <property name="Double1" type="java.lang.Double" value="222.22"/>
              <property name="Double2" type="java.lang.Double" value="888.88"/>
              <property name="Float1" type="java.lang.Float" value="4.0"/>
              <property name="Float2" type="java.lang.Float" value="10.0"/>
              <property name="Int1" type="java.lang.Integer" value="4"/>
              <property name="Int2" type="java.lang.Integer" value="10"/>
              <property name="Long1" type="java.lang.Long" value="5"/>
              <property name="Long2" type="java.lang.Long" value="11"/>
              <property name="Short1" type="java.lang.Short" value="6"/>
              <property name="Short2" type="java.lang.Short" value="12"/>
              <property name="String1" type="java.lang.String" value="StringValue1"/>
              <property name="String2" type="java.lang.String" value="StringValue2"/>
            </message-properties>
            <body>
              <item name="P1" type="java.lang.Boolean" value="true"/>
              <item name="P10" type="java.lang.Float" value="4.0"/>
              <item name="P11" type="java.lang.Integer" value="200"/>
              <item name="P12" type="java.lang.Long" value="300"/>
              <item name="P13" type="java.lang.Short" value="60"/>
              <item name="P14" type="java.lang.String" value="String1"/>
              <item name="P2" type="java.lang.Boolean" value="false"/>
              <item name="P3" type="java.lang.Byte" value="1"/>
              <item name="P4" type="java.lang.Byte" value="255"/>
              <item name="P5" type="[B" value="{1,2,3}"/>
              <item name="P6" type="[B" value="{6,7}"/>
              <item name="P7" type="java.lang.Character" value="A"/>
              <item name="P8" type="java.lang.Character" value="B"/>
              <item name="P9" type="java.lang.Double" value="100.1"/>
            </body>
          </message>
          <message index="2" message-key="2" type="ObjectMessage">
            <jms-header>
              <JMSDeliveryMode>PERSISTENT</JMSDeliveryMode>
              <JMSDestination>t0@router1</JMSDestination>
              <JMSExpiration>0</JMSExpiration>
              <JMSMessageID>ID:MUELLI/192.168.120.254-10279503995573</JMSMessageID>
              <JMSPriority>4</JMSPriority>
              <JMSRedelivered>false</JMSRedelivered>
              <JMSTimestamp>1027950399557</JMSTimestamp>
            </jms-header>
            <jmsx-header>
              <JMSXUserID>anonymous</JMSXUserID>
            </jmsx-header>
            <jms-vendor-properties/>
            <message-properties>
              <property name="Boolean1" type="java.lang.Boolean" value="true"/>
              <property name="Boolean2" type="java.lang.Boolean" value="false"/>
              <property name="Byte1" type="java.lang.Byte" value="1"/>
              <property name="Byte2" type="java.lang.Byte" value="7"/>
              <property name="Double1" type="java.lang.Double" value="222.22"/>
              <property name="Double2" type="java.lang.Double" value="888.88"/>
              <property name="Float1" type="java.lang.Float" value="4.0"/>
              <property name="Float2" type="java.lang.Float" value="10.0"/>
              <property name="Int1" type="java.lang.Integer" value="4"/>
              <property name="Int2" type="java.lang.Integer" value="10"/>
              <property name="Long1" type="java.lang.Long" value="5"/>
              <property name="Long2" type="java.lang.Long" value="11"/>
              <property name="Short1" type="java.lang.Short" value="6"/>
              <property name="Short2" type="java.lang.Short" value="12"/>
              <property name="String1" type="java.lang.String" value="StringValue1"/>
              <property name="String2" type="java.lang.String" value="StringValue2"/>
            </message-properties>
            <body>This is a StringBuffer!</body>
          </message>
          <message index="3" message-key="3" type="Message">
            <jms-header>
              <JMSDeliveryMode>PERSISTENT</JMSDeliveryMode>
              <JMSDestination>t0@router1</JMSDestination>
              <JMSExpiration>0</JMSExpiration>
              <JMSMessageID>ID:MUELLI/192.168.120.254-10279503995575</JMSMessageID>
              <JMSPriority>4</JMSPriority>
              <JMSRedelivered>false</JMSRedelivered>
              <JMSTimestamp>1027950399557</JMSTimestamp>
            </jms-header>
            <jmsx-header>
              <JMSXUserID>anonymous</JMSXUserID>
            </jmsx-header>
            <jms-vendor-properties/>
            <message-properties>
              <property name="Boolean1" type="java.lang.Boolean" value="true"/>
              <property name="Boolean2" type="java.lang.Boolean" value="false"/>
              <property name="Byte1" type="java.lang.Byte" value="1"/>
              <property name="Byte2" type="java.lang.Byte" value="7"/>
              <property name="Double1" type="java.lang.Double" value="222.22"/>
              <property name="Double2" type="java.lang.Double" value="888.88"/>
              <property name="Float1" type="java.lang.Float" value="4.0"/>
              <property name="Float2" type="java.lang.Float" value="10.0"/>
              <property name="Int1" type="java.lang.Integer" value="4"/>
              <property name="Int2" type="java.lang.Integer" value="10"/>
              <property name="Long1" type="java.lang.Long" value="5"/>
              <property name="Long2" type="java.lang.Long" value="11"/>
              <property name="Short1" type="java.lang.Short" value="6"/>
              <property name="Short2" type="java.lang.Short" value="12"/>
              <property name="String1" type="java.lang.String" value="StringValue1"/>
              <property name="String2" type="java.lang.String" value="StringValue2"/>
            </message-properties>
          </message>
        </result>
        <!-- 4 messages displayed, 4 messages total in queue -->
        <!-- If necessary, message body [partly] truncated to 2048 characters -->

        router1/sys$queuemanager/usage> remove t0 3
        router1/sys$queuemanager/usage> view t0 0 *

        <?xml version="1.0" encoding="UTF-8"?>
        <result>
          <message index="0" message-key="0" type="StreamMessage">
            <jms-header>
              <JMSDeliveryMode>PERSISTENT</JMSDeliveryMode>
              <JMSDestination>t0@router1</JMSDestination>
              <JMSExpiration>0</JMSExpiration>
              <JMSMessageID>ID:MUELLI/192.168.120.254-10279503995421</JMSMessageID>
              <JMSPriority>4</JMSPriority>
              <JMSRedelivered>false</JMSRedelivered>
              <JMSTimestamp>1027950399542</JMSTimestamp>
            </jms-header>
            <jmsx-header>
              <JMSXUserID>anonymous</JMSXUserID>
            </jmsx-header>
            <jms-vendor-properties/>
            <message-properties>
              <property name="Boolean1" type="java.lang.Boolean" value="true"/>
              <property name="Boolean2" type="java.lang.Boolean" value="false"/>
              <property name="Byte1" type="java.lang.Byte" value="1"/>
              <property name="Byte2" type="java.lang.Byte" value="7"/>
              <property name="Double1" type="java.lang.Double" value="222.22"/>
              <property name="Double2" type="java.lang.Double" value="888.88"/>
              <property name="Float1" type="java.lang.Float" value="4.0"/>
              <property name="Float2" type="java.lang.Float" value="10.0"/>
              <property name="Int1" type="java.lang.Integer" value="4"/>
              <property name="Int2" type="java.lang.Integer" value="10"/>
              <property name="Long1" type="java.lang.Long" value="5"/>
              <property name="Long2" type="java.lang.Long" value="11"/>
              <property name="Short1" type="java.lang.Short" value="6"/>
              <property name="Short2" type="java.lang.Short" value="12"/>
              <property name="String1" type="java.lang.String" value="StringValue1"/>
              <property name="String2" type="java.lang.String" value="StringValue2"/>
            </message-properties>
            <body>
              <stream-item type="java.lang.Boolean" value="true"/>
              <stream-item type="java.lang.Boolean" value="false"/>
              <stream-item type="java.lang.Byte" value="1"/>
              <stream-item type="java.lang.Byte" value="255"/>
              <stream-item type="[B" value="{1,2,3}"/>
              <stream-item type="[B" value="{6,7}"/>
              <stream-item type="java.lang.Character" value="A"/>
              <stream-item type="java.lang.Character" value="B"/>
              <stream-item type="java.lang.Double" value="100.1"/>
              <stream-item type="java.lang.Float" value="4.0"/>
              <stream-item type="java.lang.Integer" value="200"/>
              <stream-item type="java.lang.Long" value="300"/>
              <stream-item type="java.lang.Double" value="55.5"/>
              <stream-item type="java.lang.Short" value="60"/>
              <stream-item type="java.lang.String" value="String1"/>
            </body>
          </message>
          <message index="1" message-key="1" type="MapMessage">
            <jms-header>
              <JMSDeliveryMode>PERSISTENT</JMSDeliveryMode>
              <JMSDestination>t0@router1</JMSDestination>
              <JMSExpiration>0</JMSExpiration>
              <JMSMessageID>ID:MUELLI/192.168.120.254-10279503995572</JMSMessageID>
              <JMSPriority>4</JMSPriority>
              <JMSRedelivered>false</JMSRedelivered>
              <JMSTimestamp>1027950399557</JMSTimestamp>
            </jms-header>
            <jmsx-header>
              <JMSXUserID>anonymous</JMSXUserID>
            </jmsx-header>
            <jms-vendor-properties/>
            <message-properties>
              <property name="Boolean1" type="java.lang.Boolean" value="true"/>
              <property name="Boolean2" type="java.lang.Boolean" value="false"/>
              <property name="Byte1" type="java.lang.Byte" value="1"/>
              <property name="Byte2" type="java.lang.Byte" value="7"/>
              <property name="Double1" type="java.lang.Double" value="222.22"/>
              <property name="Double2" type="java.lang.Double" value="888.88"/>
              <property name="Float1" type="java.lang.Float" value="4.0"/>
              <property name="Float2" type="java.lang.Float" value="10.0"/>
              <property name="Int1" type="java.lang.Integer" value="4"/>
              <property name="Int2" type="java.lang.Integer" value="10"/>
              <property name="Long1" type="java.lang.Long" value="5"/>
              <property name="Long2" type="java.lang.Long" value="11"/>
              <property name="Short1" type="java.lang.Short" value="6"/>
              <property name="Short2" type="java.lang.Short" value="12"/>
              <property name="String1" type="java.lang.String" value="StringValue1"/>
              <property name="String2" type="java.lang.String" value="StringValue2"/>
            </message-properties>
            <body>
              <item name="P1" type="java.lang.Boolean" value="true"/>
              <item name="P10" type="java.lang.Float" value="4.0"/>
              <item name="P11" type="java.lang.Integer" value="200"/>
              <item name="P12" type="java.lang.Long" value="300"/>
              <item name="P13" type="java.lang.Short" value="60"/>
              <item name="P14" type="java.lang.String" value="String1"/>
              <item name="P2" type="java.lang.Boolean" value="false"/>
              <item name="P3" type="java.lang.Byte" value="1"/>
              <item name="P4" type="java.lang.Byte" value="255"/>
              <item name="P5" type="[B" value="{1,2,3}"/>
              <item name="P6" type="[B" value="{6,7}"/>
              <item name="P7" type="java.lang.Character" value="A"/>
              <item name="P8" type="java.lang.Character" value="B"/>
              <item name="P9" type="java.lang.Double" value="100.1"/>
            </body>
          </message>
          <message index="2" message-key="2" type="ObjectMessage">
            <jms-header>
              <JMSDeliveryMode>PERSISTENT</JMSDeliveryMode>
              <JMSDestination>t0@router1</JMSDestination>
              <JMSExpiration>0</JMSExpiration>
              <JMSMessageID>ID:MUELLI/192.168.120.254-10279503995573</JMSMessageID>
              <JMSPriority>4</JMSPriority>
              <JMSRedelivered>false</JMSRedelivered>
              <JMSTimestamp>1027950399557</JMSTimestamp>
            </jms-header>
            <jmsx-header>
              <JMSXUserID>anonymous</JMSXUserID>
            </jmsx-header>
            <jms-vendor-properties/>
            <message-properties>
              <property name="Boolean1" type="java.lang.Boolean" value="true"/>
              <property name="Boolean2" type="java.lang.Boolean" value="false"/>
              <property name="Byte1" type="java.lang.Byte" value="1"/>
              <property name="Byte2" type="java.lang.Byte" value="7"/>
              <property name="Double1" type="java.lang.Double" value="222.22"/>
              <property name="Double2" type="java.lang.Double" value="888.88"/>
              <property name="Float1" type="java.lang.Float" value="4.0"/>
              <property name="Float2" type="java.lang.Float" value="10.0"/>
              <property name="Int1" type="java.lang.Integer" value="4"/>
              <property name="Int2" type="java.lang.Integer" value="10"/>
              <property name="Long1" type="java.lang.Long" value="5"/>
              <property name="Long2" type="java.lang.Long" value="11"/>
              <property name="Short1" type="java.lang.Short" value="6"/>
              <property name="Short2" type="java.lang.Short" value="12"/>
              <property name="String1" type="java.lang.String" value="StringValue1"/>
              <property name="String2" type="java.lang.String" value="StringValue2"/>
            </message-properties>
            <body>This is a StringBuffer!</body>
          </message>
        </result>
        <!-- 3 messages displayed, 3 messages total in queue -->
        <!-- If necessary, message body [partly] truncated to 2048 characters -->

        router1/sys$queuemanager/usage> remove t0 *
        router1/sys$queuemanager/usage> view t0 0 *

        <?xml version="1.0" encoding="UTF-8"?>
        <result/>
        <!-- 0 messages displayed, 0 messages total in queue -->
        <!-- If necessary, message body [partly] truncated to 2048 characters -->

        router1/sys$queuemanager/usage>_

reset

Syntax:

CODE
        reset <queuename>

Resets the produced/consumed counters of the queue to zero.

Example:

CODE
         router1/sys$q/usage> ls testqueue

         Entity:      Active Queue
         Description: Active Queue

         Properties for this Entity:

         Name                                    Current Value
         --------------------------------------------------------------
         acache-size (R/O)                       500
         acache-size-kb (R/O)                    -1
         acleanup-interval (R/O)                 120000
         aflowcontrol-start-queuesize (R/O)      400
         amax-messages (R/O)                     -1
         flowcontrol-delay (R/O)                 0
         mcache-messages (R/O)                   0
         mcache-size-kb (R/O)                    0
         messagecount (R/O)                      0
         msg-consume-rate (R/O)                  0
         msg-produce-rate (R/O)                  0
         total-consumed (R/O)                    100000
         total-produced (R/O)                    100000

         Entity contains no Sub-Entities.

         router1/sys$q/usage> reset testqueue
         router1/sys$q/usage> ls testqueue

         Entity:      Active Queue
         Description: Active Queue

         Properties for this Entity:

         Name                                    Current Value
         --------------------------------------------------------------
         acache-size (R/O)                       500
         acache-size-kb (R/O)                    -1
         acleanup-interval (R/O)                 120000
         aflowcontrol-start-queuesize (R/O)      400
         amax-messages (R/O)                     -1
         flowcontrol-delay (R/O)                 0
         mcache-messages (R/O)                   0
         mcache-size-kb (R/O)                    0
         messagecount (R/O)                      0
         msg-consume-rate (R/O)                  0
         msg-produce-rate (R/O)                  0
         total-consumed (R/O)                    0
         total-produced (R/O)                    0

         Entity contains no Sub-Entities.

         router1/sys$q/usage>

rollback

Syntax:

CODE
        rollback <entityname>

Rolls back an in-doubt XA transaction. An XA transaction becomes in doubt if it was prepared but not committed due to an abort of the JTA transaction manager or a computer crash.

Example:

CODE
         router1/sys$xa/usage> cc prepared-tx
         router1/sys$xa/usage/prepared-tx> lc

         Entity List: Prepared XA Transactions
         Description: Prepared XA Transactions

         Entities in this List:
         ----------------------
         1
         2
         3

         router1/sys$xa/usage/prepared-tx> rollback 3
         router1/sys$xa/usage/prepared-tx> lc

         Entity List: Prepared XA Transactions
         Description: Prepared XA Transactions

         Entities in this List:
         ----------------------
         1
         2

         router1/sys$xa/usage/prepared-tx>_

save

Syntax:

CODE
        save

Saves the configuration in the router's configuration file. Before save, the old configuration file is backed up.

Example:

CODE
        router1> save

        Configuration backed up to file '/Users/kw/swiftmq_7_2_0/scripts/unix/../../config/router1/routerconfig.xml.20080306123832288'.
        Configuration saved to file '/Users/kw/swiftmq_7_2_0/scripts/unix/../../config/router1/routerconfig.xml'.

        router1>_

scan

Since: 12.5.0

Syntax:

CODE
        scan

Scans the page.db to collect a statistic about the number and size of messages. The result is stored under /sys$store/usage/scan-result. It sets the attribute page-size-recommended to the recommended page size. This value is used on the next startup to convert the page.db to the new page size.

Example:

CODE
      router> cc /sys$store/database
      router/sys$store/database> scan
      Scanning page.db initiated.
      router/sys$store/database> cc /sys$store/usage/scan
      router/sys$store/usage/scan> lc
      Entity List: Scan Result
      Description: Result of the page.db scan
      
      Number of Entities in this List: 10
      --------------------------------
      20220801:10:54:57-0000001
      20220801:10:54:57-0000003
      20220801:10:54:57-0000004
      20220801:10:54:57-0000005
      20220801:10:54:57-0000015
      20220801:10:54:57-0000020
      20220801:10:54:57-0000036
      20220801:10:54:57-0000060
      20220801:10:54:57-0000067
      20220801:10:54:57-0000154
      router/sys$store/usage/scan> lc 20220801:10:54:57-0000001
      Entity:      Scan
      Description: Scan Result
      
      Properties for this Entity:
      
      Name                                    Current Value
      --------------------------------------------------------------
      number-messages (R/O)                   185
      size (R/O)                              1
      
      Entity contains no Sub-Entities.
      router/sys$store/usage/scan> 

set

Syntax:

CODE
        set <prop> [<value>]

Sets the value for this property. For String-type properties the value is optional. In this case, the default value is set by CLI.

Example:

CODE
        router1/sys$authentication> lc

        Entity:      Authentication Swiftlet
        Description: Authentication Swiftlet

        Properties for this Entity:

        Name                                    Current Value
        --------------------------------------------------------------
        authentication-enabled                  false

        Sub-Entities of this Entity:
        ----------------------------
        .metadata
        groups
        resource-limit-groups
        users

        router1/sys$authentication> set authentication-enabled true
        router1/sys$authentication> lc

        Entity:      Authentication Swiftlet
        Description: Authentication Swiftlet

        Properties for this Entity:

        Name                                    Current Value
        --------------------------------------------------------------
        authentication-enabled                  true

        Sub-Entities of this Entity:
        ----------------------------
        .metadata
        groups
        resource-limit-groups
        users

        router1/sys$authentication>

show template

Syntax:

CODE
        show template

Shows the template for new entities of an entity list. This command is useful if one doesn't know which properties are mandatory if a new entity should be created.

Example:

CODE
        router1> cc sys$queuemanager/queues
        router1/sys$queuemanager/queues> show template

        Template:    Queue
        Description: Queue Definition

        Properties for this Template:

        Property Name  : cache-size
        Display Name   : Cache Size
        Description    : Message Queue Cache Size
        Type           : class java.lang.Integer
        Min. Value     : <not set>
        Max. Value     : <not set>
        Default Value  : 500
        Poss. Values   : <not set>
        Mandatory     : false
        Read Only      : false
        Reboot Required: false

        Property Name  : cache-size-bytes-kb
        Display Name   : Cache Size Bytes (KB)
        Description    : Message Queue Cache Size Bytes (KB)
        Type           : class java.lang.Integer
        Min. Value     : <not set>
        Max. Value     : <not set>
        Default Value  : -1
        Poss. Values   : <not set>
        Mandatory     : false
        Read Only      : false
        Reboot Required: false

        Property Name  : cleanup-interval
        Display Name   : Cleanup Interval
        Description    : Interval for checking of msg expiration
        Type           : class java.lang.Long
        Min. Value     : <not set>
        Max. Value     : <not set>
        Default Value  : 120000
        Poss. Values   : <not set>
        Mandatory     : false
        Read Only      : false
        Reboot Required: false

        Property Name  : duplicate-detection-backlog-size
        Display Name   : Duplicate Detection Backlog Size
        Description    : Size of the Backlog for Duplicate Message Detection
        Type           : class java.lang.Integer
        Min. Value     : <not set>
        Max. Value     : <not set>
        Default Value  : 2000
        Poss. Values   : <not set>
        Mandatory     : false
        Read Only      : false
        Reboot Required: false

        Property Name  : duplicate-detection-enabled
        Display Name   : Duplicate Detection Enabled
        Description    : Enables/Diables Duplicate Message Detection
        Type           : class java.lang.Boolean
        Min. Value     : <not set>
        Max. Value     : <not set>
        Default Value  : true
        Poss. Values   : <not set>
        Mandatory     : false
        Read Only      : false
        Reboot Required: false

        Property Name  : flowcontrol-start-queuesize
        Display Name   : Flow Control Start Queue Size
        Description    : Flow Control starts at this Queue Size
        Type           : class java.lang.Integer
        Min. Value     : <not set>
        Max. Value     : <not set>
        Default Value  : 400
        Poss. Values   : <not set>
        Mandatory     : false
        Read Only      : false
        Reboot Required: false

        Property Name  : max-messages
        Display Name   : Maximum Messages
        Description    : Max. Messages for this Queue
        Type           : class java.lang.Integer
        Min. Value     : <not set>
        Max. Value     : <not set>
        Default Value  : -1
        Poss. Values   : <not set>
        Mandatory     : false
        Read Only      : false
        Reboot Required: false

        Property Name  : persistence-mode
        Display Name   : Queue Persistence
        Description    : Persistence Mode of this Queue
        Type           : class java.lang.String
        Min. Value     : <not set>
        Max. Value     : <not set>
        Default Value  : as_message
        Poss. Values   : [as_message, persistent, non_persistent]
        Mandatory     : false
        Read Only      : false
        Reboot Required: false

        Template contains no Sub-Entities.

        router1/sys$queuemanager/queues>_

shrink

Syntax:

CODE
        shrink

Shrinks the data store page.db to the highest page in use. The shrink command initiates a checkpoint on the data store and shrinks the page.db thereafter.

Example:

CODE
        router1> cc sys$store
        router1/sys$store> cc database
        router1/sys$store/database> shrink

        Shrink initiated.

        router1/sys$store/database> _

sr

Syntax:

CODE
        sr <router>

Switches to a specific router and makes this router the current router for configuration. After CLI starts, there is no current router, so an sr command must be invoked.

Example:

CODE
        $pamela> java com.swiftmq.admin.cli.CLI smqp://localhost:4005 QueueConnectionFactory

        Welcome to SwiftMQ!

        Username: admin
        Password: secret
        Trying to connect ... connected
        Type 'help' to get a list of available commands.
        Router 'pamela.iit.de' is available for administration.
        Router 'dev194.iit.de' is available for administration.
        >sr dev194.iit.de
        dev194.iit.de>_

Note that you can abbreviate the router name, i. e. in the above example you can also type sr d to switch to router dev194.iit.de.

substitute

Syntax:

CODE
        substitute on | off

Since 11.0.0

If turned on, CLI will substitute all ${variable} variables in a command with the values set via the var command.

Default is on.

The following variables are automatically available:

Variable

Description

${routername}

Contains the current Router name set with the sr command.

${scriptpath}

Contains the directory of the currently executing CLI script.

Example:

CODE
        >sr router1
        router1>substitute on
        router1>cc /sys$topicmanager/topics
        router1>new stream_${routername}_streamregistry
        router1>_

sum

Syntax:

CODE
        sum [<prop1> <prop2> ...]

Computes the sum of property values of an entity list. It returns also the number of entities (count) in this entity list. Only properties of type java.lang.Integer, java.lang.Long, java.lang.Double andjava.lang.String can be aggregated. The latter is converted to Double, if possible.

Example:

CODE
        router1> cc /sys$net/usage
        router1/sys$net/usage> sum
        count: 3
        router1/sys$net/usage> sum throughput-input throughput-output
        count: 3
        throughput-input: 338.36
        throughput-output: 309.63
        router1/sys$net/usage> cc /sys$jms/usage
        router1/sys$jms/usage> sum msgs-sent msgs-received total-sent total-received
        count: 3
        msgs-sent: 1516
        msgs-received: 1516
        total-sent: 61264
        total-received: 61263
        router1/sys$jms/usage>

var

Syntax:

CODE
        var [<name> [<value>]]

Since 11.0.0

List, set, or remove a variable.

If only the var command is given, all defined variables are listed.

If the command and the name of a variable are given, the variable is removed.

If the command, name, and value are given, the variable is set to that value.

The following variables are automatically available:

Variable

Description

${routername}

Contains the current Router name set with the sr command.

${scriptpath}

Contains the directory of the currently executing CLI script.

Example:

CODE
        >sr router1
        router1>substitute on
        router1>var myvar `Test"
        router1>var
        routername=router1
        myvar=Test
        router1>echo `This is a ${myvar}"
        This is a Test
        router1>_

verbose

Syntax:

CODE
        verbose on | off

Since 11.0.0

If turned on, CLI will display commands before execution. This is useful when executing CLI scripts.

Default is off.

Example:

CODE
        >sr router1
        router1>verbose on
        router1>substitute on
        substitute on
        router1>cc /sys$topicmanager/topics
        cc /sys$topicmanager/topics
        router1>new stream_${routername}_streamregistry
        new stream_router1_streamregistry
        router1>_

view

Syntax:

CODE
        view <queuename> <startidx> (<stopidx>|*) [<selector>] [truncate <n>]

Views messages of a queue. The command is available in context /sys$queuemanager/usage.

  • startindex specifies the index in the queue where the first message (top of queue) is at index 0.

  • stopindex is obsolete since 12.3.9 but must be specified for compatibility reasons. The command always returns a maximum of 100 messages starting at startindex.

  • selector is a JMS message selector that can be used to reduce the result set of the messages. startindex will then be the index of that result set. Using a selector will cause a full scan of the queue which can take a while on large queues.

  • truncate <n> is the maximum number of characters of the returned message body. Default is 2048.

Output Format

The output format is XML. The result set is covered by an XML element <result>. Sub-elements are <message> elements. A <message> element contains the following sub-elements:

  • <jms-header>, contains the standard JMS message header.

    <jmsx-header>, contains the standard JMSX message header.

    <jms-vendor-properties>, contains the JMS vendor properties; in SwiftMQ they are starting with JMS_SWIFTMQ.

    <message-properties>, contains the custom message properties, set by a message producer.

    <body>, contains the message body which is specific to the message type. A message of type javax.jms.Message doesn't have a body.

A javax.jms.TextMessage contains the text inside the element.

Example:

CODE
         <body>Moin, Moin!</body>

A javax.jms.ObjectMessage contains the result of the toString() method inside the element. If toString() fails due to a ClassNotFoundException, the body contains a resp. error message.

Example:

CODE
         <body>This is a StringBuffer!</body>

A javax.jms.BytesMessage adds an attribute body-length to the <body> element which contains the unsigned byte values.

Example:

CODE
        <body body-length="56">{1,0,1,255,1,2,3,6,7,0,65,0,66,64,89,6,102,
        102,102,102,102,64,128,0,0,0,0,0,200,0,0,0,0,0,0,1,44,64,75,192,0,0,0,0,
        0,0,60,0,7,83,116,114,105,110,103,49}</body>

A javax.jms.StreamMessage contains <stream-item> sub-elements.

Example:

CODE
        <body>
          <stream-item type="java.lang.Boolean" value="true"/>
          <stream-item type="java.lang.Boolean" value="false"/>
          <stream-item type="java.lang.Byte" value="1"/>
          <stream-item type="java.lang.Byte" value="255"/>
          <stream-item type="[B" value="{1,2,3}"/>
          <stream-item type="[B" value="{6,7}"/>
          <stream-item type="java.lang.Character" value="A"/>
          <stream-item type="java.lang.Character" value="B"/>
          <stream-item type="java.lang.Double" value="100.1"/>
          <stream-item type="java.lang.Float" value="4.0"/>
          <stream-item type="java.lang.Integer" value="200"/>
          <stream-item type="java.lang.Long" value="300"/>
          <stream-item type="java.lang.Double" value="55.5"/>
          <stream-item type="java.lang.Short" value="60"/>
          <stream-item type="java.lang.String" value="String1"/>
        </body>

A javax.jms.MapMessage contains <item> sub-elements.

Example:

CODE
        <body>
          <item name="P1" type="java.lang.Boolean" value="true"/>
          <item name="P10" type="java.lang.Float" value="4.0"/>
          <item name="P11" type="java.lang.Integer" value="200"/>
          <item name="P12" type="java.lang.Long" value="300"/>
          <item name="P13" type="java.lang.Short" value="60"/>
          <item name="P14" type="java.lang.String" value="String1"/>
          <item name="P2" type="java.lang.Boolean" value="false"/>
          <item name="P3" type="java.lang.Byte" value="1"/>
          <item name="P4" type="java.lang.Byte" value="255"/>
          <item name="P5" type="[B" value="{1,2,3}"/>
          <item name="P6" type="[B" value="{6,7}"/>
          <item name="P7" type="java.lang.Character" value="A"/>
          <item name="P8" type="java.lang.Character" value="B"/>
          <item name="P9" type="java.lang.Double" value="100.1"/>
        </body>

Usage Examples

View all messages of queue t0:

Example:

CODE
        router1/sys$queuemanager/usage> view t0 0 *

        <?xml version="1.0" encoding="UTF-8"?>
        <result>
          <message index="0" message-key="0" type="BytesMessage">
            <jms-header>
              <JMSDeliveryMode>NON_PERSISTENT</JMSDeliveryMode>
              <JMSDestination>t0@router1</JMSDestination>
              <JMSExpiration>0</JMSExpiration>
              <JMSMessageID>ID:MUELLI/192.168.120.254-10276083552300</JMSMessageID>
              <JMSPriority>4</JMSPriority>
              <JMSRedelivered>false</JMSRedelivered>
              <JMSTimestamp>1027608355230</JMSTimestamp>
            </jms-header>
            <jmsx-header>
              <JMSXUserID>anonymous</JMSXUserID>
            </jmsx-header>
            <jms-vendor-properties/>
            <message-properties>
              <property name="Boolean1" type="java.lang.Boolean" value="true"/>
              <property name="Boolean2" type="java.lang.Boolean" value="false"/>
              <property name="Byte1" type="java.lang.Byte" value="1"/>
              <property name="Byte2" type="java.lang.Byte" value="7"/>
              <property name="Double1" type="java.lang.Double" value="222.22"/>
              <property name="Double2" type="java.lang.Double" value="888.88"/>
              <property name="Float1" type="java.lang.Float" value="4.0"/>
              <property name="Float2" type="java.lang.Float" value="10.0"/>
              <property name="Int1" type="java.lang.Integer" value="4"/>
              <property name="Int2" type="java.lang.Integer" value="10"/>
              <property name="Long1" type="java.lang.Long" value="5"/>
              <property name="Long2" type="java.lang.Long" value="11"/>
              <property name="Short1" type="java.lang.Short" value="6"/>
              <property name="Short2" type="java.lang.Short" value="12"/>
              <property name="String1" type="java.lang.String" value="StringValue1"/>
              <property name="String2" type="java.lang.String" value="StringValue2"/>
            </message-properties>
            <body body-length="56">{1,0,1,255,1,2,3,6,7,0,65,0,66,64,89,6,102,102,102,10
        2,102,64,128,0,0,0,0,0,200,0,0,0,0,0,0,1,44,64,75,192,0,0,0,0,0,0,60,0,7,83,116,
        114,105,110,103,49}</body>
          </message>
          <message index="1" message-key="1" type="StreamMessage">
            <jms-header>

            ... (etc, snipped)

          </message>
        </result>
        <!-- 6 messages displayed, 6 messages total in queue -->
        <!-- If necessary, message body [partly] truncated to 2048 characters -->

        router1/sys$queuemanager/usage>_

View all messages of queue t0 but truncate the body output to 20.

Example:

CODE
        router1/sys$queuemanager/usage> view t0 0 * truncate 20

        <?xml version="1.0" encoding="UTF-8"?>
        <result>
          <message index="0" message-key="0" type="BytesMessage">
            <jms-header>
              <JMSDeliveryMode>NON_PERSISTENT</JMSDeliveryMode>
              <JMSDestination>t0@router1</JMSDestination>
              <JMSExpiration>0</JMSExpiration>
              <JMSMessageID>ID:MUELLI/192.168.120.254-10276083552300</JMSMessageID>
              <JMSPriority>4</JMSPriority>
              <JMSRedelivered>false</JMSRedelivered>
              <JMSTimestamp>1027608355230</JMSTimestamp>
            </jms-header>
            <jmsx-header>
              <JMSXUserID>anonymous</JMSXUserID>
            </jmsx-header>
            <jms-vendor-properties/>
            <message-properties>
              <property name="Boolean1" type="java.lang.Boolean" value="true"/>
              <property name="Boolean2" type="java.lang.Boolean" value="false"/>
              <property name="Byte1" type="java.lang.Byte" value="1"/>
              <property name="Byte2" type="java.lang.Byte" value="7"/>
              <property name="Double1" type="java.lang.Double" value="222.22"/>
              <property name="Double2" type="java.lang.Double" value="888.88"/>
              <property name="Float1" type="java.lang.Float" value="4.0"/>
              <property name="Float2" type="java.lang.Float" value="10.0"/>
              <property name="Int1" type="java.lang.Integer" value="4"/>
              <property name="Int2" type="java.lang.Integer" value="10"/>
              <property name="Long1" type="java.lang.Long" value="5"/>
              <property name="Long2" type="java.lang.Long" value="11"/>
              <property name="Short1" type="java.lang.Short" value="6"/>
              <property name="Short2" type="java.lang.Short" value="12"/>
              <property name="String1" type="java.lang.String" value="StringValue1"/>
              <property name="String2" type="java.lang.String" value="StringValue2"/>
            </message-properties>
            <body body-length="56">{1,0,1,255,1,2,3,6,7,0,65,0,66,64,89,6,102,102,102,10
        2...(truncated)}</body>
          </message>
          <message index="1" message-key="1" type="StreamMessage">
            <jms-header>

            ... (etc, snipped)

          </message>
        </result>
        <!-- 6 messages displayed, 6 messages total in queue -->
        <!-- If necessary, message body [partly] truncated to 2048 characters -->

        router1/sys$queuemanager/usage>_

View messages 5 to 10 of queue t0 but truncate the body output to 20 and use a message selector:

Example:

CODE
        router1/sys$queuemanager/usage> view t0 0 * "Double2 between 800 and 900" truncate 20

        (result snipped)

        router1/sys$queuemanager/usage>_

Redirect the output to a file t0.xml and pump all messages of queue t0 into that file for further processing:

Example:

CODE
        router1/sys$queuemanager/usage> output t0.xml
        router1/sys$queuemanager/usage> view t0 0 *
        router1/sys$queuemanager/usage> output console
        router1/sys$queuemanager/usage>_

wr

Syntax:

CODE
        wr <router> [<timeout-ms>]
Copy

Waits that a router becomes available for administration. The command has no effect if the router is already available. It is useful in CLI scripts, e.g. to shutdown a remote router, to first wait for the availability, and then execute other commands.

If the optional timeout-ms (milliseconds) parameter is added, the command waits at maximum this amount of time and returns if the router is still not available.

Example:

CODE
        $dev194> java com.swiftmq.admin.cli.CLI smqp://localhost:4005 QueueConnectionFactory

        Welcome to SwiftMQ!

        Username: admin
        Password: secret
        Trying to connect ... connected
        Type 'help' to get a list of available commands.
        Router 'dev194.iit.de' is available for administration.
        >wr pamela.iit.de
        Waiting for router 'pamela.iit.de'
        Router 'pamela.iit.de' is available for administration.
        >sr pamela.iit.de
        pamela.iit.de>_

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.