|
|
| Sun ONE Message Queue Administrator's Guide |
Chapter 3 MQ Administration
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 administration is minimalconsisting mostly of starting up a broker for developers to use in testing. Default implementations of the data store, user repository, access control properties file, and object store are usually adequate for developmental testing. If you are performing multi-broker testing, you probably would not use a Master Broker. In addition, the applications being tested can generally use auto-created destinations and you may not want to 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
Typically you have to perform at least some, if not all, of the following setup operations:
security (see Chapter 8 "Security Management):
make entries into the file-based user repository or configure the broker to use an existing LDAP user repository
administered objects (see Chapter 7 "Managing Administered Objects):
modify access settings in the access control properties file
- (At a minimum, you want to password protect administration capability.)
set up SSL-based connection services
configure or set up an LDAP object store
broker clusters (see "Working With Broker Clusters"):create ConnectionFactory and destination administered objects
persistence: configure the broker to use plugged-in persistence, rather than built-in persistence (see Appendix A "Setting Up Plugged-in Persistence)
Maintenance Operations
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:
application management:
disable the broker's auto-create capability (see Table 2-9)
broker administration and tuning: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")
use broker metrics to tune and reconfigure the broker
managing administered objectsmanage broker memory resources
add brokers to clusters to balance loads
create additional ConnectionFactory and destination administered objects as needed
adjust ConnectionFactory attribute values to improve performance and throughput (see "Connection Factory Administered Objects")
MQ Administration Tools
MQ administration tools fall into two categories: command line utilities and a graphical user interface (GUI) Administration Console. 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 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
![]()
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. This utility is described 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.You use the imqcmd command to run this utility. This utility is described 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 client applications to be portable by insulating them from JMS provider-specific naming and configuration formats. You use the imqobjmgr command to run this utility. This utility is described 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. You use the imqusermgr command to run this utility. This utility is described in Chapter 8, "Security Management."
Key Tool (imqkeytool). You use the Key Tool utility to generate a self-signed certificate used for SSL authentication and to place it in MQ's keystore file. You use the imqkeytool command to run this utility, which is described in Chapter 8, "Security Management."
Database Manager (imqdbmgr). You use the Database Manager utility to create and manage a JDBC-compliant database used for persistent storage. You use the imqdbmgr command to run this utility. For more information, see Appendix A, "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. For more information, see Appendix C, "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 specifies the name of an MQ utility, for example, imqcmd, imqobjmgr, imqusermgr, and so on.
Subcommand_Clause, which is optional for some commands, has the following syntax
There are four important things to remember:
Specify options after subcommands (and targets) if the utility accepts both types of arguments.
The following is an example of a command line that has no subcommand clause. The command starts the default broker.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 subcommand arguments (target, option name, operands) with spaces.
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.
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.
Previous Contents Index Next
Copyright © 2002 Sun Microsystems, Inc. All rights reserved.
Last Updated June 19, 2002