|Skip Navigation Links|
|Exit Print View|
|Oracle GlassFish Server Message Queue 4.5 Administration Guide|
Message Queue brokers support connections from both application clients and administrative clients. See Configuring Connection Services for a description of the available connection services. The Command utility provides subcommands that you can use for managing both connection services as a whole and individual services; to apply a subcommand to a particular service, use the -n option to specify one of the names listed in the “Service Name” column of Table 6-1. Subcommands are available for the following connection service management tasks:
The broker stops accepting new client connections on the paused service. If a Message Queue client attempts to open a new connection, it will get an exception.
All existing connections on the paused service are kept alive, but the broker suspends all message processing on such connections until the service is resumed. (For example, if a client attempts to send a message, the send method will block until the service is resumed.)
The message delivery state of any messages already received by the broker is maintained. (For example, transactions are not disrupted and message delivery will resume when the service is resumed.)
The admin connection service can never be paused; to pause and resume any other service, use the subcommands imqcmd pause svc and imqcmd resume svc. The syntax of the imqcmd pause svc subcommand is as follows:imqcmd pause svc -n serviceName [-b hostName:portNumber]
For example, the following command pauses the httpjms service running on the default broker (host localhost at port 7676):imqcmd pause svc -n httpjms -u admin
Table 6-2 Connection Service Properties Updated by Command Utility
The imqcmd update svc subcommand has the following syntax:imqcmd update svc -n serviceName [-b hostName:portNumber] -o property1=value1 [[-o property2=value2]…]
For example, the following command changes the minimum number of threads assigned to the jms connection service on the default broker (host localhost at port 7676) to 20:imqcmd update svc -o minThreads=20 -u admin
For example, the following command lists all services on the default broker (host localhost at port 7676):imqcmd list svc -u admin
Example 6-1 shows an example of the resulting output.
Example 6-1 Connection Services Listing
For example, the following command displays information about the jms connection service on the default broker (host localhost at port 7676):imqcmd query svc -n jms -u admin
Example 6-2 shows an example of the resulting output.
Example 6-2 Connection Service Information Listing
The -m option specifies the type of metric information to display:
ttl (default): Messages and packets flowing into and out of the broker by way of the specified connection service
rts: Rate of flow of messages and packets into and out of the broker per second by way of the specified connection service
cxn: Connections, virtual memory heap, and threads
The -int and -msp options specify, respectively, the interval (in seconds) at which to display the metrics and the number of samples to display in the output. The default values are 5 seconds and an unlimited number of samples.
For example, the following command displays cumulative totals for messages and packets handled by the default broker (host localhost at port 7676) by way of the jms connection service:imqcmd metrics svc -n jms -m ttl -u admin
Example 6-3 shows an example of the resulting output.
Example 6-3 Connection Service Metrics Listing
For a more detailed description of the use of the Command utility to report connection service metrics, see Connection Service Metrics.