Java CAPS JMS Reference

Using the MS Control Utility

This topic contains procedures for performing selected tasks using the MS Control utility.


Note –

If you are using a Logical Host/Domain with a name other than localhost, you must also specify the host name by including the -host flag with the host name. Likewise, if you are using a non-default port for the JMS IQ Manager, you must also specify the port by including the -port flag with the port number.


ProcedureTo Change Message Contents

To change the contents (payload) of a message for a specified message destination, use the -changeqmsg (-cqm) or -changetmsg (-ctm) flag. You must specify whether the original message type is bytes or text. The example illustrates the procedure for a topic.


Note –

The message cannot be processed while you are changing the contents.


  1. Use the following command syntax to specify the contents change:


    stcmsctrlutil.exe  -ctm topicname seqnumber -msgtype type

    where topicname is the name of the topic that contains the message, seqnumber is the sequence number of the message, and type is either bytes or text indicating the message type of the original message.

  2. Press Return.

  3. Type the new content.

  4. Press Control-Z.

ProcedureTo Create a Backup Archive File

This example creates an archive file containing all messages up to the date 09/11/2003 in the root backup path.


Note –

See Journal Directory regarding the location of the journal database directory.


Before You Begin

Ensure that Journaling is enabled. For information, see Enable Journal.

  1. Use the following command syntax to specify the archive file:


    stcmsctrlutil -backup journal-database-directory\backup\backup.zip "09/11/2003"
  2. Press Return.

    If successful, you will receive the following response:


    Backup finished. Archived messages: 2003

ProcedureTo Access an Archive File


Note –

See Journal Directory regarding the location of the journal database directory.


  1. Locate the desired archive file in the root backup directory.

    By default, the root backup directory is:


    journal-database-directory\backup
  2. Extract the archive file to a directory of your own choosing.

    For example:


    c:\JavaCAPS\backup\extract1

Example 1–1 Displaying a Topic List

As an example, use the following command syntax to display the topic list for the archive file:


stcmsctrlutil -ar c:\JavaCAPS\backup\extract1 -tl

You can then examine the individual topics further, as desired.


ProcedureTo Set the MS Control Utility Timeout Period

The MS Control Utility uses a default timeout period of five seconds for retrieving requested information, after which the utility exits and you see the message “Timeout to receive message from the server, exiting stcmsctrlutil API.” If this behavior should become a problem, you can include the -timeout flag with any command to set the MS Control utility's timeout period to a different value for that command only. Any command not including the -timeout flag uses the default value.

The example below sets the timeout period to 15 seconds, while obtaining a topic list from the journaler.

  1. Use the following command syntax to set the timeout period:


    stcmsctrlutil -j -tl -timeout 15

ProcedureTo Shut the Server Down

  1. Use the following command syntax to shut the server down:


    stcmsctrlutil  -shutdown