imqcmd - manage Message Queue brokers
/usr/bin/imqcmd subcommand argument [option...]
/usr/bin/imqcmd [-h | -H]
/usr/bin/imqcmd -v
imqcmd manages the Message Queue broker, including resources such as connection services, physical destinations, durable subscriptions, and transactions. The utility provides a number of subcommands for managing these resources.
imqcmd supports many subcommands. Basic connection and authentication is required for the execution of every imqcmd subcommand. Use the -secure option to specify secure connections. Subcommands and their corresponding arguments and options follow the imqcmd command on the command line. See USAGE and OPTIONS.
The following options are supported:
-b hostName:port
The default value is localhost:7676. If you do not specify the -b option, imqcmd uses the default.
To specify port only, use: -b :7878. This is equivalent to -b localhost:7878
To specify name only, use: -b somehost. This is equivalent to -b somehost:7676.
-c clientID
-d topicName
Use this option with the list dur and destroy dur subcommands.
-f
Use this option with any subcommand.
-h
-H
-int interval
Use this option with the metrics subcommand.
-javahome
-m metricType
Use this option with the metrics bkr, metrics dst, and metrics svc subcommands. The value of metricType depends on whether the metrics are generated for a destination, a service, or a broker.
Use one of the following values to specify metricType:
ttl
rts
cxn
The following command displays connection, VM heap, and threads metric information for the default broker instance (localhost:7676) every five seconds:
imqcmd metrics bkr -m cxn -int 5
-msp numSamples
-n argumentName
-o attribute=value
-p password
This option is deprecated. Use the -passfile option instead.
-passfile
-pst pauseType
Use this option with the pause dst subcommand. Use one of the following values:
CONSUMERS
PRODUCERS
ALL
If the -pst option is not specified, pauses both consumers and producers (the equivalent of -pst ALL).
-rtm timeout
-rtr numRetries
The default value is 5.
-s
Use this option with any subcommand.
-secure
Use this option whenever you want a secure communication with the broker.
-svn serviceName
Use this option with the list cxn subcommand.
-t destinationType
-tmp
-u name
If you omit this value, you are prompted for it.
-v
The following subcommands and associated arguments and options are supported:
compact dst [-t type -n destName]
commit txn -n transaction_id
create dst -t destinationType -n destName [-o attribute=value] [-o attribute=value1]...
destroy dst -t destinationType -n destName
destroy dur -n subscrName -c client_id
list cxn [-svn serviceName] [-b hostName:port]
list dst [-tmp]
list dur -d destination
list svc
list txn
metrics bkr [-m metricType] [-int interval] [-msp numSamples]
Use the -m option to specify the type of metric to display. Use one of the following values to specify metricType:
ttl
rts
cxn
Use the -int option to specify the interval (in seconds) at which to display the metrics. The default is 5 seconds.
Use the -msp option to specify the number of samples displayed in the output. A value of -1 means an unlimited number. The default value is -1.
metrics dst -t type -n destName [-m metricType] [-int interval] [-msp numSamples]
Use the -m option to specify the type of metrics to display. Use one of the following values to specify metricType:
ttl
rts
con
dsk
Use the -int option to specify the interval (in seconds) at which to display the metrics. The default is 5 seconds.
Use the -msp option to specify the number of samples displayed in the output. A value of -1 means an unlimited number. The default value is 5.
metrics svc -n serviceName [-m metricType] [-int interval] [-msp numSamples]
ttl
rts
cxn
Use the -int option to specify the interval (in seconds) at which to display the metrics. The default is 5 seconds.
Use the -msp option to specify the number of samples displayed in the output. A value of -1 means an unlimited number. The default value is -1.
pause bkr
pause dst [-t type -n destName] [-pst pauseType]
pause svc -n serviceName
purge dst -t destinationType -n destName
purge dur -n subscrName -c client_id
query bkr
query dst -t destinationType -n destName
query svc -n serviceName
query txn -n transaction_id
reload cls
restart bkr
resume bkr
resume dst [-t type] [-n -destName]
resume svc -n serviceName
rollback txn -n transaction_id
shutdown bkr
update bkr -o attribute=value [-o attribute=value]...
update dst -t destinationType -n destName -o attribute=value [-o attribute=value1]...
update svc -n serviceName -o attribute=value [-o attribute=value1]...
You can specify attributes with the create and update subcommands. Applicable attributes depend on the subcommand arguments.
The following attributes are supported:
Queue (dst):
maxTotalMsgBytes
Default: 0 (unlimited)
maxBytesPerMsg
Default: 0 (unlimited)
maxNumMsgs
Default: 0 (unlimited)
consumerFlowLimit
Default: 1000
isLocalOnly
limitBehavior
FLOW_CONTROL
REMOVE_OLDEST
REJECT_NEWEST
Default: REJECT_NEWEST
localDeliveryPreferred
Default: false
maxNumActiveConsumers
Default: 1
maxNumBackupConsumers
Default: 0
maxNumProducers
Default: -1
useDMQ
Default: true
Topic (dst):
consumerFlowLimit
Default: 1000
isLocalOnly
Default: false
limitBehavior
FLOW_CONTROL
REMOVE_OLDEST
REJECT_NEWEST
Default: REJECT_NEWEST
maxBytesPerMsg
Default: 0 (unlimited)
maxNumMsgs
Default: -1
maxNumProducers
Default: 0 (unlimited)
maxTotalMsgBytes
Default: -1
useDMQ
Default: true
Broker (bkr):
imq.autocreate.destination.useDMQ
Default: true
imq.autocreate.queue
Default: true
imq.autocreate.queue.maxNumActiveConsumers
Default: 1
imq.autocreate.queue.maxNumBackupConsumers
Default: 0
imq.autocreate.topic
Default: true
imq.cluster.url
Default: none
imq.log.file.rolloverbytes
Default: 0 (no rollover based on size)
imq.log.file.rolloversecs
Default: 0 (no rollover based on age)
imq.log.level
Default: INFO
imq.message.max_size
Default: 70m
imq.portmapper.port
Default: 7676
imq.system.max_count
Default: 0 (no limit)
imq.system.max_size
Default: 0 (no limit)
Service (svc):
maxThreads
Default: Depends on service
minThreads
Default: Depends on service
port
Default: 0 (dynamically allocated)
Example 1 Shutting Down a Broker
The following command shuts down a broker for hostname myserver on port 7676:
mqcmd shutdown bkr -b myserver:7676
Example 2 Restarting a Broker
The following command restarts a broker for hostname myserver:
imqcmd restart bkr -b myserver
Example 3 Pausing a Service
The following command pauses a broker for hostname localhost on port 7676, with a serviceName of jms:
imqcmd pause svc -n jms -b :7676
Example 4 Resuming a Service
The following command resumes a service for hostname localhost on port 7676, with a serviceName of jms:
imqcmd resume svc -n jms -b myserver:7676
Example 5 Creating a Queue Destination
The following command creates a queue destination for hostname myserver on port 7676, with a destName of myFQ, a queueDeliveryPolicy of Failover, and a maxBytesPerMsg of 10000:
imqcmd create dst -n myFQ -t q -o "queueDeliveryPolicy=f" \ -o "maxBytesPerMsg=10000" -b myserver:7676
Example 6 Purging a Queue Destination
The following command purges a queue destination for hostname myserver on port 7676, with a destName of myFQ:
imqcmd purge dst -n myFQ -t q -b myserver:7676
Example 7 Listing Destinations on a Broker
The following command lists destinations for hostname myserver on port 7676:
imqcmd list dst -b myserver:7676
Example 8 Updating a Portmapper Port
The following command updates a portmapper port on hostname myserver from port 7676 to 7878:
imqcmd update bkr -o "imq.portmapper.port=7878"
Example 9 Updating the Maximum Number of Messages in the Queue
The following command updates the maximum number of messages in the queue to 2000 for myserver on port 8080 with a destName of TestQueue:
imqcmd update dst -b myserver:8080 -n TestQueue -t q -o "maxNumMsgs=2000"
Example 10 Updating the Maximum Threads
The following command updates the maximum threads jms connection service to 200 for hostname localhost on port 7676:
imqcmd update svc -n jms -o "minThreads=200"
Example 11 Listing Durable Subscriptions
The following command lists durable subscriptions for a topic with hostname localhost on port 7676 with a destName of myTopic:
imqcmd list dur -d myTopic
Example 12 Destroying Durable Subscriptions
The following command destroys subscriptions for hostname localhost on port 7676 with a dursubName of myDurSub and a client_ID of 111.222.333.444:
imqcmd destroy dur -n myDurSub -c "111.222.333.444"
Example 13 Listing All Transactions
The following command lists all transactions on a broker with hostname localhost on port 7676:
imqcmd list txn
Example 14 Displaying Information About a Transaction
The following command displays information about a transaction with hostname localhost on port 7676, and a transactionID of 1234567890
imqcmd query txn -n 1234567890
Example 15 Committing a Transaction
The following command commits a transaction with hostname localhost on port 7676, and a transactionID of 1234567890:
imqcmd commit txn -n 1234567890
The following environment variables affect the execution of this command:
IMQ_JAVAHOME
The following exit values are returned:
0
>0
See attributes(5) for descriptions of the following attributes:
|
imqadmin(1M), imqbrokerd(1M), imqdbmgr(1M), imqkeytool(1M), imqobjmgr(1M), imqusermgr(1M), attributes(5)
Sun Java System Message Queue Administrator's Guide
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |