Previous Contents Index Next |
Sun Java System Message Queue 3.5 SP1 Administration Guide

> ## Chapter 3
> Message Queue Administration Tasks and Tools

> Sun Java™ System Message Queue 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.

> ##

> Message Queue 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 Message Queue client applications. The Message Queue message server is needed principally for testing. In a development environment, the emphasis is on flexibility, and you typically adopt the following practices:

> - You want minimal administration—consisting mostly of starting up a broker for developers to use in testing.
> - You use default implementations of the data store (built-in file-based persistence), user repository (file-based user repository), access control properties file, and object store (file-system store). These default implementation are usually adequate for developmental testing.
> - If you are performing multi-broker testing, you probably would not use a Master Broker.
> - You generally use auto-created destinations rather than explicitly creating destinations
> - You might instantiate administered objects in client code rather than use centrally-managed administered objects.

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

> - Administrator security (protected use of administration tools):
> - Make sure admin connection service is activated (see Table 2-3)
> - Authorization: allow access to admin connection service for a specific individual or admin group (see "Connection Access Control")
> - If authorization is for a group, make sure the administrator belongs to the admin group.
> - File-based user repository: has a default admin group. Make sure administrator is in admin group, or if using the default admin user, change the admin password (see "Changing the Default Administrator Password").
> - LDAP user repository: make sure administrator is in admin group
> - General security (see Chapter 8, "Managing Security"):
> - Authentication: make entries into the file-based user repository or configure the broker to use an existing LDAP user repository

> (At a minimum, you want to password protect administration capability.)

> - Authorization: modify access settings in the access control properties file
> - Encryption: set up SSL-based connection services
> - Administered objects (see Chapter 7, "Managing Administered Objects"):
> - configure or set up an LDAP object store
> - create ConnectionFactory and destination administered objects
> - Broker clusters (see "Working With Clusters (Enterprise Edition)"):
> - create a central configuration file
> - use a Master Broker
> - Persistence: configure the broker to use plugged-in persistence, rather than built-in persistence (see Appendix B, "Setting Up Plugged-in Persistence")
> - Memory management: set destination attributes so that the number of messages and the amount of memory allocated for messages fit within available broker memory resources (see Table 6-10)

> #### Maintenance Operations

> ##### To Set Up a Production Environment

> In addition, in a production environment, Message Queue 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 Message Queue administration tools:

> - Application management:
> - disable the broker’s auto-create capability (see Table 2-10)
> - create physical destinations on behalf of applications (see "Creating Destinations")
> - set user access to destinations (see "Authorizing Users: the Access Control Properties File")
> - monitor and manage destinations (see "Managing Destinations")
> - monitor and manage durable subscriptions (see "Managing Durable Subscriptions")
> - monitor and manage transactions (see "Managing Transactions")
> - Broker administration and tuning:
> - use broker metrics to tune and reconfigure the broker (see Chapter 9, "Analyzing and Tuning a Message Service")
> - manage broker memory resources (see Chapter 9, "Analyzing and Tuning a Message Service")
> - add brokers to clusters to balance loads (see "Working With Clusters (Enterprise Edition)")
> - recover failed brokers (see "Starting a Broker")
> - Managing administered objects:
> - create additional ConnectionFactory and destination administered objects as needed (see "Adding and Deleting Administered Objects")
> - adjust ConnectionFactory attribute values to improve performance and throughput (see "Connection Factory Administered Object Attributes" and "Updating Administered Objects")

> ##

> Message Queue Administration Tools

> Message Queue 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 Message Queue 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:

> - Connect to a broker and manage it.
> - Create and manage physical destinations on the broker
> - Connect to an object store
> - Add administered objects to the object store and manage them.

> 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 Message Queue administration tasks. You use the Message Queue utilities to start up and manage a broker and to perform other, more specialized administrative tasks.

> Figure 3-1 Local and Remote Administration Utilities

> All Message Queue 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

> Message Queue 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 a Message Queue utility, for example, imqcmd, imqobjmgr, imqusermgr, and so on.

> There are four important things to remember:

> - Specify options after subcommands (and arguments, if the utility accepts both types of operands).
> - If an argument contains a space, enclose the whole argument in quotation marks. It is generally safest to enclose an attribute-value pair in quotes.
> - If you specify the -v (version) or the -h/-H (help) options on a command line, nothing else on that command line is executed. See Table 3-1 for a description of common options.
> - Separate the subcommand, arguments, options, and option arguments with spaces.

> 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 Message Queue 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 Message Queue 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 Message Queue).

> Previous Contents Index Next

> Copyright 2003 Sun Microsystems, Inc. All rights reserved.