summaryrefslogtreecommitdiff
path: root/doc/book/src
diff options
context:
space:
mode:
authorJonathan Robie <jonathan@apache.org>2010-11-23 19:51:40 +0000
committerJonathan Robie <jonathan@apache.org>2010-11-23 19:51:40 +0000
commit3054c6629773242a0b397108ffea004aa523b533 (patch)
tree99e10eec97c3cf8c0cbe0c5ec767c6ad9619c80f /doc/book/src
parent241cf9f1e7741a3a19a0bb215024aada96effc33 (diff)
downloadqpid-python-3054c6629773242a0b397108ffea004aa523b533.tar.gz
Contributed chapter from Red Hat docs.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1038301 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'doc/book/src')
-rw-r--r--doc/book/src/Using-Broker-Federation.xml1263
1 files changed, 610 insertions, 653 deletions
diff --git a/doc/book/src/Using-Broker-Federation.xml b/doc/book/src/Using-Broker-Federation.xml
index bf4740e321..f5fedf814c 100644
--- a/doc/book/src/Using-Broker-Federation.xml
+++ b/doc/book/src/Using-Broker-Federation.xml
@@ -20,255 +20,477 @@
-->
-<section><title>
- Using Broker Federation
- </title><section role="h1" id="UsingBrokerFederation-Introduction"><title>
- Introduction
- </title>
- <para>
- Please note: Whereas broker federation was introduced in the M3
- milestone release, the discussion in this document is based on
- the richer capabilities of federation in the M4 release.
- </para>
-<!--
- <para>
- This document presents broker federation for the administrative
- user. For design and developer information, please see <xref linkend="qpid_Federation-Design-Note"/>.
- </para> -->
- <!--h1--></section>
-
- <section role="h1" id="UsingBrokerFederation-WhatIsBrokerFederation-3F"><title>
- What Is
- Broker Federation?
- </title>
- <para>
- The Qpid C++ messaging broker supports broker federation, a
- mechanism by which large messaging networks can be built using
- multiple brokers. Some scenarios in which federation is useful:
- </para><itemizedlist>
- <listitem><para>
- <emphasis>Connecting disparate locations across a wide area
- network.</emphasis> In this case full connectivity across the
- enterprise can be achieved while keeping local message traffic
- isolated to a single location.
- </para></listitem>
- <listitem><para>
- <emphasis>Departmental brokers</emphasis> that have a policy which
- controls the flow of inter-departmental message traffic.
- </para></listitem>
- <listitem><para>
- <emphasis>Scaling of capacity</emphasis> for expensive broker operations.
- High-function exchanges like the XML exchange can be replicated
- to scale performance.
- </para></listitem>
- <listitem><para>
- <emphasis>Co-Resident brokers</emphasis> Some applications benefit from
- having a broker co-resident with the client. This is
- particularly true if the client produces data that must be
- delivered reliably but connectivity to the consumer(s) is
- non-reliable. In this case, a co-resident broker provides
- queueing and durablilty not available in the client alone.
- </para></listitem>
- <listitem><para>
- <emphasis>Bridging disjoint IP networks.</emphasis> Message brokers can
- be configured to allow message connectivity between networks
- where there is no IP connectivity. For example, an isolated,
- private IP network can have messaging connectivity to brokers
- in other outside IP networks.
- </para></listitem>
- </itemizedlist>
- <!--h1--></section>
-
- <section role="h1" id="UsingBrokerFederation-TheqpidrouteUtility"><title>
- The
- qpid-route Utility
- </title>
- <para>
- The qpid-route command line utility is provided with the Qpid
- broker. This utility is used to configure federated networks of
- brokers and to view the status and topology of networks.
- </para><para>
- qpid-route accesses the managed brokers remotely. It does not
- need to be invoked from the same host on which the broker is
- running. If network connectivity permits, an entire enterprise
- can be configured from a single location.
- </para><para>
- In the following sections, federation concepts will be introduced
- and illustrated using qpid-route.
- </para><section role="h2" id="UsingBrokerFederation-LinksandRoutes"><title>
- Links and
- Routes
- </title>
- <para>
- Federation occurs when a <emphasis>link</emphasis> is established between two
- brokers and one or more <emphasis>routes</emphasis> are created within that
- link. A <emphasis>link</emphasis> is a transport level connection (tcp, rdma,
- ssl, etc.) initiated by one broker and accepted by another. The
- initiating broker assumes the role of <emphasis>client</emphasis> with regard
- to the connection. The accepting broker annotates the connection
- as being for federation but otherwise treats it as a normal
- client connection.
- </para><para>
- A <emphasis>route</emphasis> is associated with an AMQP session established
- over the link connection. There may be multiple routes sharing
- the same link. A route controls the flow of messages across the
- link between brokers. Routes always consist of a session and a
- subscription for consuming messages. Depending on the
- configuration, a route may have a private queue on the source
- broker with a binding to an exchange on that broker.
- </para><para>
- Routes are unidirectional. A single route provides for the flow
- of messages in one direction across a link. If bidirectional
- connectivity is required (and it almost always is), then a pair
- of routes must be created, one for each direction of message
- flow.
- </para><para>
- The qpid-route utility allows the administrator to configure and
- manage links and routes separately. However, when a route is
- created and a link does not already exist, qpid-route will
- automatically create the link. It is typically not necessary to
- create a link by itself. It is, however, useful to get a list of
- links and their connection status from a broker:
- </para>
- <programlisting>
-$ qpid-route link list 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
-</programlisting>
- <para>
- The example above shows a <emphasis>link list</emphasis> query to the
- broker at "localhost:10001". In the example, this broker has
- three links to other brokers. Two are operational and the third
- is waiting to connect because there is not currently a broker
- listening at that address.
- </para><section role="h3" id="UsingBrokerFederation-TheLifeCycleofaLink"><title>
- The Life
- Cycle of a Link
- </title>
- <para>
- When a link is created on a broker, that broker attempts to
- establish a transport-level connection to the peer broker. If it
- fails to connect, it retries the connection at an increasing time
- interval. If the connection fails due to authentication failure,
- it will not continue to retry as administrative intervention is
- needed to fix the problem.
- </para><para>
- If an operational link is disconnected, the initiating broker
- will attempt to re-establish the connection with the same
- interval back-off.
- </para><para>
- The shortest retry-interval is 2 seconds and the longest is 64
- seconds. Once enough consecutive retries have occurred that the
- interval has grown to 64 seconds, the interval will then stay at
- 64 seconds.
- </para>
- <!--h3--></section>
-
- <section role="h3" id="UsingBrokerFederation-DurableLinksandRoutes"><title>
- Durable
- Links and Routes
- </title>
- <para>
- If, when a link or a route is created using qpid-route, the
- --durable option is used, it shall be durable. This
- means that its life cycle shall span restarts of the broker. If
- the broker is shut down, when it is restarted, the link will be
- restored and will begin establishing connectivity.
- </para><para>
- A non-durable route can be created for a durable link but a
- durable route cannot be created for a non-durable link.
- </para>
- <programlisting>
-$ qpid-route dynamic add localhost:10003 localhost:10004 fed.topic
-$ qpid-route dynamic add localhost:10003 localhost:10004 fed.topic2 --durable
-Failed: Can't create a durable route on a non-durable link
-</programlisting>
- <para>
- In the above example, a transient (non-durable) dynamic route was
- created between localhost:10003 and localhost:10004. Because
- there was no link in place, a new transient link was created. The
- second command is attempting to create a durable route over the
- same link and is rejected as illegal.
- </para>
- <!--h3--></section>
- <!--h2--></section>
-
- <section role="h2" id="UsingBrokerFederation-DynamicRouting"><title>
- Dynamic
- Routing
- </title>
- <para>
- Dynamic routing provides the simplest configuration for a network
- of brokers. When configuring dynamic routing, the administrator
- need only express the logical topology of the network (i.e. which
- pairs of brokers are connected by a unidirectional route). Queue
- configuration and bindings are handled automatically by the
- brokers in the network.
- </para><para>
- Dynamic routing uses the <emphasis>Distributed Exchange</emphasis> concept.
- From the client's point of view, all of the brokers in the
- network collectively offer a single logical exchange that behaves
- the same as a single exchange in a single broker. Each client
- connects to its local broker and can bind its queues to the
- distributed exchange and publish messages to the exchange.
- </para><para>
- When a consuming client binds a queue to the distributed
- exchange, information about that binding is propagated to the
- other brokers in the network to ensure that any messages matching
- the binding will be forwarded to the client's local broker.
- Messages published to the distributed exchange are forwarded to
- other brokers only if there are remote consumers to receive the
- messages. The dynamic binding protocol ensures that messages are
- routed only to brokers with eligible consumers. This includes
- topologies where messages must make multiple hops to reach the
- consumer.
- </para><para>
- When creating a dynamic routing network, The type and name of the
- exchange must be the same on each broker. It is <emphasis>strongly</emphasis>
- recommended that dynamic routes <emphasis>NOT</emphasis> be created using the
- standard exchanges (that is unless all messaging is intended to
- be federated).
- </para><para>
- A simple, two-broker network can be configured by creating an
- exchange on each broker then a pair of dynamic routes (one for
- each direction of message flow):
- </para><para>
- Create exchanges:
- </para>
- <programlisting>
+<section id="chap-Messaging_User_Guide-Broker_Federation">
+ <title>Broker Federation</title>
+ <para>
+ <firstterm>Broker Federation</firstterm> allows messaging networks to be defined by creating <firstterm>message routes</firstterm>, in which messages in one broker (the <firstterm>source broker</firstterm>) are automatically routed to another broker (the <firstterm>destination broker</firstterm>). These routes may be defined between exchanges in the two brokers (the <firstterm>source exchange</firstterm> and the <firstterm>destination exchange</firstterm>), or from a queue in the source broker (the <firstterm>source queue</firstterm>) to an exchange in the destination broker. Message routes are unidirectional; when bidirectional flow is needed, one route is created in each direction. Routes can be durable or transient. A durable route survives broker restarts, restoring a route as soon as both the source broker and the destination are available. If the connection to a destination is lost, messages associated with a durable route continue to accumulate on the source, so they can be retrieved when the connection is reestablished.
+ </para>
+ <para>
+ Broker Federation can be used to build large messaging networks, with many brokers, one route at a time. If network connectivity permits, an entire distributed messaging network can be configured from a single location. The rules used for routing can be changed dynamically as servers change, responsibilities change, at different times of day, or to reflect other changing conditions.
+ </para>
+ <para>
+ Broker Federation is useful in a wide variety of scenarios. Some of these have to do with functional organization; for instance, brokers may be organized by geography, service type, or priority. Here are some use cases for federation:
+ <itemizedlist>
+ <listitem>
+ <para>
+ Geography: Customer requests may be routed to a processing location close to the customer.
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ Service Type: High value customers may be routed to more responsive servers.
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ Load balancing: Routing among brokers may be changed dynamically to account for changes in actual or anticipated load.
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ High Availability: Routing may be changed to a new broker if an existing broker becomes unavailable.
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ WAN Connectivity: Federated routes may connect disparate locations across a wide area network, while clients connect to brokers on their own local area network. Each broker can provide persistent queues that can hold messages even if there are gaps in WAN connectivity.
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ Functional Organization: The flow of messages among software subsystems can be configured to mirror the logical structure of a distributed application.
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ Replicated Exchanges: High-function exchanges like the XML exchange can be replicated to scale performance.
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ Interdepartmental Workflow: The flow of messages among brokers can be configured to mirror interdepartmental workflow at an organization.
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+
+ </para>
+ <section id="sect-Messaging_User_Guide-Broker_Federation-Message_Routes">
+ <title>Message Routes</title>
+ <para>
+ Broker Federation is done by creating message routes. The destination for a route is always an exchange on the destination broker. By default, a message route is created by configuring the destination broker, which then contacts the source broker to subscribe to the source queue. This is called a <firstterm>pull route</firstterm>. It is also possible to create a route by configuring the source broker, which then contacts the destination broker in order to send messages. This is called a <firstterm>push route</firstterm>, and is particularly useful when the destination broker may not be available at the time the messaging route is configured, or when a large number of routes are created with the same destination exchange.
+ </para>
+ <para>
+ The source for a route can be either an exchange or a queue on the source broker. If a route is between two exchanges, the routing criteria can be given explicitly, or the bindings of the destination exchange can be used to determine the routing criteria. To support this functionality, there are three kinds of message routes: queue routes, exchange routes, and dynamic exchange routes.
+ </para>
+ <section id="sect-Messaging_User_Guide-Message_Routes-Queue_Routes">
+ <title>Queue Routes</title>
+ <para>
+ <firstterm>Queue Routes</firstterm> route all messages from a source queue to a destination exchange. If message acknowledgement is enabled, messages are removed from the queue when they have been received by the destination exchange; if message acknowledgement is off, messages are removed from the queue when sent.
+ </para>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-Message_Routes-Exchange_Routes">
+ <title>Exchange Routes</title>
+ <para>
+ <firstterm>Exchange routes</firstterm> route messages from a source exchange to a destination exchange, using a binding key (which is optional for a fanout exchange).
+ </para>
+ <para>
+ Internally, creating an exchange route creates a private queue (auto-delete, exclusive) on the source broker to hold messages that are to be routed to the destination broker, binds this private queue to the source broker exchange, and subscribes the destination broker to the queue.
+ </para>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-Message_Routes-Dynamic_Exchange_Routes">
+ <title>Dynamic Exchange Routes</title>
+ <para>
+ Dynamic exchange routes allow a client to create bindings to an exchange on one broker, and receive messages that satisfy the conditions of these bindings not only from the exchange to which the client created the binding, but also from other exchanges that are connected to it using dynamic exchange routes. If the client modifies the bindings for a given exchange, they are also modified for dynamic exchange routes associated with that exchange.
+ </para>
+ <para>
+ <firstterm>Dynamic exchange routes</firstterm> apply all the bindings of a destination exchange to a source exchange, so that any message that would match one of these bindings is routed to the destination exchange. If bindings are added or removed from the destination exchange, these changes are reflected in the dynamic exchange route -- when the destination broker creates a binding with a given binding key, this is reflected in the route, and when the destination broker drops a binding with a binding key, the route no longer incurs the overhead of transferring messages that match the binding key among brokers. If two exchanges have dynamic exchange routes to each other, then all bindings in each exchange are reflected in the dynamic exchange route of the other. In a dynamic exchange route, the source and destination exchanges must have the same exchange type, and they must have the same name; for instance, if the source exchange is a direct exchange, the destination exchange must also be a direct exchange, and the names must match.
+ </para>
+ <para>
+ Internally, dynamic exchange routes are implemented in the same way as exchange routes, except that the bindings used to implement dynamic exchange routes are modified if the bindings in the destination exchange change.
+ </para>
+ <para>
+ A dynamic exchange route is always a pull route. It can never be a push route.
+ </para>
+
+ </section>
+
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-Broker_Federation-Federation_Topologies">
+ <title>Federation Topologies</title>
+ <para>
+ A federated network is generally a tree, star, or line, using bidirectional links (implemented as a pair of unidirectional links) between any two brokers. A ring topology is also possible, if only unidirectional links are used.
+ </para>
+ <para>
+ Every message transfer takes time. For better performance, you should minimize the number of brokers between the message origin and final destination. In most cases, tree or star topologies do this best.
+ </para>
+ <para>
+ For any pair of nodes A,B in a federated network, there should be only one path from A to B. If there is more than one path, message loops can cause duplicate message transmission and flood the federated network. The topologies discussed above do not have message loops. A ring topology with bidirectional links is one example of a topology that does cause this problem, because a given broker can receive the same message from two different brokers. Mesh topologies can also cause this problem.
+ </para>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-Broker_Federation-Federation_among_High_Availability_Message_Clusters">
+ <title>Federation among High Availability Message Clusters</title>
+ <para>
+ Federation is generally used together with High Availability Message Clusters, using clusters to provide high availability on each LAN, and federation to route messages among the clusters. Because message state is replicated within a cluster, it makes little sense to define message routes between brokers in the same cluster.
+ </para>
+ <para>
+ To create a message route between two clusters, simply create a route between any one broker in the first cluster and any one broker in the second cluster. Each broker in a given cluster can use message routes defined for another broker in the same cluster. If the broker for which a message route is defined should fail, another broker in the same cluster can restore the message route.
+ </para>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-Broker_Federation-The_qpid_route_Utility">
+ <title>The qpid-route Utility</title>
+ <para>
+ <command>qpid-route</command> 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 <command>qpid-route</command> can connect to.
+ </para>
+ <para>
+ The syntax of <command>qpid-route</command> is as follows:
+ </para>
+
+<screen>
+qpid-route [OPTIONS] dynamic add &#60;dest-broker&#62; &#60;src-broker&#62; &#60;exchange&#62;
+qpid-route [OPTIONS] dynamic del &#60;dest-broker&#62; &#60;src-broker&#62; &#60;exchange&#62;
+
+qpid-route [OPTIONS] route add &#60;dest-broker&#62; &#60;src-broker&#62; &#60;exchange&#62; &#60;routing-key&#62;
+qpid-route [OPTIONS] route del &#60;dest-broker&#62; &#60;src-broker&#62; &#60;exchange&#62; &#60;routing-key&#62;
+
+qpid-route [OPTIONS] queue add &#60;dest-broker&#62; &#60;src-broker&#62; &#60;dest-exchange&#62; &#60;src-queue&#62;
+qpid-route [OPTIONS] queue del &#60;dest-broker&#62; &#60;src-broker&#62; &#60;dest-exchange&#62; &#60;src-queue&#62;
+
+qpid-route [OPTIONS] list [&#60;broker&#62;]
+qpid-route [OPTIONS] flush [&#60;broker&#62;]
+qpid-route [OPTIONS] map [&#60;broker&#62;]
+
+<!-- qpid-route [OPTIONS] add connection &lt;dest-broker&gt; &lt;src-broker&gt;
+qpid-route [OPTIONS] del connection &lt;dest-broker&gt; &lt;src-broker&gt; -->
+qpid-route [OPTIONS] list connections [&#60;broker&#62;]
+</screen>
+ <para>
+ The syntax for <command>broker</command>, <command>dest-broker</command>, and <command>src-broker</command> is as follows:
+ </para>
+
+<screen>
+[username/password@] hostname | ip-address [:&#60;port&#62;]
+</screen>
+ <para>
+ The following are all valid examples of the above syntax: <command>localhost</command>, <command>10.1.1.7:10000</command>, <command>broker-host:10000</command>, <command>guest/guest@localhost</command>.
+ </para>
+ <para>
+ These are the options for <command>qpid-route</command>:
+ </para>
+ <table frame="all" id="tabl-Messaging_User_Guide-The_qpid_route_Utility-qpid_route_options">
+ <title><command>qpid-route</command> options</title>
+ <tgroup align="left" cols="2" colsep="1" rowsep="1">
+ <colspec colname="c1"></colspec>
+ <colspec colname="c2"></colspec>
+ <!-- <thead>
+ <row>
+ <entry align="center" nameend="c2" namest="c1">
+ Options for using <command>qpid-route</command> to Manage Federation
+ </entry>
+ </row>
+ </thead>
+ --> <tbody>
+ <row>
+ <entry>
+ <command>-v</command>
+ </entry>
+ <entry>
+ Verbose output.
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ <command>-q</command>
+ </entry>
+ <entry>
+ Quiet output, will not print duplicate warnings.
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ <command>-d</command>
+ </entry>
+ <entry>
+ Make the route durable.
+ </entry>
+
+ </row>
+ <!--
+ <row>
+ <entry>
+ <command>-e</command>
+ </entry>
+ <entry>
+ Delete link after deleting the last route on the link.
+ </entry>
+ </row> --> <row>
+ <entry>
+ <command> --timeout N</command>
+ </entry>
+ <entry>
+ Maximum time to wait when qpid-route connects to a broker, in seconds. Default is 10 seconds.
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ <command>--ack N</command>
+ </entry>
+ <entry>
+ Acknowledge transfers of routed messages in batches of N. Default is 0 (no acknowledgements). Setting to 1 or greater enables acknowledgements; when using acknowledgements, values of N greater than 1 can significnantly improve performance, especially if there is significant network latency between the two brokers.
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ <command>-s [ --src-local ]</command>
+ </entry>
+ <entry>
+ Configure the route in the source broker (create a push route).
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ <command>-t &#60;transport&#62; [ --transport &#60;transport&#62;]</command>
+ </entry>
+ <entry>
+ Transport protocol to be used for the route.
+ <itemizedlist>
+ <listitem>
+ <para>
+ tcp (default)
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ ssl
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ rdma
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+
+ </entry>
+
+ </row>
+
+ </tbody>
+
+ </tgroup>
+
+ </table>
+ <section id="sect-Messaging_User_Guide-The_qpid_route_Utility-Creating_and_Deleting_Queue_Routes">
+ <title>Creating and Deleting Queue Routes</title>
+ <para>
+ The syntax for creating and deleting queue routes is as follows:
+ </para>
+
+<screen>
+qpid-route [OPTIONS] queue add &#60;dest-broker&#62; &#60;src-broker&#62; &#60;dest-exchange&#62; &#60;src-queue&#62;
+qpid-route [OPTIONS] queue del &#60;dest-broker&#62; &#60;src-broker&#62; &#60;dest-exchange&#62; &#60;src-queue&#62;
+</screen>
+ <para>
+ For instance, the following creates a queue route that routes all messages from the queue named <command>public</command> on the source broker <command>localhost:10002</command> to the <command>amq.fanout</command> exchange on the destination broker <command>localhost:10001</command>:
+ </para>
+
+<screen>
+$ qpid-route queue add localhost:10001 localhost:10002 amq.fanout public
+</screen>
+ <para>
+ If the <command>-d</command> option is specified, this queue route is persistent, and will be restored if one or both of the brokers is restarted:
+ </para>
+
+<screen>
+$ qpid-route -d queue add localhost:10001 localhost:10002 amq.fanout public
+</screen>
+ <para>
+ The <command>del</command> command takes the same arguments as the <command>add</command> command. The following command deletes the queue route described above:
+ </para>
+
+<screen>
+$ qpid-route queue del localhost:10001 localhost:10002 amq.fanout public
+</screen>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-The_qpid_route_Utility-Creating_and_Deleting_Exchange_Routes">
+ <title>Creating and Deleting Exchange Routes</title>
+ <para>
+ The syntax for creating and deleting exchange routes is as follows:
+ </para>
+
+<screen>
+qpid-route [OPTIONS] route add &#60;dest-broker&#62; &#60;src-broker&#62; &#60;exchange&#62; &#60;routing-key&#62;
+qpid-route [OPTIONS] route del &#60;dest-broker&#62; &#60;src-broker&#62; &#60;exchange&#62; &#60;routing-key&#62;
+qpid-route [OPTIONS] flush [&#60;broker&#62;]
+</screen>
+ <para>
+ For instance, the following creates an exchange route that routes messages that match the binding key <command>global.#</command> from the <command>amq.topic</command> exchange on the source broker <command>localhost:10002</command> to the <command>amq.topic</command> exchange on the destination broker <command>localhost:10001</command>:
+ </para>
+
+<screen>
+$ qpid-route route add localhost:10001 localhost:10002 amq.topic global.#
+</screen>
+ <para>
+ In many applications, messages published to the destination exchange should also be routed to the source exchange. This is accomplished by creating a second exchange route, reversing the roles of the two exchanges:
+ </para>
+
+<screen>
+$ qpid-route route add localhost:10002 localhost:10001 amq.topic global.#
+</screen>
+ <para>
+ If the <command>-d</command> option is specified, the exchange route is persistent, and will be restored if one or both of the brokers is restarted:
+ </para>
+
+<screen>
+$ qpid-route -d route add localhost:10001 localhost:10002 amq.fanout public
+</screen>
+ <para>
+ The <command>del</command> command takes the same arguments as the <command>add</command> command. The following command deletes the first exchange route described above:
+ </para>
+
+<screen>
+$ qpid-route route del localhost:10001 localhost:10002 amq.topic global.#
+</screen>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-The_qpid_route_Utility-Deleting_all_routes_for_a_broker">
+ <title>Deleting all routes for a broker</title>
+ <para>
+ Use the <command>flush</command> command to delete all routes for a given broker:
+ </para>
+
+<screen>
+qpid-route [OPTIONS] flush [&#60;broker&#62;]
+</screen>
+ <para>
+ For instance, the following command deletes all routes for the broker <command>localhost:10001</command>:
+ </para>
+
+<screen>
+$ qpid-route flush localhost:10001
+</screen>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-The_qpid_route_Utility-Creating_and_Deleting_Dynamic_Exchange_Routes">
+ <title>Creating and Deleting Dynamic Exchange Routes</title>
+ <para>
+ The syntax for creating and deleting dynamic exchange routes is as follows:
+ </para>
+
+<screen>
+qpid-route [OPTIONS] dynamic add &#60;dest-broker&#62; &#60;src-broker&#62; &#60;exchange&#62;
+qpid-route [OPTIONS] dynamic del &#60;dest-broker&#62; &#60;src-broker&#62; &#60;exchange&#62;
+</screen>
+ <para>
+ In the following examples, we will route messages from a topic exchange. We will create a new topic exchange and federate it so that we are not affected by other all clients that use the built-in <command>amq.topic</command> exchange. The following commands create a new topic exchange on each of two brokers:
+ </para>
+
+<screen>
$ qpid-config -a localhost:10003 add exchange topic fed.topic
$ qpid-config -a localhost:10004 add exchange topic fed.topic
-</programlisting>
- <para>
- Create dynamic routes:
- </para>
- <programlisting>
+</screen>
+ <para>
+ Now let&#39;s create a dynamic exchange route that routes messages from the <command>fed.topic</command> exchange on the source broker <command>localhost:10004</command> to the <command>fed.topic</command> exchange on the destination broker <command>localhost:10003</command> if they match any binding on the destination broker&#39;s <command>fed.topic</command> exchange:
+ </para>
+
+<screen>
+$ qpid-route dynamic add localhost:10003 localhost:10004 fed.topic
+</screen>
+ <para>
+ Internally, this creates a private autodelete queue on the source broker, and binds that queue to the <command>fed.topic</command> exchange on the source broker, using each binding associated with the <command>fed.topic</command> exchange on the destination broker.
+ </para>
+ <para>
+ In many applications, messages published to the destination exchange should also be routed to the source exchange. This is accomplished by creating a second dynamic exchange route, reversing the roles of the two exchanges:
+ </para>
+
+<screen>
+$ qpid-route dynamic add localhost:10004 localhost:10003 fed.topic
+</screen>
+ <para>
+ If the <command>-d</command> option is specified, the exchange route is persistent, and will be restored if one or both of the brokers is restarted:
+ </para>
+
+<screen>
+$ qpid-route -d dynamic add localhost:10004 localhost:10003 fed.topic
+</screen>
+ <para>
+ When an exchange route is durable, the private queue used to store messages for the route on the source exchange is also durable. If the connection between the brokers is lost, messages for the destination exchange continue to accumulate until it can be restored.
+ </para>
+ <para>
+ The <command>del</command> command takes the same arguments as the <command>add</command> command. The following command deletes the first exchange route described above:
+ </para>
+
+<screen>
+$ qpid-route dynamic del localhost:10004 localhost:10003 fed.topic
+</screen>
+ <para>
+ Internally, this deletes the bindings on the source exchange for the the private queues associated with the message route.
+ </para>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-The_qpid_route_Utility-Viewing_Routes">
+ <title>Viewing Routes</title>
+ <para>
+ The <command>route list</command> command shows the routes associated with an individual broker. For instance, suppose we have created the following two routes:
+ </para>
+
+<screen>
$ qpid-route dynamic add localhost:10003 localhost:10004 fed.topic
$ qpid-route dynamic add localhost:10004 localhost:10003 fed.topic
-</programlisting>
- <para>
- Information about existing routes can be gotten by querying each
- broker individually:
- </para>
- <programlisting>
+</screen>
+ <para>
+ We can now use <command>route list</command> to show all routes for the broker <command>localhost:10003</command>:
+ </para>
+
+<screen>
$ qpid-route route list localhost:10003
-localhost:10003 localhost:10004 fed.topic &lt;dynamic&gt;
+localhost:10003 localhost:10004 fed.topic &#60;dynamic&#62;
+</screen>
+ <para>
+ Note that this shows only one of the two routes we created, the route for which <command>localhost:10003</command> is a destination. If we want to see the route for which <command>localhost:10004</command> is a destination, we need to do another route list:
+ </para>
+
+<screen>
$ qpid-route route list localhost:10004
-localhost:10004 localhost:10003 fed.topic &lt;dynamic&gt;
-</programlisting>
- <para>
- A nicer way to view the topology is to use <emphasis>qpid-route route
- map</emphasis>. The argument to this command is a single broker that
- serves as an entry point. <emphasis>qpid-route</emphasis> will attempt to
- recursively find all of the brokers involved in federation
- relationships with the starting broker and map all of the routes
- it finds.
- </para>
- <programlisting>
+localhost:10004 localhost:10003 fed.topic &#60;dynamic&#62;
+</screen>
+ <para>
+ The <command>route map</command> 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:
+ </para>
+
+<screen>
$ qpid-route route map localhost:10003
Finding Linked Brokers:
@@ -278,427 +500,162 @@ Finding Linked Brokers:
Dynamic Routes:
Exchange fed.topic:
- localhost:10004 &lt;=&gt; localhost:10003
+ localhost:10004 &#60;=&#62; localhost:10003
Static Routes:
none found
-</programlisting>
- <para>
- More extensive and realistic examples are supplied later in this
- document.
- </para>
- <!--h2--></section>
-
- <section role="h2" id="UsingBrokerFederation-StaticRouting"><title>
- Static Routing
- </title>
- <para>
- Dynamic routing provides simple, efficient, and automatic
- handling of the bindings that control routing as long as the
- configuration keeps within a set of constraints (i.e. exchanges
- of the same type and name, bidirectional traffic flow, etc.).
- However, there are scenarios where it is useful for the
- administrator to have a bit more control over the details. In
- these cases, static routing is appropriate.
- </para>
-
- <section role="h3" id="UsingBrokerFederation-ExchangeRoutes"><title>
- Exchange
- Routes
- </title>
- <para>
- An exchange route is like a dynamic route except that the
- exchange binding is statically set at creation time instead of
- dynamically tracking changes in the network.
- </para><para>
- When an exchange route is created, a private queue (auto-delete,
- exclusive) is declared on the source broker. The queue is bound
- to the indicated exchange with the indicated key and the
- destination broker subscribes to the queue with a destination of
- the indicated exchange. Since only one exchange name is supplied,
- this means that exchange routes require that the source and
- destination exchanges have the same name.
- </para><para>
- Static exchange routes are added and deleted using <emphasis>qpid-route
- route add</emphasis> and <emphasis>qpid-route route del</emphasis> respectively. The
- following example creates a static exchange route with a binding
- key of "global.#" on the default topic exchange:
- </para>
- <programlisting>
-$ qpid-route route add localhost:10001 localhost:10002 amq.topic global.#
-</programlisting>
- <para>
- The route can be viewed by querying the originating broker (the
- destination in this case, see discussion of push and pull routes
- for more on this):
- </para>
- <programlisting>
-$ qpid-route route list localhost:10001
-localhost:10001 localhost:10002 amq.topic global.#
-</programlisting>
- <para>
- Alternatively, the <emphasis>route map</emphasis> feature can be used to view
- the topology:
- </para>
- <programlisting>
-$ qpid-route route map localhost:10001
+</screen>
+ <para>
+ Note that the two dynamic exchange links are displayed as though they were one bidirectional link. The <command>route map</command> command is particularly helpful for larger, more complex networks. Let&#39;s configure a somewhat more complex network with 16 dynamic exchange routes:
+ </para>
+
+<screen>
+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
+</screen>
+ <para>
+ Now we can use <command>route map</command> starting with any one broker, and see the entire network:
+ </para>
+
+<screen>
+$ ./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:
- none found
+
+ Exchange fed.topic:
+ localhost:10002 &#60;=&#62; localhost:10001
+ localhost:10003 &#60;=&#62; localhost:10002
+ localhost:10004 &#60;=&#62; localhost:10002
+ localhost:10005 &#60;=&#62; localhost:10002
+ localhost:10006 &#60;=&#62; localhost:10005
+ localhost:10007 &#60;=&#62; localhost:10006
+ localhost:10008 &#60;=&#62; localhost:10006
Static Routes:
+ none found
+</screen>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-The_qpid_route_Utility-Resilient_Connections">
+ <title>Resilient Connections</title>
+ <para>
+ When a broker route is created, or when a durable broker route is restored after broker restart, a connection is created between the source broker and the destination broker. The connections used between brokers are called <firstterm>resilient connections</firstterm>; if the connection fails due to a communication error, it attempts to reconnect. The retry interval begins at 2 seconds and, as more attempts are made, grows to 64 seconds, and continues to retry every 64 seconds thereafter. If the connection fails due to an authentication problem, it will not continue to retry.
+ </para>
+ <para>
+ The command <command>list connections</command> can be used to show the resilient connections for a broker:
+ </para>
+
+<screen>
+$ qpid-route list connections localhost:10001
- localhost:10001(ex=amq.topic) &lt;= localhost:10002(ex=amq.topic) key=global.#
-</programlisting>
- <para>
- This example causes messages delivered to the <emphasis>amq.topic</emphasis>
- exchange on broker <emphasis>localhost:10002</emphasis> that have a key that
- matches <emphasis>global.#</emphasis> (i.e. starts with the string "global.")
- to be delivered to the <emphasis>amq.topic</emphasis> exchange on broker
- <emphasis>localhost:10001</emphasis>. This delivery will occur regardless of
- whether there are any consumers on <emphasis>localhost:10001</emphasis> that
- will receive the messages.
- </para><para>
- Note that this is a uni-directional route. No messages will be
- forwarded in the opposite direction unless another static route
- is created in the other direction.
- </para><para>
- The following diagram illustrates the result, in terms of AMQP
- objects, of the example static exchange route. In this diagram,
- the exchanges, both named "amq.topic" exist prior to the creation
- of the route. The creation of the route causes the private queue,
- the binding, and the subscription of the queue to the destination
- to be created.
- </para>
- <programlisting>
- -------------------------------------------------+ +------------------------
- localhost:10002 | | localhost:10001
- | |
- +-------------+ | | +-------------+
- | | | | | |
- | | global.# ---------------+ | | | |
- | amq.topic |-----------&gt; private queue |---------------&gt;| amq.topic |
- | | ---------------+ | | | |
- | | | | | |
- +-------------+ | | +-------------+
- | |
- | |
- -------------------------------------------------+ +------------------------
-</programlisting>
-<!--h3--></section>
-
- <section role="h3" id="UsingBrokerFederation-QueueRoutes"><title>
- Queue Routes
- </title>
- <para>
- A queue route causes the destination broker to create a
- subscription to a pre-existing, possibly shared, queue on the
- source broker. There's no requirement that the queue be bound to
- any particular exchange. Queue routes can be used to connect
- exchanges of different names and/or types. They can also be used
- to distribute or balance traffic across multiple destination
- brokers.
- </para><para>
- Queue routes are created and deleted using the <emphasis>qpid-route
- queue add</emphasis> and <emphasis>qpid-route queue del</emphasis> commands
- respectively. The following example creates a static queue route
- to a public queue called "public" that feeds the amq.fanout
- exchange on the destination:
- </para><para>
- Create a queue on the source broker:
- </para>
- <programlisting>
-$ qpid-config -a localhost:10002 add queue public
-</programlisting>
- <para>
- Create a queue route to the new queue
- </para>
- <programlisting>
-$ qpid-route queue add localhost:10001 localhost:10002 amq.fanout public
-</programlisting>
- <!--h3--></section>
- <section role="h3" id="UsingBrokerFederation-Pullvs.PushRoutes"><title>
- Pull vs.
- Push Routes
- </title>
- <para>
- When qpid-route creates or deletes a route, it establishes a
- connection to one of the brokers involved in the route and
- configures that broker. The configured broker then takes it upon
- itself to contact the other broker and exchange whatever
- information is needed to complete the setup of the route.
- </para><para>
- The notion of <emphasis>push</emphasis> vs. <emphasis>pull</emphasis> is concerned with
- whether the configured broker is the source or the destination.
- The normal case is the pull route, where qpid-route configures
- the destination to pull messages from the source. A push route
- occurs when qpid-route configures the source to push messages to
- the destination.
- </para><para>
- Dynamic routes are always pull routes. Static routes are normally
- pull routes but may be inverted by using the src-local
- option when creating (or deleting) a route. If src-local
- is specified, qpid-route will make its connection to the source
- broker rather than the destination and configure the route to
- push rather than pull.
- </para><para>
- Push routes are useful in applications where brokers are
- co-resident with data sources and are configured to send data to
- a central broker. Rather than configure the central broker for
- each source, the sources can be configured to send to the
- destination.
- </para>
- <!--h3--></section>
- <!--h2--></section>
-
- <section role="h2" id="UsingBrokerFederation-qpidrouteSummaryandOptions"><title>
- qpid-route
- Summary and Options
- </title>
-
- <programlisting>
-$ qpid-route
-Usage: qpid-route [OPTIONS] dynamic add &lt;dest-broker&gt; &lt;src-broker&gt; &lt;exchange&gt; [tag] [exclude-list]
- qpid-route [OPTIONS] dynamic del &lt;dest-broker&gt; &lt;src-broker&gt; &lt;exchange&gt;
-
- qpid-route [OPTIONS] route add &lt;dest-broker&gt; &lt;src-broker&gt; &lt;exchange&gt; &lt;routing-key&gt; [tag] [exclude-list]
- qpid-route [OPTIONS] route del &lt;dest-broker&gt; &lt;src-broker&gt; &lt;exchange&gt; &lt;routing-key&gt;
- qpid-route [OPTIONS] queue add &lt;dest-broker&gt; &lt;src-broker&gt; &lt;exchange&gt; &lt;queue&gt;
- qpid-route [OPTIONS] queue del &lt;dest-broker&gt; &lt;src-broker&gt; &lt;exchange&gt; &lt;queue&gt;
- qpid-route [OPTIONS] route list [&lt;dest-broker&gt;]
- qpid-route [OPTIONS] route flush [&lt;dest-broker&gt;]
- qpid-route [OPTIONS] route map [&lt;broker&gt;]
-
- qpid-route [OPTIONS] link add &lt;dest-broker&gt; &lt;src-broker&gt;
- qpid-route [OPTIONS] link del &lt;dest-broker&gt; &lt;src-broker&gt;
- qpid-route [OPTIONS] link list [&lt;dest-broker&gt;]
-
-Options:
- --timeout seconds (10) Maximum time to wait for broker connection
- -v [ --verbose ] Verbose output
- -q [ --quiet ] Quiet output, don't print duplicate warnings
- -d [ --durable ] Added configuration shall be durable
- -e [ --del-empty-link ] Delete link after deleting last route on the link
- -s [ --src-local ] Make connection to source broker (push route)
- --ack N Acknowledge transfers over the bridge in batches of N
- -t &lt;transport&gt; [ --transport &lt;transport&gt;]
- Specify transport to use for links, defaults to tcp
-
- dest-broker and src-broker are in the form: [username/password@] hostname | ip-address [:&lt;port&gt;]
- ex: localhost, 10.1.1.7:10000, broker-host:10000, guest/guest@localhost
-</programlisting>
- <para>
- There are several transport options available for the federation
- link:
- </para><table><title>Transport Options for Federation</title><tgroup cols="2">
- <tbody>
- <row>
- <entry>
- Transport
- </entry>
- <entry>
- Description
- </entry>
- </row>
- <row>
- <entry>
- tcp
- </entry>
- <entry>
- (default) A cleartext TCP connection
- </entry>
- </row>
- <row>
- <entry>
- ssl
- </entry>
- <entry>
- A secure TLS/SSL over TCP connection
- </entry>
- </row>
- <row>
- <entry>
- rdma
- </entry>
- <entry>
- A Connection using the RDMA interface (typically for an
- Infiniband network)
- </entry>
- </row>
- </tbody>
- </tgroup></table><para>
- The <emphasis>tag</emphasis> and <emphasis>exclude-list</emphasis> arguments are not
- needed. They have been left in place for backward compatibility
- and for advanced users who might have very unusual requirements.
- If you're not sure if you need them, you don't. Leave them alone.
- If you must know, please refer to "Message Loop Prevention" in
- the advanced topics section below. The prevention of message
- looping is now automatic and requires no user action.
- </para><para>
- If the link between the two sites has network latency, this can
- be compensated for by increasing the ack frequency with --ack N
- to achieve better batching across the link between the two sites.
- </para>
- <!--h2--></section>
-
- <section role="h2" id="UsingBrokerFederation-Caveats-2CLimitations-2CandThingstoAvoid"><title>
- Caveats,
- Limitations, and Things to Avoid
- </title>
-
-
- <section role="h3" id="UsingBrokerFederation-RedundantPaths"><title>
- Redundant
- Paths
- </title>
- <para>
- The current implementation of federation in the M4 broker imposes
- constraints on redundancy in the topology. If there are parallel
- paths from a producer to a consumer, multiple copies of messages
- may be received.
- </para><para>
- A future release of Qpid will solve this problem by allowing
- redundant paths with cost metrics. This will allow the deployment
- of networks that are tolerant of connection or broker loss.
- </para>
- <!--h3--></section>
-
- <section role="h3" id="UsingBrokerFederation-LackofFlowControl"><title>
- Lack of
- Flow Control
- </title>
- <para>
- M4 broker federation uses unlimited flow control on the
- federation sessions. Flow control back-pressure will not be
- applied on inter-broker subscriptions.
- </para>
- <!--h3--></section>
-
-
- <section role="h3" id="UsingBrokerFederation-LackofClusterFailoverSupport"><title>
- Lack of
- Cluster Failover Support
- </title>
- <para>
- The client functionality embedded in the broker for inter-broker
- links does not currently support cluster fail-over. This will be
- added in a subsequent release.
- </para>
- <!--h3--></section>
- <!--h2--></section>
- <!--h1--></section>
-
- <section role="h1" id="UsingBrokerFederation-ExampleScenarios"><title>
- Example
- Scenarios
- </title>
-
- <section role="h2" id="UsingBrokerFederation-UsingQPIDtobridgedisjointIPnetworks"><title>
- Using
- QPID to bridge disjoint IP networks
- </title>
- <section role="h2" id="UsingBrokerFederation-Multitieredtopology"><title>
- Multi-tiered
- topology
- </title>
-
- <programlisting>
- +-----+
- | 5 |
- +-----+
- / \
- +-----+ +-----+
- | 2 | | 6 |
- +-----+ +-----+
- / | \ | \
- +-----+ +-----+ +-----+ +-----+ +-----+
- | 1 | | 3 | | 4 | | 7 | | 8 |
- +-----+ +-----+ +-----+ +-----+ +-----+
-</programlisting>
- <para>
- This topology can be configured using the following script.
- </para>
- <programlisting>
-##
-## Define URLs for the brokers
-##
-broker1=localhost:10001
-broker2=localhost:10002
-broker3=localhost:10003
-broker4=localhost:10004
-broker5=localhost:10005
-broker6=localhost:10006
-broker7=localhost:10007
-broker8=localhost:10008
-
-##
-## Create Topic Exchanges
-##
-qpid-config -a $broker1 add exchange topic fed.topic
-qpid-config -a $broker2 add exchange topic fed.topic
-qpid-config -a $broker3 add exchange topic fed.topic
-qpid-config -a $broker4 add exchange topic fed.topic
-qpid-config -a $broker5 add exchange topic fed.topic
-qpid-config -a $broker6 add exchange topic fed.topic
-qpid-config -a $broker7 add exchange topic fed.topic
-qpid-config -a $broker8 add exchange topic fed.topic
-
-##
-## Create Topic Routes
-##
-qpid-route dynamic add $broker1 $broker2 fed.topic
-qpid-route dynamic add $broker2 $broker1 fed.topic
-
-qpid-route dynamic add $broker3 $broker2 fed.topic
-qpid-route dynamic add $broker2 $broker3 fed.topic
-
-qpid-route dynamic add $broker4 $broker2 fed.topic
-qpid-route dynamic add $broker2 $broker4 fed.topic
-
-qpid-route dynamic add $broker2 $broker5 fed.topic
-qpid-route dynamic add $broker5 $broker2 fed.topic
-
-qpid-route dynamic add $broker5 $broker6 fed.topic
-qpid-route dynamic add $broker6 $broker5 fed.topic
-
-qpid-route dynamic add $broker6 $broker7 fed.topic
-qpid-route dynamic add $broker7 $broker6 fed.topic
-
-qpid-route dynamic add $broker6 $broker8 fed.topic
-qpid-route dynamic add $broker8 $broker6 fed.topic
-</programlisting>
- <!--h2--></section>
- <section role="h2" id="UsingBrokerFederation-Loadsharingacrossbrokers"><title>
- Load-sharing
- across brokers
- </title>
- <para/>
- <!--h2--></section> <!-- Level mixing in original - this is intentional -->
- <!--h2--></section>
- <!--h1--></section>
-
- <section role="h1" id="UsingBrokerFederation-AdvancedTopics"><title>
- Advanced
- Topics
- </title>
- <section role="h2" id="UsingBrokerFederation-FederationQueueNaming"><title>
- Federation
- Queue Naming
- </title>
- <para/>
- <!--h2--></section>
- <section role="h2" id="UsingBrokerFederation-MessageLoopPrevention"><title>
- Message
- Loop Prevention
- </title>
- <para/>
- <!--h2--></section>
-<!--h1-->
- </section>
-
+Host Port Transport Durable State Last Error
+=============================================================================
+localhost 10002 tcp N Operational
+localhost 10003 tcp N Operational
+localhost 10009 tcp N Waiting Connection refused
+</screen>
+ <para>
+ In the above output, <command>Last Error</command> contains the string representation of the last connection error received for the connection. <command>State</command> represents the state of the connection, and may be one of the following values:
+ </para>
+ <table id="tabl-Messaging_User_Guide-Resilient_Connections-State_values_in_qpid_route_list_connections">
+ <title>State values in <command>$ qpid-route list connections</command></title>
+ <tgroup align="left" cols="2" colsep="1" rowsep="1">
+ <tbody>
+ <row>
+ <entry>
+ Waiting
+ </entry>
+ <entry>
+ Waiting before attempting to reconnect.
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ Connecting
+ </entry>
+ <entry>
+ Attempting to establish the connection.
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ Operational
+ </entry>
+ <entry>
+ The connection has been established and can be used.
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ Failed
+ </entry>
+ <entry>
+ The connection failed and will not retry (usually because authentication failed).
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ Closed
+ </entry>
+ <entry>
+ The connection has been closed and will soon be deleted.
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ Passive
+ </entry>
+ <entry>
+ 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.
+ </entry>
+
+ </row>
+
+ </tbody>
+
+ </tgroup>
+
+ </table>
+
+ </section>
+
+
+ </section>
+
</section>
+