Sun logo      Previous      Contents      Index      Next     

Sun ONE Message Queue 3.5 Administrator's Guide

Chapter 3
MQ Administration Tasks and Tools

Sun™ ONE Message Queue (MQ) administration consists of a number of tasks and a number of tools for performing those tasks.

This chapter first provides an overview of administrative tasks and then describes the administration tools, focusing on common features of the command line administration utilities.


MQ Administration Tasks

The specific tasks you need to perform depend on whether you are in a development or a production environment.

Development Environments

In a development environment, the work focuses on programming MQ client applications. The MQ message server is needed principally for testing. In a development environment, the emphasis is on flexibility, and you typically adopt the following practices:

Production Environments

In a production environment, in which applications must be reliably deployed and run, administration is much more important. The administration tasks you have to perform depend on the complexity of your messaging system and the complexity of the applications it must support. In general, however, these tasks can be grouped into setup operations and maintenance operations.

Setup Operations

    To Set Up a Production Environment

Typically you have to perform at least some, if not all, of the following setup operations:

Maintenance Operations

    To Set Up a Production Environment

In addition, in a production environment, MQ message server resources need to be tightly monitored and controlled. Application performance, reliability, and security are at a premium, and you have to perform a number of ongoing tasks, described below, using MQ administration tools:


MQ Administration Tools

MQ administration tools fall into two categories: command line utilities and a graphical user interface (GUI) Administration Console (imqadmin). The Console combines the capabilities of two command line utilities: the Command utility (imqcmd) and the Object Manager utility (imqobjmgr). You can use the Console (and these two command line utilities) to manage a broker remotely and to manage MQ administered objects. The other command line utilities (imqbrokerd, imqusermgr, imqdbmgr, and imqkeytool) must be run on the same host as their associated broker, as shown in Figure 3-1.

Information on the Administration Console is available in the online help. The command line utilities, which are generally used to perform specialized tasks, are described in "Summary of Command Line Utilities."

The Administration Console

You can use the administration console to do the following:

There are some tasks that you cannot use the Administration Console to perform; chief among these are starting up a broker, creating broker clusters, configuring more specialized properties of a broker and physical destinations, and managing a user database.

Chapter 4, "Administration Console Tutorial" provides a brief, hands-on tutorial to familiarize you with the Console and to illustrate how you use it to accomplish basic tasks.

Summary of Command Line Utilities

This section introduces the command line utilities you use to perform MQ administration tasks. You use the MQ utilities to start up and manage a broker and to perform other, more specialized administrative tasks.

Figure 3-1  Local and Remote Administration Utilities

Diagram showing that imqcmd and imqobjmgr reside on remote host, while all other utilities must reside on the broker's host.

All MQ utilities are accessible from a command line interface (CLI). Utility commands share common formats, syntax conventions, and options, as described in a subsequent section of this chapter. You can find more detailed information on the use of the command line utilities in subsequent chapters.

Broker (imqbrokerd)     You use the Broker utility to start the broker. You use options to the imqbrokerd command to specify whether brokers should be connected in a cluster and to specify additional configuration information. The imqbrokerd command is documented in Chapter 5, "Starting and Configuring a Broker."

Command (imqcmd)     After starting a broker, you use the Command utility to create, update, and delete physical destinations; control the broker and its connection services; and manage the broker’s resources. The imqcmd command is documented in Chapter 6, "Broker and Application Management."

Object Manager (imqobjmgr)     You use the Object Manager utility to add, list, update, and delete administered objects in an object store accessible via JNDI. Administered objects allow JMS clients to be provider-independent by insulating them from JMS provider-specific naming and configuration formats. The imqobjmgr command is documented in Chapter 7, "Managing Administered Objects."

User Manager (imqusermgr)     You use the User Manager utility to populate a file-based user repository used to authenticate and authorize users. The imqusermgr command is documented in Chapter 8, "Managing Security."

Key Tool (imqkeytool)     You use the Key Tool utility to generate self-signed certificates used for SSL authentication. The imqkeytool command is documented in Chapter 8, "Managing Security" and in Appendix C, "HTTP/HTTPS Support (Enterprise Edition)."

Database Manager (imqdbmgr)     You use the Database Manager utility to create and manage a JDBC-compliant database used for persistent storage. The imqdbmgr command is documented in Appendix B, "Setting Up Plugged-in Persistence."

Service Administrator (imqsvcadmin)     You use the Service Administrator utility to install, query, and remove the broker as a Windows service. The imqsvcadmin command is documented in Appendix D, "Using a Broker as a Windows Service."

Command Line Syntax

MQ command-line interface utilities are simple shell commands. That is, from the standpoint of the Windows, Linux, or Solaris command shell where they are entered, the name of the utility itself is a command and its subcommands or options are simply arguments passed to that command. For this reason, there are no commands to start or quit the utility, per se, and no need for such commands.

All the command line utilities share the following command syntax:

Utility_Name [subcommand] [argument] [[-option_name [-option_argument]]]

Utility_Name specifies the name of an MQ utility, for example, imqcmd, imqobjmgr, imqusermgr, and so on.

There are four important things to remember:

The following is an example of a command line that has no subcommand clause. The command starts the default broker.

imqbrokerd

The following command is a bit more complicated: it destroys a destination of type queue that is named myQueue for an administrator (user) named admin with a corresponding password admin, without confirmation and without output being displayed on the console.

imqcmd destroy dst -t q -n myQueue -u admin -p admin -f -s

Common Command Line Options

Table 3-1 describes the options that are common to all MQ administration utilities. Aside from the requirement that you specify these options after you specify the subcommand on the command line, the options described below (or any other options passed to a utility) do not have to be entered in any special order.

Table 3-1  Common MQ Command Line Options 

Option

Description

-h

Displays usage help for the specified utility.

-H

Displays expanded usage help, including attribute list and examples (supported only for imqcmd and imqobjmgr).

-s

Turns on silent mode: no output is displayed. Specify as -silent for imqbrokerd.

-v

Displays version information.

-f

Performs the given action without prompting for user confirmation.

-pre

(Used only with imqobjmgr) Turns on preview mode, allowing the user to see the effect of the rest of the command line without actually performing the command. This can be useful in checking for the value of default attributes.

-javahome path

Specifies an alternate Java 2 compatible runtime to use (default is to use the runtime on the system or the runtime bundled with MQ).



Previous      Contents      Index      Next     


Copyright 2003 Sun Microsystems, Inc. All rights reserved.