The Dispatch router is an AMQP message message router that provides advanced interconnect capabilities. It allows flexible routing of messages between any AMQP-enabled endpoints, whether they be clients, servers, brokers or any other entity that can send or receive standard AMQP messages.
A messaging client can make a single AMQP connection into a messaging bus built of Dispatch routers and, over that connection, exchange messages with one or more message brokers, and at the same time exchange messages directly with other endpoints without involving a broker at all.
The router is an intermediary for messages but it is not a broker. It does not take responsibility for messages. It will, however, propagate settlement and disposition across a network such that delivery guarantees are met. In other words: the router network will deliver the message, possibly via several intermediate routers, and it will route the acknowledgement of that message by the ultimate reciever back across the same path. This means that responsibility for the message is transfered from the original sender to the ultimate receiver as if they were directly connected. However this is done via a flexible network that allows highly configurable routing of the message transparent to both sender and receiver.
There are some patterns where this enables "brokerless messaging" approaches that are preferable to brokered approaches. In other cases a broker is essential (in particular where you need the separation of responsibility and/or the buffering provided by store-and-forward) but a dispatch network can still be useful to tie brokers and clients together into patterns that are difficult with a single broker.
For a "brokerless" example, consider the common brokered implementation of the request-response pattern, a client puts a request on a queue and then waits for a reply on another queue. In this case the broker can be a hindrance - the client may want to know immediatly if there is nobody to serve the request, but typically it can only wait for a timeout to discover this. With a dispatch network, the client can be informed immediately if its message cannot be delivered because nobody is listening. When the client receives acknowledgement of the request it knows not just that it is sitting on a queue, but that it has actually been received by the server.
For an exampe of using dispatch to enhance the use of brokers, consider using an array of brokers to implement a scalable distributed work queue. A dispatch network can make this appear as a single queue, with senders publishing to a single address and receivers subscribing to a single address. The dispatch network can distribute work to any broker in the array and collect work from any broker for any receiver. Brokers can be shut down or added without affecting clients. This elegantly solves the common difficult of "stuck messages" when implementing this pattern with brokers alone. If a receiver is connected to a broker that has no messages, but there are messages on another broker, you have to somehow transfer them or leave them "stuck". With a dispatch network, all the receivers are connected to all the brokers. If there is a message anywhere it can be delivered to any receiver.
The router is meant to be deployed in topologies of multiple routers, preferably with redundant paths. It uses link-state routing protocols and algorithms (similar to OSPF or IS-IS from the networking world) to calculate the best path from every point to every other point and to recover quickly from failures. It does not need to use clustering for high availability; rather, it relies on redundant paths to provide continued connectivity in the face of system or network failure. Because it never takes responsibility for messages it is effectively stateless, messages not delivered to their final destination will not be acknowledged to the sender and therefore the sender can re-send such messages if it is disconnected from the network.
The default configuration file is installed in install-prefix/etc/qpid/qdrouterd.conf. This configuration file will cause the router to run in standalone mode, listening on the standard AMQP port (5672). Dispatch Router looks for the configuration file in the installed location by default. If you wish to use a different path, the "-c" command line option will instruct Dispatch Router as to which configuration to load.
To run the router, invoke the executable: o $ qdrouterd [-c my-config-file]
For more details of the configuration file see the qdrouterd.conf(5)
man page.
Dispatch Router should, in theory, work with any client that is compatible with AMQP 1.0. The following clients have been tested:
Client | Notes |
---|---|
qpid::messaging | The Qpid messaging clients work with Dispatch Router as long as they are configured to use the 1.0 version of the protocol. To enable AMQP 1.0 in the C++ client, use the {protocol:amqp1.0} connection option. |
Proton Messenger | Messenger works with Dispatch Router. |
qdstat is a command line tool that lets you view the status of a Dispatch Router. The following options are useful for seeing that the router is doing:
Option | Description |
---|---|
-l | Print a list of AMQP links attached to the router. Links are unidirectional. Outgoing links are usually associated with a subscription address. The tool distinguishes between endpoint links and router links. Endpoint links are attached to clients using the router. Router links are attached to other routers in a network of routers. |
-a | Print a list of addresses known to the router. |
-n | Print a list of known routers in the network. |
-c | Print a list of connections to the router. |
For complete details see the qdstat(8)
man page and the output of qdstat --help
.
qdmanage is a general-purpose AMQP management client that allows you to not only view but modify the configuration of a running dispatch router.
For example you can query all the connection entities in the route r $ qdrouterd query --type connection
To enable logging debug and higher level messages by default: $ qdrouter update log/DEFAULT enable=debug+
In fact, everything that can be configured in the configuration file can also be created in a running router via management. For example to create a new listener in a running router: $ qdrouter create type=listener port=5555
Now you can connect to port 5555, for exampple $ qdrouterd query -b localhost:5555 --type listener
For complete details see the qdmanage(8)
man page and the output of qdmanage --help
. Also for details of what can be configured see the qdrouterd.conf(5)
man page.
The router can operate stand-alone or as a node in a network of routers. The mode is configured in the router section of the configuration file. In stand-alone mode, the router does not attempt to collaborate with any other routers and only routes messages among directly connected endpoints.
If your router is running in stand-alone mode, qdstat -a will look like the following:
$ qdstat -a
Router Addresses
class address in-proc local remote in out thru to-proc from-proc
===============================================================================
local $management Y 0 0 1 0 0 1 0
local temp.AY81ga 1 0 0 0 0 0 0
Note that there are two known addresses. $management is the address of the router's embedded management agent. temp.AY81ga is the temporary reply-to address of the qdstat client making requests to the agent.
If you change the mode to interior and restart the processs, the same command will yield two additional addresses which are used for inter-router communication:
$ qdstat -a
Router Addresses
class address in-proc local remote in out thru to-proc from-proc
===============================================================================
local $management Y 0 0 1 0 0 1 0
local qdhello Y 0 0 0 0 0 0 3
local qdrouter Y 0 0 0 0 0 0 1
local temp.khOpGb 1 0 0 0 0 0 0
The term "mobile subscriber" simply refers to the fact that a client may connect to the router and subscribe to an address to receive messages sent to that address. No matter where in the network the subscriber attaches, the messages will be routed to the appropriate destination.
To illustrate a subscription on a stand-alone router, you can use the examples that are provided with Qpid Proton. Using the recv.py example receiver:
$ recv.py amqp://0.0.0.0/my-address
This command creates a receiving link subscribed to the specified address. To verify the subscription:
$ qdstat -a
Router Addresses
class address in-proc local remote in out thru to-proc from-proc
================================================================================
local $management Y 0 0 1 0 0 1 0
mobile my-address 1 0 0 0 0 0 0
local temp.fDt8_a 1 0 0 0 0 0 0
You can then, in a separate command window, run a sender to produce messages to that address:
$ send.py -a amqp://0.0.0.0/my-address
Dynamic reply-to can be used to obtain a reply-to address that routes back to a client's receiving link regardless of how many hops it has to take to get there. To illustrate this feature, see below a simple program (written in C++ against the qpid::messaging API) that queries the management agent of the attached router for a list of other known routers' management addresses.
#include <qpid/messaging/Address.h>
#include <qpid/messaging/Connection.h>
#include <qpid/messaging/Message.h>
#include <qpid/messaging/Receiver.h>
#include <qpid/messaging/Sender.h>
#include <qpid/messaging/Session.h>
using namespace qpid::messaging;
using namespace qpid::types;
using std::stringstream;
using std::string;
int main() {
const char* url = "amqp:tcp:127.0.0.1:5672";
std::string connectionOptions = "{protocol:amqp1.0}";
Connection connection(url, connectionOptions);
connection.open();
Session session = connection.createSession();
Sender sender = session.createSender("mgmt");
// create reply receiver and get the reply-to address
Receiver receiver = session.createReceiver("#");
Address responseAddress = receiver.getAddress();
Message request;
request.setReplyTo(responseAddress);
request.setProperty("x-amqp-to", "amqp:/_local/$management");
request.setProperty("operation", "DISCOVER-MGMT-NODES");
request.setProperty("type", "org.amqp.management");
request.setProperty("name, "self");
sender.send(request);
Message response = receiver.fetch();
Variant content(response.getContentObject());
std::cout << "Response: " << content << std::endl << std::endl;
connection.close();
}
The equivalent program written in Python against the Proton Messenger API:
from proton import Messenger, Message
def main():
host = "0.0.0.0:5672"
messenger = Messenger()
messenger.start()
messenger.route("amqp:/*", "amqp://%s/$1" % host)
reply_subscription = messenger.subscribe("amqp:/#")
reply_address = reply_subscription.address
request = Message()
response = Message()
request.address = "amqp:/_local/$management"
request.reply_to = reply_address
request.properties = {u'operation' : u'DISCOVER-MGMT-NODES',
u'type' : u'org.amqp.management',
u'name' : u'self'}
messenger.put(request)
messenger.send()
messenger.recv()
messenger.get(response)
print "Response: %r" % response.body
messenger.stop()
main()
This is an early test release. It is expected that users will find bugs and other various instabilities. The main goal of this release is to prove that the process can be run and that users can demonstrate basic functionality as described in this document. Nevertheless, the following are known issues with the 0.1 release:
AMQP addresses are used to control the flow of messages across a network of routers. Addresses are used in a number of different places in the AMQP 1.0 protocol. They can be used in a specific message in the to
and reply-to
fields of a message's properties. They are also used during the creation of links in the address
field of a source
or a target
.
Addresses designate various kinds of entities in a messaging network:
The syntax of an AMQP address is opaque as far as the router network is concerned. A syntactical structure may be used by the administrator that creates addresses, but the router treats them as opaque strings. Routers consider addresses to be mobile such that any address may be directly connected to any router in a network and may move around the topology. In cases where messages are broadcast to or balanced across multiple consumers, an address may be connected to multiple routers in the network.
Addresses have semantics associated with them. When an address is created in the network, it is assigned a set of semantics (and access rules) during a process called provisioning. The semantics of an address control how routers behave when they see the address being used.
Address semantics include the following considerations:
Routing patterns constrain the paths that a message can take across a network.
Pattern | Description |
---|---|
Direct | Direct routing allows for only one consumer to use an address at a time. Messages (or links) follow the lowest cost path across the network from the sender to the one receiver. |
Multicast | Multicast routing allows multiple consumers to use the same address at the same time. Messages are routed such that each consumer receives a copy of the message. |
Balanced | Balanced routing also allows multiple consumers to use the same address. In this case, messages (or links) are routed to exactly one of the consumers, and the network attempts to balance the traffic load across the set of consumers using the same address. |
The fact that addresses can be used in different ways suggests that message routing can be accomplished in different ways. Before going into the specifics of the different routing mechanisms, it would be good to first define what is meant by the term routing:
In a network built of multiple routers connected by connections (i.e., nodes and edges in a graph), routing determines which connection to use to send a message directly to its destination or one step closer to its destination.
Each router serves as the terminus of a collection of incoming and outgoing links. Some of the links are designated for message routing, and others are designated for link routing. In both cases, the links either connect directly to endpoints that produce and consume messages, or they connect to other routers in the network along previously established connections.
Message routing occurs upon delivery of a message and is done based on the address in the message's to
field.
When a delivery arrives on an incoming message-routing link, the router extracts the address from the delivered message's to
field and looks the address up in its routing table. The lookup results in zero or more outgoing links onto which the message shall be resent.
Delivery | Handling |
---|---|
pre-settled | If the arriving delivery is pre-settled (i.e., fire and forget), the incoming delivery shall be settled by the router, and the outgoing deliveries shall also be pre-settled. In other words, the pre-settled nature of the message delivery is propagated across the network to the message's destination. |
unsettled | Unsettled delivery is also propagated across the network. Because unsettled delivery records cannot be discarded, the router tracks the incoming deliveries and keeps the association of the incoming deliveries to the resulting outgoing deliveries. This kept association allows the router to continue to propagate changes in delivery state (settlement and disposition) back and forth along the path which the message traveled. |
Link routing occurs when a new link is attached to the router across one of its AMQP connections. It is done based on the target.address
field of an inbound link and the source.address
field of an outbound link.
Link routing uses the same routing table that message routing uses. The difference is that the routing occurs during the link-attach operation, and link attaches are propagated along the appropriate path to the destination. What results is a chain of links, connected end-to-end, from source to destination. It is similar to a virtual circuit in a telecom system.
Each router in the chain holds pairs of link termini that are tied together. The router then simply exchanges all deliveries, delivery state changes, and link state changes between the two termini.
The endpoints that use the link chain do not see any difference in behavior between a link chain and a single point-to-point link. All of the features available in the link protocol (flow control, transactional delivery, etc.) are available over a routed link-chain.
Dispatch Router is an AMQP router and as such, it provides extensions, codepoints, and semantics for routing over AMQP. This page documents the details of Dispatch Router's use of AMQP.
The following Message Annotation fields are defined by Dispatch Router:
Field | Type | Description |
---|---|---|
x-opt-qd.ingress | string | The identity of the ingress router for a message-routed message. The ingress router is the first router encountered by a transiting message. The router will, if this field is present, leave it unaltered. If the field is not present, the router shall insert the field with its own identity. |
x-opt-qd.trace | list of string | The list of routers through which this message-routed message has transited. If this field is not present, the router shall do nothing. If the field is present, the router shall append its own identity to the end of the list. |
x-opt-qd.to | string | To-Override for message-routed messages. If this field is present, the address in this field shall be used for routing in lieu of the to field in the message properties. A router may append, remove, or modify this annotation field depending on the policy in place for routing the message. |
x-opt-qd.class | string | Message class. This is used to allow the router to provide separate paths for different classes of traffic. |
The following Capability values are used in Sources and Targets.
Capability | Description |
---|---|
qd.router | This capability is added to sources and targets that are used for inter-router message exchange. |
The following AMQP addresses and address patterns are used within Dispatch Router.
Pattern | Description |
---|---|
_local/<addr> |
An address that references a locally attached endpoint. Messages using this address pattern shall not be routed over more than one link. |
_topo/<area>/<router>/<addr> |
An address that references an endpoint attached to a specific router node in the network topology. Messages with addresses that follow this pattern shall be routed along the shortest path to the specified router. Note that addresses of this form are a-priori routable in that the address itself contains enough information to route the message to its destination. |
<addr> |
A mobile address. An address of this format represents an endpoint or a set of distinct endpoints that are attached to the network in arbitrary locations. It is the responsibility of the router network to determine which router nodes are valid destinations for mobile addresses. |
Address | Description |
---|---|
_local/$management |
The management agent on the attached router/container. This address would be used by an endpoint that is a management client/console/tool wishing to access management data from the attached container. |
_topo/0/Router.E/agent |
The management agent at Router.E in area 0. This address would be used by a management client wishing to access management data from a specific container that is reachable within the network. |
_local/qdhello |
The router entity in each of the connected routers. This address is used to communicate with neighbor routers and is exclusively for the HELLO discovery protocol. |
_local/qdrouter |
The router entity in each of the connected routers. This address is used by a router to communicate with other routers in the network. |
_topo/0/Router.E/qdxrouter |
The router entity at the specifically indicated router. This address form is used by a router to communicate with a specific router that may or may not be a neighbor. |
Qpid Dispatch is manageable remotely via AMQP. It is compliant with the emerging AMQP Management specification (draft 9).
Differences from the specification:
The schema qdrouterd.json
is a JSON format file that defines annotations and entity types of the Qpid Dispatch Router management model. The model is based on the AMQP management specification.
The schema is a JSON map with the following keys:
Annotation and entity type definition maps have the following keys:
Entity type definitions also have these fields:
Attribute definition maps have the following fields:
$attributeName
.There is the following hierarchy among entity types:
entity
: The base of all entity types. - configurationEntity
: base for all types that hold configuration information.
Configuration information is supplied in advance and expresse intent. For example "I want the router to listen on port N". All the entities that can be used in the configuration file extend configurationEntity
.
operationalEntity
: base for all types that hold operational information.Operational information reflects the actual current state of the router. For example, "how many addresses are presently active?" All the entities queried by the qdstat
tool extend operationalEntity
.
The two types are often related. For example listener
and connector
extend configurationEntity
, they express the intent to make or receive connections. connection
extends operationalEntity
, it holds information the actual connection status.
The rest of this section provides the schema documentation in readable format.
addrPort
Attributes for internet address and port.
Used by listener
, connector
.
addr
(String, default=0.0.0.0)Host address: ipv4 or ipv6 literal or a host name.
port
(String, default=amqp)Port number or symbolic service name.
saslMechanisms
Attribute for a list of SASL mechanisms.
Used by listener
, connector
.
saslMechanisms
(String, required)connectionRole
Attribute for the role of a connection.
Used by listener
, connector
.
role
(One of [normal, inter-router, on-demand], default=normal)sslProfile
Attributes for setting TLS/SSL configuration for connections.
Used by listener
, connector
.
certDb
(String)The path to the database that contains the public certificates of trusted certificate authorities (CAs).
certFile
(String)The path to the file containing the PEM-formatted public certificate to be used on the local end of any connections using this profile.
keyFile
(String)The path to the file containing the PEM-formatted private key for the above certificate.
passwordFile
(String)If the above private key is password protected, this is the path to a file containing the password that unlocks the certificate key.
password
(String)An alternative to storing the password in a file referenced by passwordFile is to supply the password right here in the configuration file. This option can be used by supplying the password in the 'password' option. Don't use both password and passwordFile in the same profile.
entity
Base entity type for all entities.
name
(String, unique)Unique name, can be changed.
identity
(String, unique)Unique identity, will not change.
type
(String, required)Management entity type.
configurationEntity
Base type for entities containing configuration information.
Extends: entity
(name
, identity
, type
).
container
Attributes related to the AMQP container.
Extends: configurationEntity
(name
, identity
, type
).
containerName
(String)The name of the AMQP container. If not specified, the container name will be set to a value of the container's choosing. The automatically assigned container name is not guaranteed to be persistent across restarts of the container.
workerThreads
(Integer, default=1)The number of threads that will be created to process message traffic and other application work (timers, non-amqp file descriptors, etc.) .
debugDump
(String)A file to dump debugging information that can't be logged normally.
router
Tracks peer routers and computes routes to destinations.
Extends: configurationEntity
(name
, identity
, type
).
routerId
(String)Router's unique identity.
mode
(One of [standalone, interior, edge, endpoint], default=standalone)In standalone mode, the router operates as a single component. It does not participate in the routing protocol and therefore will not coorperate with other routers. In interior mode, the router operates in cooreration with other interior routers in an interconnected network. In edge mode, the router operates with an uplink into an interior router network. Edge routers are typically used as connection concentrators or as security firewalls for access into the interior network.
area
(String)Unused placeholder.
helloInterval
(Integer, default=1)Interval in seconds between HELLO messages sent to neighbor routers.
helloMaxAge
(Integer, default=3)Time in seconds after which a neighbor is declared lost if no HELLO is received.
raInterval
(Integer, default=30)Interval in seconds between Router-Advertisements sent to all routers.
remoteLsMaxAge
(Integer, default=60)Time in seconds after which link state is declared stale if no RA is received.
mobileAddrMaxAge
(Integer, default=60)Time in seconds after which mobile addresses are declared stale if no RA is received.
addrCount
(Integer)Number of addresses known to the router.
linkCount
(Integer)Number of links attached to the router node.
nodeCount
(Integer)Number of known peer router nodes.
listener
Listens for incoming connections to the router.
Extends: configurationEntity
(name
, identity
, type
).
Annotations: sslProfile
(certDb
, certFile
, keyFile
, passwordFile
, password
), addrPort
(addr
, port
), saslMechanisms
(saslMechanisms
), connectionRole
(role
).
requirePeerAuth
(Boolean, default=True)Only for listeners using SSL. If set to 'yes', attached clients will be required to supply a certificate. If the certificate is not traceable to a CA in the ssl profile's cert-db, authentication fails for the connection.
trustedCerts
(String)This optional setting can be used to reduce the set of available CAs for client authentication. If used, this setting must provide a path to a PEM file that contains the trusted certificates.
allowUnsecured
(Boolean)For listeners using SSL only. If set to 'yes', this option causes the listener to watch the initial network traffic to determine if the client is using SSL or is running in-the-clear. The listener will enable SSL only if the client uis using SSL.
allowNoSasl
(Boolean)If set to 'yes', this option causes the listener to allow clients to connect even if they skip the SASL authentication protocol.
maxFrameSize
(Integer, default=65536)Defaults to 65536. If specified, it is the maximum frame size in octets that will be used in the connection-open negotiation with a connected peer. The frame size is the largest contiguous set of uniterruptible data that can be sent for a message delivery over the connection. Interleaving of messages on different links is done at frame granularity.
connector
Establishes an outgoing connections from the router.
Extends: configurationEntity
(name
, identity
, type
).
Annotations: sslProfile
(certDb
, certFile
, keyFile
, passwordFile
, password
), addrPort
(addr
, port
), saslMechanisms
(saslMechanisms
), connectionRole
(role
).
allowRedirect
(Boolean, default=True)Allow the peer to redirect this connection to another address.
maxFrameSize
(Integer, default=65536)Maximum frame size in octets that will be used in the connection-open negotiation with a connected peer. The frame size is the largest contiguous set of uniterruptible data that can be sent for a message delivery over the connection. Interleaving of messages on different links is done at frame granularity.
log
Configure logging for a particular module.
Extends: configurationEntity
(name
, identity
, type
).
module
(One of [ROUTER, MESSAGE, SERVER, AGENT, CONTAINER, CONFIG, ERROR, DISPATCH, DEFAULT], required)Module to configure. The special module 'DEFAULT' specifies defaults for all modules.
enable
(String, required, default=default)Levels are: trace, debug, info, notice, warning, error, critical. The enable string is a comma-separated list of levels. A level may have a trailing '+' to enable that level and above. For example 'trace,debug,warning+' means enable trace, debug, warning, error and critical. The value 'none' means disable logging for the module. The value 'default' means use the value from the DEFAULT module.
timestamp
(Boolean)Include timestamp in log messages.
source
(Boolean)Include source file and line number in log messages.
output
(String)Where to send log messages. Can be 'stderr', 'syslog' or a file name.
fixedAddress
Establishes semantics for addresses starting with a prefix.
Extends: configurationEntity
(name
, identity
, type
).
prefix
(String, required)The address prefix (always starting with '/').
phase
(Integer)The phase of a multi-hop address passing through one or more waypoints.
fanout
(One of [multiple, single], default=multiple)One of 'multiple' or 'single'. Multiple fanout is a non-competing pattern. If there are multiple consumers using the same address, each consumer will receive its own copy of every message sent to the address. Single fanout is a competing pattern where each message is sent to only one consumer.
bias
(One of [closest, spread], default=closest)Only if fanout is single. One of 'closest' or 'spread'. Closest bias means that messages to an address will always be delivered to the closest (lowest cost) subscribed consumer. Spread bias will distribute the messages across subscribers in an approximately even manner.
waypoint
A remote node that messages for an address pass through.
Extends: configurationEntity
(name
, identity
, type
).
address
(String, required)The AMQP address of the waypoint.
connector
(String, required)The name of the on-demand connector used to reach the waypoint's container.
inPhase
(Integer, default=-1)The phase of the address as it is routed to the waypoint.
outPhase
(Integer, default=-1)The phase of the address as it is routed from the waypoint.
operationalEntity
Base type for entities containing current operational information.
Extends: entity
(name
, identity
, type
).
router.link
Link to another AMQP endpoint: router node, client or other AMQP process.
Extends: operationalEntity
(name
, identity
, type
).
linkName
(String)
linkType
(One of [endpoint, waypoint, inter-router, inter-area])
linkDir
(One of [in, out])
owningAddr
(String)
eventFifoDepth
(Integer)
msgFifoDepth
(Integer)
remoteContainer
(String)
router.address
AMQP address managed by the router.
Extends: operationalEntity
(name
, identity
, type
).
inProcess
(Boolean)
subscriberCount
(Integer)
remoteCount
(Integer)
deliveriesIngress
(Integer)
deliveriesEgress
(Integer)
deliveriesTransit
(Integer)
deliveriesToContainer
(Integer)
deliveriesFromContainer
(Integer)
router.node
AMQP node managed by the router.
Extends: operationalEntity
(name
, identity
, type
).
addr
(String)
nextHop
(Integer)
routerLink
(Integer)
validOrigins
(List)
connection
Connections to the router's container.
Extends: operationalEntity
(name
, identity
, type
).
container
(String)
state
(One of [connecting, opening, operational, failed, user])
host
(String)
dir
(One of [in, out])
role
(String)
sasl
(String)
allocator
Memory allocation pool.
Extends: operationalEntity
(name
, identity
, type
).
typeSize
(Integer)
transferBatchSize
(Integer)
localFreeListMax
(Integer)
globalFreeListMax
(Integer)
totalAllocFromHeap
(Integer)
totalFreeToHeap
(Integer)
heldByThreads
(Integer)
batchesRebalancedToThreads
(Integer)
batchesRebalancedToGlobal
(Integer)
qdrouterd - AMQP message router.
qdrouterd [options]
The Qpid Dispatch router (qdrouterd) is a network daemon that directs AMQP 1.0 messages between endpoints, such as messaging clients and servers. ## Options
Load configuration from file at PATH
Location of Dispatch's Python library
Run process as a SysV-style daemon
If daemon, the file for the stored daemon pid
If daemon, the username to run as
Print this help
Run qdrouterd --help
to see options.
qdrouterd.conf(5), qdstat(8), qdstat.conf(5),
http://qpid.apache.org/components/dispatch-router
qdstat - A tool to inspect Dispatch router networks
qdrouterd [options]
qdstat shows status information about networks of Dispatch routers. It can display connections, network nodes and links, and router stats such as memory use. ## Options
show this help message and exit
Print version and exit.
Show General Router Stats
Show Connections
Show Router Links
Show Router Nodes
Show Router Addresses
Show Broker Memory Stats
URL of the messaging bus to connect to (default
Router to be queried
Maximum time to wait for connection in seconds (default 5)
Force SASL mechanism (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD5, DIGEST-MD5, GSSAPI).
Client SSL certificate (PEM Format)
Client SSL private key (PEM Format)
Run qdstat --help
to see options.
qdrouterd (8), qdmanage (8), qdrouterd.conf (5)
http://qpid.apache.org/components/dispatch-router
qdmanage - A management tool for Dispatch routers.
qdmanage operation [options...] [arguments...]
An AMQP management client for use with qdrouterd. Sends AMQP management operations requests and prints the response in JSON format. This is a generic AMQP management tool and can be used with any standard AMQP managed endpoint, not just with qdrouter.
query
[ATTR...]Prints the named attributes of all entities. With no arguments prints all attributes. The --type option restricts the result to entities extending the type.
create
[ATTR=VALUE...]Create a new entity with the specified attributes. With the --stdin option, read attributes from stdin. This can be a JSON map of attributes to create a single entity, or a JSON list of maps to create multiple entitiees.
read
Print the attributes of an entity specified by the --name or --identity options. With the --stdin option, create entities based on data from stdin. This can be a JSON map of attributes to create a single entity, or a JSON list of maps to create multiple entitiees.
update
[ATTR=VALUE...]Update the attributes of an existing entity. With the --stdin option, read attributes from stdin. This can be a JSON map of attributes to update a single entity, or a JSON list of maps to update multiple entitiees. If an ATTR name is listed with no =VALUE, that attribute will be deleted from the entity.
delete
Delete an entity specified by the --name or --identity options.
get-types
[TYPE]List entity types with their base types. With no arguments list all types.
get-operations
[TYPE]List entity types with their operations. With no arguments list all types.
get-attributes
[TYPE]List entity types with their attributes. With no arguments list all types.
get-annotations
[TYPE]List entity types with their annotations. With no arguments list all types.
get-mgmt-nodes
show this help message and exit
Print version and exit.
Type of entity to operate on.
Name of entity to operate on.
Identity of entity to operate on.
Pretty-printing indent. -1 means don't pretty-print
Read attributes as JSON map or list of maps from
URL of the messaging bus to connect to (default
Router to be queried
Maximum time to wait for connection in seconds (default 5)
Force SASL mechanism (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD5, DIGEST-MD5, GSSAPI).
Client SSL certificate (PEM Format)
Client SSL private key (PEM Format)
Run qdmanage --help
to see options.
Show the logging configuration
qdmanage query --type=log
Enable debug and higher log messages by default:
qdmanage udpdate name=log/DEFAULT enable=debug+
Enable trace log messages only for the MESSAGE moudle and direct MESSAGE logs to the file "test.log"
qdmanage udpdate name=log/MESSAGE enable=trace output=test.log
Set MESSAGE logging back to the default:
qdmanage udpdate name=log/MESSAGE enable=default
Disable MESSAGE logging:
qdmanage udpdate name=log/MESSAGE enable=none
qdrouterd(8), qdstat(8), qdrouterd.conf(5)
http://qpid.apache.org/components/dispatch-router
qdrouterd.conf - Configuration file for the Qpid Dispatch router
The configuration file is made up of sections with this syntax:
SECTION-NAME {
ATTRIBUTE-NAME: ATTRIBUTE-VALUE
ATTRIBUTE-NAME: ATTRIBUTE-VALUE
...
}
There are two types of sections:
Configuration sections correspond to configuration entities. They can be queried and configured via management tools as well as via the configuration file.
Annotation sections define a group of attribute values that can be included in one or more entity sections.
For example you can define an "ssl-profile" annotation section with SSL credentials that can be included in multiple "listener" entities. Here's an example, note how the 'ssl-profile' attribute of 'listener' sections references the 'name' attribute of 'ssl-profile' sections.
ssl-profile {
name: ssl-profile-one
cert-db: ca-certificate-1.pem
cert-file: server-certificate-1.pem
key-file: server-private-key.pem
}
listener {
ssl-profile: ssl-profile-one
addr: 0.0.0.0
port: 20102
sasl-mechanisms: ANONYMOUS
}
Attributes for internet address and port.
Host address: ipv4 or ipv6 literal or a host name.
Port number or symbolic service name.
Used by listener, connector.
Attribute for a list of SASL mechanisms.
Used by listener, connector.
Attribute for the role of a connection.
Used by listener, connector.
Attributes for setting TLS/SSL configuration for connections.
The path to the database that contains the public certificates of trusted certificate authorities (CAs).
The path to the file containing the PEM-formatted public certificate to be used on the local end of any connections using this profile.
The path to the file containing the PEM-formatted private key for the above certificate.
If the above private key is password protected, this is the path to a file containing the password that unlocks the certificate key.
An alternative to storing the password in a file referenced by passwordFile is to supply the password right here in the configuration file. This option can be used by supplying the password in the 'password' option. Don't use both password and passwordFile in the same profile.
Used by listener, connector.
Attributes related to the AMQP container.
The name of the AMQP container. If not specified, the container name will be set to a value of the container's choosing. The automatically assigned container name is not guaranteed to be persistent across restarts of the container.
The number of threads that will be created to process message traffic and other application work (timers, non-amqp file descriptors, etc.) .
A file to dump debugging information that can't be logged normally.
Unique name, can be changed.
Unique identity, will not change.
Tracks peer routers and computes routes to destinations.
Router's unique identity.
In standalone mode, the router operates as a single component. It does not participate in the routing protocol and therefore will not coorperate with other routers. In interior mode, the router operates in cooreration with other interior routers in an interconnected network. In edge mode, the router operates with an uplink into an interior router network. Edge routers are typically used as connection concentrators or as security firewalls for access into the interior network.
Unused placeholder.
Interval in seconds between HELLO messages sent to neighbor routers.
Time in seconds after which a neighbor is declared lost if no HELLO is received.
Interval in seconds between Router-Advertisements sent to all routers.
Time in seconds after which link state is declared stale if no RA is received.
Time in seconds after which mobile addresses are declared stale if no RA is received.
Number of addresses known to the router.
Number of links attached to the router node.
Number of known peer router nodes.
Unique name, can be changed.
Unique identity, will not change.
Listens for incoming connections to the router.
Only for listeners using SSL. If set to 'yes', attached clients will be required to supply a certificate. If the certificate is not traceable to a CA in the ssl profile's cert-db, authentication fails for the connection.
This optional setting can be used to reduce the set of available CAs for client authentication. If used, this setting must provide a path to a PEM file that contains the trusted certificates.
For listeners using SSL only. If set to 'yes', this option causes the listener to watch the initial network traffic to determine if the client is using SSL or is running in-the-clear. The listener will enable SSL only if the client uis using SSL.
If set to 'yes', this option causes the listener to allow clients to connect even if they skip the SASL authentication protocol.
Defaults to 65536. If specified, it is the maximum frame size in octets that will be used in the connection-open negotiation with a connected peer. The frame size is the largest contiguous set of uniterruptible data that can be sent for a message delivery over the connection. Interleaving of messages on different links is done at frame granularity.
Unique name, can be changed.
Unique identity, will not change.
Annotations sslProfile, addrPort, saslMechanisms, connectionRole.
Establishes an outgoing connections from the router.
Allow the peer to redirect this connection to another address.
Maximum frame size in octets that will be used in the connection-open negotiation with a connected peer. The frame size is the largest contiguous set of uniterruptible data that can be sent for a message delivery over the connection. Interleaving of messages on different links is done at frame granularity.
Unique name, can be changed.
Unique identity, will not change.
Annotations sslProfile, addrPort, saslMechanisms, connectionRole.
Configure logging for a particular module.
Module to configure. The special module 'DEFAULT' specifies defaults for all modules.
Levels are: trace, debug, info, notice, warning, error, critical. The enable string is a comma-separated list of levels. A level may have a trailing '+' to enable that level and above. For example 'trace,debug,warning+' means enable trace, debug, warning, error and critical. The value 'none' means disable logging for the module. The value 'default' means use the value from the DEFAULT module.
Include timestamp in log messages.
Include source file and line number in log messages.
Where to send log messages. Can be 'stderr', 'syslog' or a file name.
Unique name, can be changed.
Unique identity, will not change.
Establishes semantics for addresses starting with a prefix.
The address prefix (always starting with '/').
The phase of a multi-hop address passing through one or more waypoints.
One of 'multiple' or 'single'. Multiple fanout is a non-competing pattern. If there are multiple consumers using the same address, each consumer will receive its own copy of every message sent to the address. Single fanout is a competing pattern where each message is sent to only one consumer.
Only if fanout is single. One of 'closest' or 'spread'. Closest bias means that messages to an address will always be delivered to the closest (lowest cost) subscribed consumer. Spread bias will distribute the messages across subscribers in an approximately even manner.
Unique name, can be changed.
Unique identity, will not change.
A remote node that messages for an address pass through.
The AMQP address of the waypoint.
The name of the on-demand connector used to reach the waypoint's container.
The phase of the address as it is routed to the waypoint.
The phase of the address as it is routed from the waypoint.
Unique name, can be changed.
Unique identity, will not change.