Edition 2
1801 Varsity Drive
Raleigh, NC 27606-2072 USA
Phone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701
Mono-spaced Bold
To see the contents of the filemy_next_bestselling_novel
in your current working directory, enter thecat my_next_bestselling_novel
command at the shell prompt and press Enter to execute the command.
Press Enter to execute the command.Press Ctrl+Alt+F2 to switch to the first virtual terminal. Press Ctrl+Alt+F1 to return to your X-Windows session.
mono-spaced bold
. For example:
File-related classes includefilesystem
for file systems,file
for files, anddir
for directories. Each class has its own associated set of permissions.
Choose Mouse Preferences. In the Buttons tab, click the Left-handed mouse check box and click to switch the primary mouse button from the left to the right (making the mouse suitable for use in the left hand).→ → from the main menu bar to launchTo insert a special character into a gedit file, choose → → from the main menu bar. Next, choose → from the Character Map menu bar, type the name of the character in the Search field and click . The character you sought will be highlighted in the Character Table. Double-click this highlighted character to place it in the Text to copy field and then click the button. Now switch back to your document and choose → from the gedit menu bar.
Mono-spaced Bold Italic
or Proportional Bold Italic
To connect to a remote machine using ssh, typessh
at a shell prompt. If the remote machine isusername
@domain.name
example.com
and your username on that machine is john, typessh john@example.com
.Themount -o remount
command remounts the named file system. For example, to remount thefile-system
/home
file system, the command ismount -o remount /home
.To see the version of a currently installed package, use therpm -q
command. It will return a result as follows:package
.
package-version-release
Publican is a DocBook publishing system.
mono-spaced roman
and presented thus:
books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs
mono-spaced roman
but add syntax highlighting as follows:
package org.jboss.book.jca.ex1; import javax.naming.InitialContext; public class ExClient { public static void main(String args[]) throws Exception { InitialContext iniCtx = new InitialContext(); Object ref = iniCtx.lookup("EchoBean"); EchoHome home = (EchoHome) ref; Echo echo = home.create(); System.out.println("Created Echo"); System.out.println("Echo.echo('Hello') = " + echo.echo("Hello")); } }
amq.fanout
. Additional fanout exchanges can be declared as needed.
amq.direct
. Additional direct exchanges can be declared as needed.
usa.news
, usa.weather
, europe.news
, and europe.weather
.
#.news
(all news items), usa.#
(all items in the USA), or usa.weather
(all USA weather items).
.
(period) character:
usa.news
usa.weather
europe.news
europe.weather
#
(pound) character as a wildcard:
usa.#
#.news
#.weather
europe.#
usa.weather
will be delivered to two queues - usa.#
and #.weather
. Similarly, the message with the routing key of europe.news
will be delivered to the queues with the binding keys europe.#
and #.news
amq.topic
. Additional topic exchanges can be declared as needed.
amq.match
. Additional header exchanges can be declared as needed.
<weather> <station>Raleigh-Durham International Airport (KRDU)</station> <wind_speed_mph>16</wind_speed_mph> <temperature_f>70</temperature_f> <dewpoint>35</dewpoint> </weather>
let $w := ./weather return $w/station = 'Raleigh-Durham International Airport (KRDU)' and $w/temperature_f > 50 and $w/temperature_f - $w/dewpoint > 5 and $w/wind_speed_mph > 7 and $w/wind_speed_mph < 20
control
contains the value 'end', or if the XML content specifies an odd numbered message ID:
declare variable $control external; ./message/id mod 2 = 1 or $control = 'end'
type
(string)
alternate_exchange (string)
accept mode
was set to “none”, discard-unroutable
was set to “false”, and no queue binding is satisfied by the message.
passive
(Boolean)
durable
(Boolean)
durable
not set to “true”.
arguments
(FieldTable)
qpid.msg_sequence
(Boolean)
qpid.ive
(Boolean)
qpid-config
” shows how to create or delete exchanges using qpid-config
.
qpid.exclusive-binding
to the arguments field of the exchange-bind call
exclusive
property set, that queue is not available for use in any other session until the session that declared the queue has been closed.
declare
, bind
, delete
or subscribe
request for a queue that has been declared as exclusive, an exception will be raised and the requesting session will be ended.
ifEmpty
flag is passed the broker will raise an exception if the queue is not empty
ifUnused
flag is passed the broker will raise an exception if the queue has subscribers
qpid-tool
or the MRG Management Console. These tools will show the queue with a timestamp of when it was deleted.
auto-delete
field. Auto-delete is handled differently for exclusive and non-exclusive queues:
alternate-exchange
. An alternate exchange is specified when the queue is declared. Any rejected or orphaned messages will automatically be routed to the alternate exchange, to be re-routed to other bound queues or deleted if necessary. If no alternate exchange is specified, all rejected and orphaned messages will be automatically deleted.
qpid.max_count
and qpid.max_size
when declaring the queue. By default, an exception will be raised when published messages exceed this limit.
qpid.policy_type
option. The possible values for this option are:
reject
flow_to_disk
ring
ring_strict
ring
policy, but will not remove messages that have not yet been accepted by a client. If the limit is exceeded and the oldest message has not been accepted, the publisher will receive an exception.
--default-event-threshold-ratio
and setting it to zero disables alerts of thresholds from capacity. If alerts for both message count and size are configured then a single alert will trigger for the condition that occurs first.
qpid.alert_count
and/or qpid.alert_size
in the queue arguments when creating the queue.
conn = Connection.establish("localhost:5672") session = conn.session() rcv = session.receiver("qmf.default.topic/agent.ind.event.org_apache_qpid_broker.queueThresholdExceeded.#") while True: event = rcv.fetch() print "Threshold exceeded on queue %s" % event.content[0]["_values"]["qName"] print " at a depth of %s messages, %s bytes" % (event.content[0]["_values"]["msgDepth"], event.content[0]["_values"]["byteDepth"]) session.acknowledge()
qpid.alert_repeat_gap
argument to specify the minimum interval between events in seconds. The default value is 60 seconds.
x-qpid-maximum-message-count
is equivalent to qpid.alert_count
x-qpid-maximum-message-size
is equivalent to qpid.alert_size
x-qpid-minimum-alert-repeat-gap
is equivalent to qpid.alert_repeat_gap
no-local
key can be specified in the arguments to the declare used to create the queue. The value of this key is irrelevant, its presence alone will cause the correct behavior. This key will cause the queue to discard any messages that were published by the same connection as that of the session that owns the queue.
qpid.LVQ_key
to determine whether a newly published message is an update to an existing message on the queue. If this is the case, the new message will appear to overwrite the older message. A subscriber that requests messages after this has occurred will see only the newer message.
LVQ
LVQ NO BROWSE
LVQ
uses a header as a key. If the key matches it replaces the message in the queue, unless:
LVQ NO BROWSE
also uses a header for a key. If the key matches it replaces the message in the queue unless the message with the matching key has been acquired. In this case browsed messaged are not invalidated, so updates to messages already browsed on a key will be missed. If a new subscription is created the latest values will be seen.
qpid.last_value_queue
or qpid.last_value_queue_no_browse
key to the arguments of queue declare. The value of the key is user-selected and used only for key matching. Messages published to the queue then need to specify a value for the qpid.LVQ_key
in the headers of messages they publish.
qpid.priorities
. This value is given in the arguments to the declare that creates the queue. The value determines the number of distinct priority levels recognized by the queue (up to a maximum of 10). The default is 1 level (no prioritized delivery). For example the declaration for a queue with the address my-queue
and priority level 10 would be:
my-queue; {create: always, node:{x-declare:{arguments:{qpid.priorities:10}}}}
PersistLastNode
is used if a cluster fails down to a single node. In this situation, a queue would treat all transient messages as persistent until additional nodes in the cluster are restored.
qpid-config
tool.
qpid-config
tool is in Section 12.1, “Using qpid-config
”.
queues
command:
$ qpid-config queues Store Size Durable AutoDel Excl Bindings (files x file pages) Queue Name ======================================================================================= N N N 1 pub_start N N N 1 pub_done N N N 1 sub_ready N N N 1 sub_done N N N 1 perftest0 N Y N 2 mgmt-3206ff16-fb29-4a30-82ea N Y N 2 repl-3206ff16-fb29-4a30-82ea N Y N 2 mgmt-df06c7a6-4ce7-426a-9f66 N Y N 2 repl-df06c7a6-4ce7-426a-9f66
$ qpid-config[options]
add queuequeue_name
[add queue options]
--durable
--cluster-durable
--file-count NUMBER
--file-size NUMBER
--max-queue-size NUMBER
--max-queue-count NUMBER
--policy-type TYPE
TYPE
can be:
reject
flow_to_disk
ring
ring_strict
--last-value-queue
del queue
command with the name of the queue to remove:
$ qpid-config del queue queue_name
flow_stop_threshold
- the queue resource utilization level that enables flow control if the queue exceeds. Once crossed, the queue is considered in danger of overflow.
flow_resume_threshold
- the queue resource utilization level that disables flow control if the queue drops below. Once crossed, the queue is no longer considered in danger of overflow.
flow_stop_threshold
must be greater than or equal to the value of the queue's flow_resume_threshold
.
ring
or ring-strict
do NOT have queue flow thresholds enabled.
flowState
boolean in the queue's QMF management object. The queue's management object also contains a counter that increments each time flow control becomes active for the queue.
--default-flow-stop-threshold=flow control activated capacity level
--default-flow-resume-threshold=flow control activated capacity level
qpidd --default-flow-stop-threshold=90 --default-flow-resume-threshold=75
default-queue-limit
of 10000 bytes, then the default flow stop threshold would be 90% of 10000 = 9000 bytes and the flow resume threshold would be 75% of 10000 = 7500. The same computation is performed should a queue be created with a maximum size expressed as a message count instead of a byte count.
default-flow-stop-threshold
is 80% and default-flow-resume-threshold
is 70%. Disable the default queue flow control broker-wide by assigning the value zero to configuration variables. Note that flow control may still be applied manually on a per-queue basis in this case.
queue.declare
method, via the arguments
parameter map. The following keys can be used in the arguments
map for setting flow thresholds:
queue.declare
Flow Control Arguments
queue.declare Flow Control Arguments
| |
---|---|
qpid.flow_stop_size
|
integer - flow stop threshold value in bytes.
|
qpid.flow_resume_size
|
integer - flow resume threshold value in bytes.
|
qpid.flow_stop_count
|
integer - flow stop threshold value as a message count.
|
qpid.flow_resume_count
|
integer - flow resume threshold value as a message count.
|
flow-stop-size
and flow-stop-count
to zero for the queue.
qpid-config
command line tool:
--flow-stop-size=N
--flow-resume-size=N
--flow-stop-count=N
--flow-resume-count=N
N
in the size type thresholds is the flow stop threshold in bytes, for the count type thresholds it is the total number of messages.
flow-stop-count
with the value 900, and flow_resume_count
with the value 500. With these thresholds the following queue activity occurs:
pre-acquired
mode. In this mode, delivered messages are implicitly acquired by the subscriber that receives them. Alternatively, a subscriber can use the not-acquired
mode. This allows the subscriber to request that it is sent messages that are on the queue without acquiring them. Messages can then be acquired explicitly.
explicit
mode, ownership of a message is transferred to the acquiring subscriber only when the message has been explicitly accepted. Alternatively, if the accept mode is set to none
, messages are considered accepted as soon as they are acquired. This mode is less reliable, but is often suitable where message loss on session failure poses no risk to the system.
credit
mode, credit must be explicitly re-issued by the subscriber before the broker can recommence sending messages
window
mode, the credit is automatically reissued for received messages. In this mode, the client indicates that a message has been received by informing the broker of the completion of the transfer. Though completion is essentially a form of acknowledgment, it should not be confused with acceptance which is an confirmation of ownership transfer.
qpidd
. In a local transaction the only atomic operations are those that occur on the broker to which the transactional session is connected. Distributed transactions use two-phase commit to achieve atomicity across multiple services.
durable
. Note that durable queues do not persist all messages. The message itself must also be marked persistent, or even a durable queue will handle it normally. A queue must be declared durable at the time it is created.
session.queueDeclare(arg::queue=name, arg::durable=true);
autoDelete
, it is deleted when the last client unsubscribes to the queue or terminates. This is true even if the queue is durable.
PERSISTENT
. For instance, in C++, the following code makes a message persistent:
message.getDeliveryProperties().setDeliveryMode(PERSISTENT);
A persistent message AND durable queue | Written to disk |
A persistent message AND non-durable queue | Not written to disk |
A non-persistent message AND non-durable queue | Not written to disk |
A non-persistent message AND durable queue | Not written to disk |
msgstore.so
module. To verify that persistence is active, make sure that the log shows that the journal is created and the store module initialized when the broker is started:
2009-nov-04 20:39:58 notice Journal "TplStore": Created 2009-nov-04 20:39:58 notice Store module initialized; dir=/home/aperson/.qpidd
--store-dir
command specifies the directory used for for the persistence store and any configuration information. The default directory is /var/lib/qpidd
when qpidd
is run as a service, or ~/.qpidd
when qpidd
is run from the command line. See Table 6.2, “Persistence Options” for options that change this behavior. If --store-dir
is not specified, a subdirectory named rhm
is created within the directory identified by --data-dir
; if --store-dir
is not specified, and --no-data-dir
is specified, an error is raised.
Exception: Data directory is locked by another process.
RHM_IORES_ENQCAPTHRESH
). Dequeues are still allowed, and each dequeue frees up space in the store, so enqueues can continue once sufficient space has been freed.
qpid-config
, you can set the size of the journal using the --file-count
and --file-size
options. More information on these commands can be found in Configuring queue options.
qpid.file_size
and qpid.file_count
in Session.createQueue()
:
FieldTable journal_settings; journal_settings.setInt("qpid.file_size", 20); journal_settings.setInt("qpid.file_count", 12); session.queueDeclare(arg::queue="my_queue", arg::durable=true, arg::arguments=journal_settings);
qpid.file_size
and qpid.file_count
in session.queue_declare()
:
session.queue_declare(queue="my_queue", durable=True, arguments={"qpid.file_size":20, "qpid.file_count":12})
Persistence Options | |
---|---|
--store-dir
|
The directory for journals and persistent configuration. The default is /var/lib/qpidd when run as a daemon, or ~/.qpidd when run from the command line.
|
--num-jfiles
|
The number of files for each instance of the persistence journal. The default is 8. Minimum is 4, maximum is 64. The total size of each journal is num-jfiles * jfile-size-pgs .
|
--jfile-size-pgs
|
The size of each journal file, in multiples of 64KB. The default is 24. Minimum is 1, maximum is 32768. The total size of each journal is num-jfiles * jfile-size-pgs . The default size for a journal is 1.5 megabytes. The minimum size is 64 kilobytes, the maximum size is 2 gigabytes
|
--wcache-page-size
| The size (in KB) of the pages in the write page cache. Allowable values must be powers of 2 (1, 2, 4, ... 128). Lower values will decrease latency but also decrease throughput. The default is 32. |
--tpl-num-jfiles
| The number of files for each instance of the TPL journal. The default is 8. Minimum is 4, maximum is 64. |
--tpl-jfile-size-pgs
| The size of each TPL journal file in multiples of 64KB. The default is 24. Minimum is 1, maximum is 32768. |
--tpl-wcache-page-size
| The size (in KB) of the pages in the TPL write page cache. Allowable values must be powers of 2 (1, 2, 4, ... 128). Lower values will decrease latency but also decrease throughput. The default is 32. |
--truncate yes|no
|
If yes , truncates the store, discarding any existing records. If no , preserves any existing stores for recovery. The default is no .
|
--no-data-dir
|
Disables storage of configuration information and other data. If the default directory at /var/lib/qpidd exists, it will be ignored.
|
--num-jfiles 1
(which is out-of-range, the minimum allowed is 4), the store will automatically substitute a value of 4 and place the following warning into the log file: "warning parameter num-jfiles (1) is below allowable minimum (4); changing this parameter to minimum value."
wcache-page-size
parameter, the closest power of 2 will be substituted with a warning in the log file.
RHM_IORES_ENQCAPTHRESH
) when the journal is roughly 80% full. Message consumers can still read messages, making room for new messages.
qpid-tool
can be used to monitor queue depth over time, providing an initial value that can be used to estimate maximum queue depth.
qpid-tool
to observe minimum, maximum, and average message size and queue depth over time.
/usr/libexec/qpid/
and to use it the Python path must include this directory.
resize
and store_chk
. The resize
command resizes a store to make it bigger or smaller then transfers all outstanding records from the old store to the new store. If the records will not fit into the file, there will be an error message. The old store remains saved in a subdirectory. The store_chk
command analyzes a store, and shows the outstanding records and transactions.
--cluster-cman
option for details on running using RHCS with High Availability Messaging Clusters. See the CMAN documentation for more detail on CMAN and split-brain conditions. Use the --cluster-cman
option to enable RHCS when starting the broker.
cluster.so
module, which is loaded by default when you start a broker. To run brokers in a cluster, make sure they all use the same OpenAIS mcastaddr, mcastport, and bindnetaddr. All brokers in a cluster must also have the same cluster name — specify the cluster name in qpidd.conf
:
cluster-name="local_test_cluster"
/etc/corosync/uidgid.d/qpidd
to tell Corosync the name of the user running the broker.By default, the user is qpidd:
uidgid { uid: qpidd gid: qpidd }
qpidd
user, which is already in the ais group. If you are running the broker from the command line, you must ensure that the primary group for the user running qpidd is ais. You can set the primary group using newgrp
:
$ newgrp ais
[jonathan@localhost]$ qpidd --cluster-name="local_test_cluster"
2009-07-09 18:13:41 info 127.0.0.1:1410(READY) member update: 127.0.0.1:1410(member) 2009-07-09 18:13:41 notice 127.0.0.1:1410(READY) first in cluster
Options for High Availability Messaging Clusters | |
---|---|
--cluster-name
| Name of the Messaging Cluster to join. A Messaging Cluster consists of all brokers started with the same cluster-name and openais configuration. |
--cluster-size
| Wait for at least N initial members before completing cluster initialization and serving clients. Use this option in a persistent cluster so all brokers in a persistent cluster can exchange the status of their persistent store and do consistency checks before serving clients. |
--cluster-url
|
An AMQP URL containing the local address that the broker advertises to clients for fail-over connections. This is different for each host. By default, all local addresses for the broker are advertised. You only need to set this if
url = ["amqp:"][ user ["/" password] "@" ] protocol_addr *("," protocol_addr) protocol_addr = tcp_addr / rmda_addr / ssl_addr / ... tcp_addr = ["tcp:"] host [":" port] rdma_addr = "rdma:" host [":" port] ssl_addr = "ssl:" host [":" port] In most cases, only one address is advertised, but more than one address can be specified in if the machine running the broker has more than one network interface card, and you want to allow clients to connect using multiple network interfaces. Use a comma delimiter (",") to separate brokers in the URL. Examples:
|
--cluster-cman
|
CMAN protects against the "split-brain" condition, in which a network failure splits the cluster into two sub-clusters that cannot communicate with each other. When "split-brain" occurs, each of the sub-clusters can access shared resources without knowledge of the other sub-cluster, resulting in corrupted cluster integrity.
To avoid "split-brain", CMAN uses the notion of a "quorum". If more than half the cluster nodes are active, the cluster has quorum and can act. If half (or fewer) nodes are active, the cluster does not have quorum, and all cluster activity is stopped. There are other ways to define the quorum for particular use cases (e.g. a cluster of only 2 members), see the CMAN documentation for more detail.
When enabled, the MRG broker will wait until it belongs to a quorate cluster before accepting client connections. It continually monitors the quorum status and shuts down immediately if the node it runs on loses touch with the quorum.
|
--cluster-username | SASL username for connections between brokers. |
--cluster-password | SASL password for connections between brokers. |
--cluster-mechanism | SASL authentication mechanism for connections between brokers |
2009-aug-04 10:17:37 info SASL: Authentication failed: SASL(-13): user not found: Password verification failed
cluster-username
and cluster-password
properties when you start the broker. In most environment, it is easiest to create an account with the same user name and password on each broker in the cluster, and use these as the cluster-username
and cluster-password
. You can also set the SASL mode using cluster-mechanism
. Remember that any mechanism you enable for broker-to-broker communication can also be used by a client, so do not enable cluster-mechanism=ANONYMOUS
in a secure environment.
qpid-cluster
to make sure that the brokers are running as one cluster. See the following section for details.
drain
and spout
programs can be used for this test.
qpid-cluster
is a command-line utility that allows you to view information on a cluster and its brokers, disconnect a client connection, shut down a broker in a cluster, or shut down the entire cluster. You can see the options using the --help
option:
$ ./qpid-cluster --help
Usage: qpid-cluster [OPTIONS] [broker-addr] broker-addr is in the form: [username/password@] hostname | ip-address [:<port>] ex: localhost, 10.1.1.7:10000, broker-host:10000, guest/guest@localhost Options: -C [--all-connections] View client connections to all cluster members -c [--connections] ID View client connections to specified member -d [--del-connection] HOST:PORT Disconnect a client connection -s [--stop] ID Stop one member of the cluster by its ID -k [--all-stop] Shut down the whole cluster -f [--force] Suppress the 'are-you-sure?' prompt -n [--numeric] Don't resolve names
qpid-cluster
, you can use the host and port for any broker in the cluster. For instance, if a broker in the cluster is running on localhost
on port 6664, you can start qpid-cluster
like this:
$ qpid-cluster localhost:6664
Cluster Name: local_test_cluster Cluster Status: ACTIVE Cluster Size: 3 Members: ID=127.0.0.1:13143 URL=amqp:tcp:192.168.1.101:6664,tcp:192.168.122.1:6664,tcp:10.16.10.62:6664 : ID=127.0.0.1:13167 URL=amqp:tcp:192.168.1.101:6665,tcp:192.168.122.1:6665,tcp:10.16.10.62:6665 : ID=127.0.0.1:13192 URL=amqp:tcp:192.168.1.101:6666,tcp:192.168.122.1:6666,tcp:10.16.10.62:6666
127.0.0.1:13143
. The URL in the output is the broker's advertised address. Let's use the ID to shut the broker down using the --stop
command:
$ ./qpid-cluster localhost:6664 --stop 127.0.0.1:13143
failover
property:
connectionfactory.qpidConnectionfactory = amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'&failover='failover_exchange'
brokerlist
then fail over to the new broker now specified at head of list, until brokerlist
is empty.
idle_timeout
property, which is an integer corresponding to the heartbeat period in seconds. For instance, the following line from a JNDI properties file sets the heartbeat time out to 3 seconds:
connectionfactory.qpidConnectionfactory = amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672',idle_timeout=3
--watchdog-interval
option is set. The watchdog plug-in kills the qpidd broker process if it becomes stuck for longer than the watchdog interval. In some cases, e.g. certain phases of error resolution, it is possible for a stuck process to hang other cluster members that are waiting for it to send a message. Using the watchdog, the stuck process is terminated and removed from the cluster, allowing other members to continue and clients of the stuck process to fail over to other members.
qpid-cluster --all-stop
.
qpid-cluster -k
then all the stores are marked clean.
--truncate yes
option can be used to force a broker to discard all existing stores even if they are clean. (A dirty store is discarded regardless.)
qpid-cluster -k
. This causes all brokers to synchronize their state and mark their stores as "clean" so they can be used when the cluster restarts.
Cannot recover, no clean store.
If this happens you can start the cluster by marking one of the stores "clean" as follows:
cd <data-dir> mv rhm rhm.bak cp -a _cluster.bak.<nnnn>/rhm .
qpid-cluster-store -c <data-dir>
qpid-cluster-store
is intended to be used only in disaster recovery situations when a cluster fails completely with no clean store. It should not be used on a running cluster member.
qpid-route
is a command line utility used to configure federated networks of brokers and to view the status and topology of networks. It can be used to configure routes among any brokers that qpid-route
can connect to.
qpid-route
is as follows:
qpid-route [OPTIONS] dynamic add <dest-broker> <src-broker> <exchange> qpid-route [OPTIONS] dynamic del <dest-broker> <src-broker> <exchange> qpid-route [OPTIONS] route add <dest-broker> <src-broker> <exchange> <routing-key> qpid-route [OPTIONS] route del <dest-broker> <src-broker> <exchange> <routing-key> qpid-route [OPTIONS] queue add <dest-broker> <src-broker> <dest-exchange> <src-queue> qpid-route [OPTIONS] queue del <dest-broker> <src-broker> <dest-exchange> <src-queue> qpid-route [OPTIONS] list [<broker>] qpid-route [OPTIONS] flush [<broker>] qpid-route [OPTIONS] map [<broker>] qpid-route [OPTIONS] link add <dest-broker> <src-broker> qpid-route [OPTIONS] link del <dest-broker> <src-broker> qpid-route [OPTIONS] link list [<dest-broker>]
broker
, dest-broker
, and src-broker
is as follows:
[username/password@] hostname | ip-address [:<port>]
localhost
, 10.1.1.7:10000
, broker-host:10000
, guest/guest@localhost
.
qpid-route
:
qpid-route
options
-v
| Verbose output. |
-q
| Quiet output, will not print duplicate warnings. |
-d
| Make the route durable. |
--timeout N
| Maximum time to wait when qpid-route connects to a broker, in seconds. Default is 10 seconds. |
--ack N
| Acknowledge transfers of routed messages in batches of N. Default is 0 (no acknowledgments). Setting to 1 or greater enables acknowledgments; when using acknowledgments, values of N greater than 1 can significantly improve performance, especially if there is significant network latency between the two brokers. |
-s [ --src-local ]
| Configure the route in the source broker (create a push route). |
-t <transport> [ --transport <transport>]
|
Transport protocol to be used for the route.
|
qpid-route [OPTIONS] queue add <dest-broker> <src-broker> <dest-exchange> <src-queue> qpid-route [OPTIONS] queue del <dest-broker> <src-broker> <dest-exchange> <src-queue>
public
on the source broker localhost:10002
to the amq.fanout
exchange on the destination broker localhost:10001
:
$ qpid-route queue add localhost:10001 localhost:10002 amq.fanout public
-d
option is specified, this queue route is persistent, and will be restored if one or both of the brokers is restarted:
$ qpid-route -d queue add localhost:10001 localhost:10002 amq.fanout public
del
command takes the same arguments as the add
command. The following command deletes the queue route described above:
$ qpid-route queue del localhost:10001 localhost:10002 amq.fanout public
qpid-route [OPTIONS] route add <dest-broker> <src-broker> <exchange> <routing-key> qpid-route [OPTIONS] route del <dest-broker> <src-broker> <exchange> <routing-key> qpid-route [OPTIONS] flush [<broker>]
global.#
from the amq.topic
exchange on the source broker localhost:10002
to the amq.topic
exchange on the destination broker localhost:10001
:
$ qpid-route route add localhost:10001 localhost:10002 amq.topic global.#
$ qpid-route route add localhost:10002 localhost:10001 amq.topic global.#
-d
option is specified, the exchange route is persistent, and will be restored if one or both of the brokers is restarted:
$ qpid-route -d route add localhost:10001 localhost:10002 amq.fanout public
del
command takes the same arguments as the add
command. The following command deletes the first exchange route described above:
$ qpid-route route del localhost:10001 localhost:10002 amq.topic global.#
flush
command to delete all routes for a given broker:
qpid-route [OPTIONS] flush [<broker>]
localhost:10001
:
$ qpid-route flush localhost:10001
qpid-route [OPTIONS] dynamic add <dest-broker> <src-broker> <exchange> qpid-route [OPTIONS] dynamic del <dest-broker> <src-broker> <exchange>
amq.topic
exchange. The following commands create a new topic exchange on each of two brokers:
$ qpid-config -a localhost:10003 add exchange topic fed.topic $ qpid-config -a localhost:10004 add exchange topic fed.topic
fed.topic
exchange on the source broker localhost:10004
to the fed.topic
exchange on the destination broker localhost:10003
if they match any binding on the destination broker's fed.topic
exchange:
$ qpid-route dynamic add localhost:10003 localhost:10004 fed.topic
fed.topic
exchange on the source broker, using each binding associated with the fed.topic
exchange on the destination broker.
$ qpid-route dynamic add localhost:10004 localhost:10003 fed.topic
-d
option is specified, the exchange route is persistent, and will be restored if one or both of the brokers is restarted:
$ qpid-route -d dynamic add localhost:10004 localhost:10003 fed.topic
del
command takes the same arguments as the add
command. The following command deletes the first exchange route described above:
$ qpid-route dynamic del localhost:10004 localhost:10003 fed.topic
route list
command shows the routes associated with an individual broker. For instance, suppose we have created the following two routes:
$ qpid-route dynamic add localhost:10003 localhost:10004 fed.topic $ qpid-route dynamic add localhost:10004 localhost:10003 fed.topic
route list
to show all routes for the broker localhost:10003
:
$ qpid-route route list localhost:10003 localhost:10003 localhost:10004 fed.topic <dynamic>
localhost:10003
is a destination. If we want to see the route for which localhost:10004
is a destination, we need to do another route list:
$ qpid-route route list localhost:10004 localhost:10004 localhost:10003 fed.topic <dynamic>
route map
command shows all routes associated with a broker, and recursively displays all routes for brokers involved in federation relationships with the given broker. For instance, here is the output for the two brokers configured above:
$ qpid-route route map localhost:10003 Finding Linked Brokers: localhost:10003... Ok localhost:10004... Ok Dynamic Routes: Exchange fed.topic: localhost:10004 <=> localhost:10003 Static Routes: none found
route map
command is particularly helpful for larger, more complex networks. Let's configure a somewhat more complex network with 16 dynamic exchange routes:
qpid-route dynamic add localhost:10001 localhost:10002 fed.topic qpid-route dynamic add localhost:10002 localhost:10001 fed.topic qpid-route dynamic add localhost:10003 localhost:10002 fed.topic qpid-route dynamic add localhost:10002 localhost:10003 fed.topic qpid-route dynamic add localhost:10004 localhost:10002 fed.topic qpid-route dynamic add localhost:10002 localhost:10004 fed.topic qpid-route dynamic add localhost:10002 localhost:10005 fed.topic qpid-route dynamic add localhost:10005 localhost:10002 fed.topic qpid-route dynamic add localhost:10005 localhost:10006 fed.topic qpid-route dynamic add localhost:10006 localhost:10005 fed.topic qpid-route dynamic add localhost:10006 localhost:10007 fed.topic qpid-route dynamic add localhost:10007 localhost:10006 fed.topic qpid-route dynamic add localhost:10006 localhost:10008 fed.topic qpid-route dynamic add localhost:10008 localhost:10006 fed.topic
route map
starting with any one broker, and see the entire network:
$ ./qpid-route route map localhost:10001 Finding Linked Brokers: localhost:10001... Ok localhost:10002... Ok localhost:10003... Ok localhost:10004... Ok localhost:10005... Ok localhost:10006... Ok localhost:10007... Ok localhost:10008... Ok Dynamic Routes: Exchange fed.topic: localhost:10002 <=> localhost:10001 localhost:10003 <=> localhost:10002 localhost:10004 <=> localhost:10002 localhost:10005 <=> localhost:10002 localhost:10006 <=> localhost:10005 localhost:10007 <=> localhost:10006 localhost:10008 <=> localhost:10006 Static Routes: none found
list connections
can be used to show the resilient connections for a broker:
$ qpid-route list connections localhost:10001 Host Port Transport Durable State Last Error ============================================================================= localhost 10002 tcp N Operational localhost 10003 tcp N Operational localhost 10009 tcp N Waiting Connection refused
Last Error
contains the string representation of the last connection error received for the connection. State
represents the state of the connection, and may be one of the following values:
$ qpid-route list connections
Waiting | Waiting before attempting to reconnect. |
Connecting | Attempting to establish the connection. |
Operational | The connection has been established and can be used. |
Failed | The connection failed and will not retry (usually because authentication failed). |
Closed | The connection has been closed and will soon be deleted. |
Passive | If a cluster is federated to another cluster, only one of the nodes has an actual connection to remote node. Other nodes in the cluster have a passive connection. |
--replication-queue
option. This can be the name of an existing durable queue created for the purpose, or the --create-replication-queue
option can be used to indicate that a new transient queue should be created with the specified name. Add these options to qpidd.conf
by creating a replication event queue named my_repl_queue
when the broker starts.
replication-queue=my_repl_queue create-replication-queue=true
$ sudo service qpidd start
qpid-config
command, use the --generate-queue-events
option with the value 2
to replicate both enqueues and dequeues, or the value 1
to replicate only enqueues:
$ qpid-config --broker-addr src-host add queue my_repl_queue --generate-queue-events 2
qpid.queue_event_generation
, and the value 1
to replicate only enqueue events, or 2
to replicate both enqueue and dequeue events. For instance, in C++ this can be done with the following code:
QueueOptions options; options.setInt("qpid.queue_event_generation", 2); // both enqueue and dequeue session.queueDeclare(arg::queue="my-queue", arg::arguments=options);
qpidd.conf
to load the replication_exchange.so
plugin. You can do this with the following line:
load-module="replication_exchange.so"
$ sudo service qpidd start
$ qpid-config --broker-addr backup-host add exchange replication replication-exchange
$ qpid-config --broker-addr backup-host add queue my_repl_queue --generate-queue-events 2
$ qpid-route --ack 50 queue add backup-host src-host replication-exchange replication-queue
CRAM-MD5
, DIGEST-MD5
, or GSSAPI
. The ANONYMOUS
method is not secure. The PLAIN
method is secure only when used together with SSL. To use SASL from the python client, you need to install the python-saslwrapper rpm (and its dependency saslwrapper).
CRAM-MD5
, DIGEST-MD5
, or GSSAPI
(which provides Kerberos authentication). For information on configuring these and other options in SASL, see the Cyrus SASL documentation at /usr/share/doc/cyrus-sasl-lib-2.1.22/index.html
for Red Hat Enterprise Linux 5.6.
SASL PLAIN
method sends passwords in plain text, and is vulnerable to man-in-the-middle attacks unless SSL (Secure Socket Layer) is also used (see Section 10.3, “Encryption using SSL”).
PLAIN
authentication in the broker.
auth yes|no
option to determine whether to use SASL authentication. Turn on authentication by setting auth
to yes
in /etc/qpidd.conf
:
# /etc/qpidd.conf # # Set auth to 'yes' or 'no' auth=yes
/etc/sasl2/qpidd.conf
for Red Hat Enterprise Linux 5.6.
QPID
realm by default, but it can be set to a different realm using the realm
option:
# /etc/qpidd.conf # # Set the SASL realm using 'realm=' auth=yes realm=QPID
/var/lib/qpidd/qpidd.sasldb
; initially, it has one user named guest
in the QPID
realm, and the password for this user is guest
.
qpidd
user. When run as a daemon, MRG Messaging always runs as the qpidd
user. If you start the broker from a user other than the qpidd
user, you will need to either reconfigure SASL or turn authentication off.
qpidd
user is the only user that can read the database. If you modify permissions, be careful not to expose the SASL database.
saslpasswd2
command, which specifies a realm and a user ID. A user ID takes the form user-id
@domain
.
.
# saslpasswd2 -f /var/lib/qpidd/qpidd.sasldb -urealm
new_user_name
sasldblistusers2
:
# sasldblistusers2 -f /var/lib/qpidd/qpidd.sasldb
PLAIN
authentication, users who are in the database can now connect with their user name and password. This is secure only if you are using SSL. If you are using a more secure form of authentication, please consult your SASL documentation for information on configuring the options you need.
$ sudo yum install cyrus-sasl-gssapi krb5-workstation
primary/instance@REALM
. For a MRG Messaging broker, the primary is qpidd
, the instance is the fully qualified domain name, which you can obtain using hostname --fqdn
, and the REALM is the Kerberos domain realm. By default, this realm is QPID
, but a different realm can be specified in qpid.conf, e.g.:
realm=EXAMPLE.COM
dublduck.example.com
and the Kerberos domain realm is EXAMPLE.COM
, then the principal name is qpidd/dublduck.example.com@EXAMPLE.COM
.
GSSAPI
clients you must specify the fully qualified domain name for the broker they are connecting to which corresponds to the principal created for the qpidd service on that host.
FDQN=`hostname --fqdn` REALM="EXAMPLE.COM" kadmin -r $REALM -q "addprinc -randkey -clearpolicy qpidd/$FQDN"
QPIDD_GROUP="qpidd" kadmin -r $REALM -q "ktadd -k /etc/qpidd.keytab qpidd/$FQDN@$REALM" chmod g+r /etc/qpidd.keytab chgrp $QPIDD_GROUP /etc/qpidd.keytab
/etc/krb5.keytab
. If a different keytab file is used, the KRB5_KTNAME environment variable must contain the name of the file, e.g.:
export KRB5_KTNAME=/etc/qpidd.keytab
auth
and realm
options in /etc/qpidd.conf
:
# /etc/qpidd.conf auth=yes realm=EXAMPLE.COM
$ kinit user@REALM.COM
com.sun.security.jgss.initiate { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true; };
sasl_mechs
must be set to GSSAPI
.
sasl_protocol
must be set to the principal for the qpidd broker, e.g. qpidd
/
sasl_server
must be set to the host for the SASL server, e.g. sasl.com
.
amqp://guest@clientid/testpath?brokerlist='tcp://localhost:5672?sasl_mechs='GSSAPI'&sasl_protocol='qpidd'&sasl_server='<server-host-name>''
--acl-file
command to load the access control list. The filename should have a .acl
extension:
$ qpidd --acl-file ./aclfilename.acl
acl deny all all
, the ACL uses deny mode, and only those rights that are explicitly allowed are granted:
acl allow rajith@QPID all all acl deny all all
rajith@QPID
can perform any action, but nobody else can. Deny mode is the default, so the previous example is equivalent to the following ACL file:
acl allow rajith@QPID all all
acl allow rajith@QPID all all acl deny jonathan@QPID all all # This rule is redundant, and has no effect acl deny all all
acl allow all all
, ACL uses allow mode, and all rights are granted except those that are explicitly denied. The following ACL file allows everyone else to perform any action, but denies jonathan@QPID
all permissions.
acl deny jonathan@QPID all all acl allow all all
acl allow rajith@QPID all all # This rule is redundant, and has no effect acl deny jonathan@QPID all all acl allow all all
acl allow all all
acl deny all all
acl allow all all acl deny jonathan@QPID all all # This line is ignored !!!
acl allow carlt@QPID create exchange name=carl.* acl allow fred@QPID create all acl allow all consume queue acl allow all bind exchange acl deny all all
group admin ted@QPID martin@QPID acl allow admin create all acl deny all all
acl permission {<group-name>|<user-name>|"all"} {action|"all"} [object|"all"] [property=<property-value>]ACL rules can also include a single object name (or the keyword
all
) and one or more property name value pairs in the form property=value
permission
, action
, object
, and property
in an ACL rules file.
allow
|
Allow the action
|
allow-log
|
Allow the action and log the action in the event log
|
deny
|
Deny the action
|
deny-log
|
Deny the action and log the action in the event log
|
consume
|
Applied when subscriptions are created
|
publish
|
Applied on a per message basis on publish message transfers, this rule consumes the most resources
|
create
|
Applied when an object is created, such as bindings, queues, exchanges, links
|
access
|
Applied when an object is read or accessed
|
bind
|
Applied when objects are bound together
|
unbind
|
Applied when objects are unbound
|
delete
|
Applied when objects are deleted
|
purge
|
Similar to delete but the action is performed on more than one object
|
update
|
Applied when an object is updated
|
queue
|
A queue
|
exchange
|
An exchange
|
broker
|
The broker
|
link
|
A federation or inter-broker link
|
method
|
Management or agent or broker method
|
name
|
String. Object name, such as a queue name or exchange name.
|
durable
|
Boolean. Indicates the object is durable
|
routingkey
|
String. Specifies routing key
|
passive
|
Boolean. Indicates the presence of a
passive flag
|
autodelete
|
Boolean. Indicates whether or not the object gets deleted when the connection is closed
|
exclusive
|
Boolean. Indicates the presence of an
exclusive flag
|
type
|
String. Type of object, such as topic, fanout, or xml
|
alternate
|
String. Name of the alternate exchange
|
queuename
|
String. Name of the queue (used only when the object is something other than
queue
|
schemapackage
|
String. QMF schema package name
|
schemaclass
|
String. QMF schema class name
|
policytype
|
String. The limit policy for a queue. Only used in rules for queue creation.
|
maxqueuesize
|
Integer. The largest value of the maximum queue size (in bytes) with which a queue is allowed to be created. Only used in rules for queue creation.
|
maxqueuecount
|
Integer. The largest value of the maximum queue depth (in messages) that a queue is allowed to be created. Only used in rules for queue creation.
|
#
character is considered a comment and is ignored.
name1
is not the same as Name1
and create
is not the same as CREATE
\
character
group
or acl
and with no preceding whitespace.
all
matches all individuals, groups and actions
acl deny all all
. If present in the file, all lines below it are ignored.
a-z
, A-Z
, 0-9
, -
and _
group admin ted@QPID martin@QPID group user-consume martin@QPID ted@QPID group group2 kim@QPID user-consume rob@QPID group publisher group2 \ tom@QPID andrew@QPID debbie@QPID
acl allow carlt@QPID create exchange name=carl.* acl allow rob@QPID create queue acl allow guest@QPID bind exchange name=amq.topic routingkey=stocks.rht.# acl allow user-consume create queue name=tmp.* acl allow publisher publish all durable=false acl allow publisher create queue name=RequestQueue acl allow consumer consume queue durable=true acl allow fred@QPID create all acl allow bob@QPID all queue acl allow admin all acl allow all consume queue acl allow all bind exchange acl deny all all
acl deny all all
, denies all authorizations that have not been specifically granted. This is the default, but it is useful to include it explicitly on the last line for the sake of clarity. If you want to grant all rights by default, you can specify acl allow all all
in the last line.
guest
to access and log QMF management methods that could cause security breaches:
group allUsers guest@QPID .... acl deny-log allUsers create link acl deny-log allUsers access method name=connect acl deny-log allUsers access method name=echo acl allow all all
qpidd
is provided by Mozilla's Network Security Services Library (NSS).
ssl.so
module. This module is installed and loaded by default in MRG Messaging. To enable the module, you need to specify the location of the database containing the certificate and key to use. This is done using the ssl-cert-db
option.
certutil
tool. Information on this utility can be found on the Mozilla website, including tutorials on setting up and testing SSL connections. The certificate database will generally be password protected. The safest way to specify the password is to place it in a protected file, use the password file when creating the database, and specify the password file with the ssl-cert-password-file
option when starting the broker.
mkdir ${CERT_DIR} certutil -N -d ${CERT_DIR} -f ${CERT_PW_FILE} certutil -S -d ${CERT_DIR} -n ${NICKNAME} -s "CN=${NICKNAME}" -t "CT,," -x -f ${CERT_PW_FILE} -z /usr/bin/certutil
ssl-cert-password-file
to the value of ${CERT_PW_FILE}
, set ssl-cert-db
to the value of ${CERT_DIR}
, and set ssl-cert-name
to the value of ${NICKNAME}
.
--ssl-use-export-policy
--ssl-cert-password-file PATH
--ssl-cert-db PATH
--ssl-cert-name NAME
localhost.localdomain
.
--ssl-port NUMBER
--ssl-require-client-authentication
EXTERNAL
SASL mechanism for SSL connections. If the client chooses the EXTERNAL
mechanism, the client's identity is taken from the validated SSL certificate, using the CN
literal>, and appending any DC
literal>s to create the domain. For instance, if the certificate contains the properties CN=bob
, DC=acme
, DC=com
, the client's identity is bob@acme.com
.
--ssl-sasl-no-dict
EXTERNAL
, which is not vulnerable to dictionary attacks.
--require-encryption
broker option. This will cause qpidd
to only accept encrypted connections.
sslconnector.so
module. This module is installed and loaded by default in MRG Messaging.
SSL Client Options for C++ clients | |
---|---|
QPID_SSL_USE_EXPORT_POLICY
| Use NSS export policy |
QPID_SSL_CERT_PASSWORD_FILE
| File containing password to use for accessing certificate database |
QPID_SSL_CERT_DB
| Path to directory containing certificate database |
QPID_SSL_CERT_NAME
| Name of the certificate to use. When SSL client authentication is enabled, a certificate name should normally be provided. |
QPID_SSL_CERT_DB
to the full pathname of the directory. If a connection uses SSL client authentication, the client's password is also needed—the password should be placed in a protected file, and the QPID_SSL_CERT_PASSWORD_FILE
variable should be set to the location of the file containing this password.
protocol
connection option to ssl
.
-Djavax.net.ssl.keyStore=/home/bob/ssl_test/keystore.jks -Djavax.net.ssl.keyStorePassword=password -Djavax.net.ssl.trustStore=/home/bob/ssl_test/certstore.jks -Djavax.net.ssl.trustStorePassword=password
-Djavax.net.ssl.trustStore=/home/bob/ssl_test/certstore.jks -Djavax.net.ssl.trustStorePassword=password
amqp://username:password@clientid/test?brokerlist='tcp://localhost:5672?ssl='true''
-Djavax.net.debug=ssl
to the Java JVM when starting your client.
qpid-cpp-client-devel
package. This package contains:
qpid-perftest
for measuring throughput, and
qpid-latency-test
for measuring latency.
--help
option at the shell prompt:
$ qpid-perftest --help $ qpid-latency-test --help
qpid-config
qpid-tool
qpid-queue-stats
qpid-cluster
qpid-route
qpid-perftest
qpid-stat
qpid-printevents
qpid-cluster-store
qpid-tools
package (this has dependencies on the python-qpid
and python-qmf
packages).
qpid-config
qpid-config --help
command from the shell prompt:
$ qpid-config --help Usage: qpid-config [OPTIONS] qpid-config [OPTIONS] exchanges [filter-string] qpid-config [OPTIONS] queues [filter-string] qpid-config [OPTIONS] add exchange <type> <name> [AddExchangeOptions] qpid-config [OPTIONS] del exchange <name> ..[output truncated]...
qpid-config
without options:
$ qpid-config Total Exchanges: 6 topic: 2 headers: 1 fanout: 1 direct: 2 Total Queues: 7 durable: 0 non-durable: 7
queues
command:
$ qpid-config queues Queue Name Attributes ====================================================================== qmfagent-16a3e0ab-03c0-4a96-a416-7d0bc336d5fd auto-del excl qmfagent-d7da3494-c52d-414d-a214-b662158f5edf auto-del excl qmfc-v2-hb-rh5_64.6212.1 auto-del excl --limit-policy=ring qmfc-v2-rh5_64.6212.1 auto-del excl qmfc-v2-ui-rh5_64.6212.1 auto-del excl --limit-policy=ring reply-rh5_64.6212.1 auto-del excl topic-rh5_64.6212.1 auto-del excl --limit-policy=ring
add queue
command and the name of the queue to create:
$ qpid-config add queue queue_name
del queue
command with the name of the queue to remove:
$ qpid-config del queue queue_name
qpid-config
to manage queues, see Chapter 3, Queues.
exchanges
command. Add the -b
option to also see binding information:
$ qpid-config -b exchanges Exchange '' (direct) bind pub_start => pub_start bind pub_done => pub_done bind sub_ready => sub_ready bind sub_done => sub_done bind perftest0 => perftest0 bind mgmt-3206ff16-fb29-4a30-82ea-e76f50dd7d15 => mgmt-3206ff16-fb29-4a30-82ea-e76f50dd7d15 bind repl-3206ff16-fb29-4a30-82ea-e76f50dd7d15 => repl-3206ff16-fb29-4a30-82ea-e76f50dd7d15 Exchange 'amq.direct' (direct) bind repl-3206ff16-fb29-4a30-82ea-e76f50dd7d15 => repl-3206ff16-fb29-4a30-82ea-e76f50dd7d15 bind repl-df06c7a6-4ce7-426a-9f66-da91a2a6a837 => repl-df06c7a6-4ce7-426a-9f66-da91a2a6a837 bind repl-c55915c2-2fda-43ee-9410-b1c1cbb3e4ae => repl-c55915c2-2fda-43ee-9410-b1c1cbb3e4ae Exchange 'amq.topic' (topic) Exchange 'amq.fanout' (fanout) Exchange 'amq.match' (headers) Exchange 'qpid.management' (topic) bind mgmt.# => mgmt-3206ff16-fb29-4a30-82ea-e76f50dd7d15
add exchange
command. Specify the type (direct, topic or fanout) along with the name of the exchange to create. You can also add the --durable
option to make the exchange durable:
$ qpid-config add exchangedirect
exchange_name
--durable
del exchange
command with the name of the exchange to remove:
$ qpid-config del exchange exchange_name
qpid-tool
qpid-tool
creates a connection to a broker, and commands are run within the tool, rather than at the shell prompt itself. To create the connection, run the qpid-tool
at the shell prompt with the name or IP address of the machine running the broker you wish to view. You can also append a TCP port number with a :
character:
$ qpid-tool localhost
Management Tool for QPID
qpid:
qpid:
prompt. Type help
at this prompt to see the full list of commands:
qpid: help Management Tool for QPID Commands: list - Print summary of existing objects by class list <className> - Print list of objects of the specified class list <className> all - Print contents of all objects of specified class ...[output truncated}...
qpid-tool
uses the word objects to refer to queues, exchanges, brokers and other such devices. To view a list of all existing objects, type list
at the prompt:
# qpid-tool Management Tool for QPID qpid: list Summary of Objects by Type: Package Class Active Deleted ======================================================= org.apache.qpid.broker exchange 8 0 com.redhat.rhm.store store 1 0 org.apache.qpid.broker broker 1 0 org.apache.qpid.broker binding 16 12 org.apache.qpid.broker session 2 1 org.apache.qpid.broker connection 2 1 org.apache.qpid.broker vhost 1 0 org.apache.qpid.broker queue 6 5 org.apache.qpid.broker system 1 0 org.apache.qpid.broker subscription 6 5
qpid: list system Object Summary: ID Created Destroyed Index ======================================================================== 167 07:34:13 - UUID('b3e2610e-5420-49ca-8306-dca812db647f')
schema
command and specify the class:
qpid: schema queue Schema for class 'qpid.queue': Element Type Unit Access Notes Description =================================================================================================================== vhostRef reference ReadCreate index name short-string ReadCreate index durable boolean ReadCreate autoDelete boolean ReadCreate exclusive boolean ReadCreate arguments field-table ReadOnly Arguments supplied in queue.declare storeRef reference ReadOnly Reference to persistent queue (if durable) msgTotalEnqueues uint64 message Total messages enqueued msgTotalDequeues uint64 message Total messages dequeued msgTxnEnqueues uint64 message Transactional messages enqueued msgTxnDequeues uint64 message Transactional messages dequeued msgPersistEnqueues uint64 message Persistent messages enqueued msgPersistDequeues uint64 message Persistent messages dequeued msgDepth uint32 message Current size of queue in messages msgDepthHigh uint32 message Current size of queue in messages (High) msgDepthLow uint32 message Current size of queue in messages (Low) byteTotalEnqueues uint64 octet Total messages enqueued byteTotalDequeues uint64 octet Total messages dequeued byteTxnEnqueues uint64 octet Transactional messages enqueued byteTxnDequeues uint64 octet Transactional messages dequeued bytePersistEnqueues uint64 octet Persistent messages enqueued bytePersistDequeues uint64 octet Persistent messages dequeued byteDepth uint32 octet Current size of queue in bytes byteDepthHigh uint32 octet Current size of queue in bytes (High) byteDepthLow uint32 octet Current size of queue in bytes (Low) enqueueTxnStarts uint64 transaction Total enqueue transactions started enqueueTxnCommits uint64 transaction Total enqueue transactions committed enqueueTxnRejects uint64 transaction Total enqueue transactions rejected enqueueTxnCount uint32 transaction Current pending enqueue transactions enqueueTxnCountHigh uint32 transaction Current pending enqueue transactions (High) enqueueTxnCountLow uint32 transaction Current pending enqueue transactions (Low) dequeueTxnStarts uint64 transaction Total dequeue transactions started dequeueTxnCommits uint64 transaction Total dequeue transactions committed dequeueTxnRejects uint64 transaction Total dequeue transactions rejected dequeueTxnCount uint32 transaction Current pending dequeue transactions dequeueTxnCountHigh uint32 transaction Current pending dequeue transactions (High) dequeueTxnCountLow uint32 transaction Current pending dequeue transactions (Low) consumers uint32 consumer Current consumers on queue consumersHigh uint32 consumer Current consumers on queue (High) consumersLow uint32 consumer Current consumers on queue (Low) bindings uint32 binding Current bindings bindingsHigh uint32 binding Current bindings (High) bindingsLow uint32 binding Current bindings (Low) unackedMessages uint32 message Messages consumed but not yet acked unackedMessagesHigh uint32 message Messages consumed but not yet acked (High) unackedMessagesLow uint32 message Messages consumed but not yet acked (Low) messageLatencySamples delta-time nanosecond Broker latency through this queue (Samples) messageLatencyMin delta-time nanosecond Broker latency through this queue (Min) messageLatencyMax delta-time nanosecond Broker latency through this queue (Max) messageLatencyAverage delta-time nanosecond Broker latency through this queue (Average)
quit
at the prompt:
qpid: quit Exiting...
qpid-queue-stats
qpid-queue-stats --help
command from the shell prompt:
$ qpid-queue-stats --help usage: qpid-queue-stats [options] options: -h, --help show this help message and exit -a BROKER_ADDRESS, broker-addr is in the form: [username/password@] ...[output truncated]...
qpid-queue-stats
alone:
$ qpid-queue-stats Queue Name Sec Depth Enq Rate Deq Rate ============================================================================= mgmt-localhost.localdomain.12531 10.00 3 1.40 1.20 mgmt-localhost.localdomain.12531 10.00 3 0.50 0.50 mgmt-localhost.localdomain.12531 10.00 5 0.70 0.50 mgmt-localhost.localdomain.12531 10.00 3 1.50 1.70 mgmt-localhost.localdomain.12531 10.00 2 0.50 0.60 mgmt-localhost.localdomain.12531 10.00 4 0.60 0.40 message_queue 10.00 11 0.37 0.00 mgmt-localhost.localdomain.12531 10.00 2 1.10 1.30 message_queue 10.00 0 0.00 1.10
qpid-queue-stats
command and specify the broker. Brokers can be specified in a number of different ways. If the broker requires authentication, specify the username and password separated by a /
character and followed by the @
character. The broker itself can be specified by either hostname or IP address, which can be followed by a port number separated by a :
character. The format for brokers is:
[username/password@] hostname | ip-address [:port]Some valid examples are:
rhemrg-users-list@redhat.com
with the word Subscribe
in the subject line.
Revision History | |||||||
---|---|---|---|---|---|---|---|
Revision 2-6 | Tue Oct 11 2011 | ||||||
| |||||||
Revision 1-2 | Wed Oct 5 2011 | ||||||
| |||||||
Revision 1-1 | Wed Sep 21 2011 | ||||||
| |||||||
Revision 1-0 | Thu Jun 23 2011 | ||||||
| |||||||
Revision 0.1-8 | Fri Jun 03 2011 | ||||||
| |||||||
Revision 0.1-7 | Tue May 31 2011 | ||||||
| |||||||
Revision 0.1-6 | Wed May 25 2011 | ||||||
| |||||||
Revision 0.1-5 | Fri May 20 2011 | ||||||
| |||||||
Revision 0.1-4 | Wed May 18 2011 | ||||||
| |||||||
Revision 0.1-3 | Fri May 13 2011 | ||||||
| |||||||
Revision 0.1-2 | Tue Apr 19 2011 | ||||||
| |||||||
Revision 0.1-1 | Tue Apr 05 2011 | ||||||
| |||||||
Revision 0.1-0 | Tue Feb 22 2011 | ||||||
|