qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject svn commit: r1688840 [12/15] - in /qpid/site: ./ docs/ docs/components/cpp-broker/ docs/components/messaging-api/ docs/releases/ docs/releases/qpid-cpp-0.34/ docs/releases/qpid-cpp-0.34/cpp-broker/ docs/releases/qpid-cpp-0.34/cpp-broker/book/ docs/rele...
Date Thu, 02 Jul 2015 14:53:55 GMT
Added: qpid/site/input/releases/qpid-cpp-0.34/cpp-broker/book/chap-Messaging_User_Guide-Broker_Federation.html.in
URL: http://svn.apache.org/viewvc/qpid/site/input/releases/qpid-cpp-0.34/cpp-broker/book/chap-Messaging_User_Guide-Broker_Federation.html.in?rev=1688840&view=auto
==============================================================================
--- qpid/site/input/releases/qpid-cpp-0.34/cpp-broker/book/chap-Messaging_User_Guide-Broker_Federation.html.in
(added)
+++ qpid/site/input/releases/qpid-cpp-0.34/cpp-broker/book/chap-Messaging_User_Guide-Broker_Federation.html.in
Thu Jul  2 14:53:53 2015
@@ -0,0 +1,348 @@
+<div class="docbook"><div class="navheader"><table summary="Navigation header"
width="100%"><tr><th align="center" colspan="3">1.4.&#160;Broker Federation</th></tr><tr><td
align="left" width="20%"><a accesskey="p" href="ch01s03.html">Prev</a>&#160;</td><th
align="center" width="60%">Chapter&#160;1.&#160;
+      Running the AMQP Messaging Broker
+    </th><td align="right" width="20%">&#160;<a accesskey="n" href="chap-Messaging_User_Guide-Security.html">Next</a></td></tr></table><hr
/></div><div class="section"><div class="titlepage"><div><div><h2
class="title"><a id="chap-Messaging_User_Guide-Broker_Federation"></a>1.4.&#160;Broker
Federation</h2></div></div></div><p>
+    <em class="firstterm">Broker Federation</em> allows messaging networks to
be defined by creating <em class="firstterm">message routes</em>, in which messages
in one broker (the <em class="firstterm">source broker</em>) are automatically
routed to another broker (the <em class="firstterm">destination broker</em>).
These routes may be defined between exchanges in the two brokers (the <em class="firstterm">source
exchange</em> and the <em class="firstterm">destination exchange</em>),
or from a queue in the source broker (the <em class="firstterm">source queue</em>)
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.
+  </p><p>
+    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.
+  </p><p>
+    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:
+    </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li
class="listitem"><p>
+	  Geography: Customer requests may be routed to a processing location close to the customer.
+	</p></li><li class="listitem"><p>
+	  Service Type: High value customers may be routed to more responsive servers.
+	</p></li><li class="listitem"><p>
+	  Load balancing: Routing among brokers may be changed dynamically to account for changes
in actual or anticipated load.
+	</p></li><li class="listitem"><p>
+	  High Availability: Routing may be changed to a new broker if an existing broker becomes
unavailable.
+	</p></li><li class="listitem"><p>
+	  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.
+	</p></li><li class="listitem"><p>
+	  Functional Organization: The flow of messages among software subsystems can be configured
to mirror the logical structure of a distributed application.
+	</p></li><li class="listitem"><p>
+	  Replicated Exchanges: High-function exchanges like the XML exchange can be replicated
to scale performance.
+	</p></li><li class="listitem"><p>
+	  Interdepartmental Workflow: The flow of messages among brokers can be configured to mirror
interdepartmental workflow at an organization.
+	</p></li></ul></div><p>
+
+  </p><div class="section"><div class="titlepage"><div><div><h3
class="title"><a id="sect-Messaging_User_Guide-Broker_Federation-Message_Routes"></a>1.4.1.&#160;Message
Routes</h3></div></div></div><p>
+      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 <em class="firstterm">pull route</em>. 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 <em class="firstterm">push route</em>,
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.
+    </p><p>
+      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.
+    </p><div class="section"><div class="titlepage"><div><div><h4
class="title"><a id="sect-Messaging_User_Guide-Message_Routes-Queue_Routes"></a>1.4.1.1.&#160;Queue
Routes</h4></div></div></div><p>
+	<em class="firstterm">Queue Routes</em> 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.
+      </p></div><div class="section"><div class="titlepage"><div><div><h4
class="title"><a id="sect-Messaging_User_Guide-Message_Routes-Exchange_Routes"></a>1.4.1.2.&#160;Exchange
Routes</h4></div></div></div><p>
+	<em class="firstterm">Exchange routes</em> route messages from a source exchange
to a destination exchange, using a binding key (which is optional for a fanout exchange).
+      </p><p>
+	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.
+      </p></div><div class="section"><div class="titlepage"><div><div><h4
class="title"><a id="sect-Messaging_User_Guide-Message_Routes-Dynamic_Exchange_Routes"></a>1.4.1.3.&#160;Dynamic
Exchange Routes</h4></div></div></div><p>
+	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.
+      </p><p>
+	<em class="firstterm">Dynamic exchange routes</em> 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.
+      </p><p>
+	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.
+      </p><p>
+	A dynamic exchange route is always a pull route. It can never be a push route.
+      </p></div></div><div class="section"><div class="titlepage"><div><div><h3
class="title"><a id="sect-Messaging_User_Guide-Broker_Federation-Federation_Topologies"></a>1.4.2.&#160;Federation
Topologies</h3></div></div></div><p>
+      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.
+    </p><p>
+      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.
+    </p><p>
+      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.
+    </p></div><div class="section"><div class="titlepage"><div><div><h3
class="title"><a id="sect-Messaging_User_Guide-Broker_Federation-Federation_among_High_Availability_Message_Clusters"></a>1.4.3.&#160;Federation
among High Availability Message Clusters</h3></div></div></div><p>
+      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.
+    </p><p>
+      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.
+    </p></div><div class="section"><div class="titlepage"><div><div><h3
class="title"><a id="sect-Messaging_User_Guide-Broker_Federation-The_qpid_route_Utility"></a>1.4.4.&#160;The
qpid-route Utility</h3></div></div></div><p>
+      <span class="command"><strong>qpid-route</strong></span> 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 <span
class="command"><strong>qpid-route</strong></span> can connect to.
+    </p><p>
+      The syntax of <span class="command"><strong>qpid-route</strong></span>
is as follows:
+    </p><pre class="screen">
+      qpid-route [OPTIONS] dynamic add &lt;dest-broker&gt; &lt;src-broker&gt;
&lt;exchange&gt;
+      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;
+      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;dest-exchange&gt;  &lt;src-queue&gt;
+      qpid-route [OPTIONS] queue del &lt;dest-broker&gt; &lt;src-broker&gt;
&lt;dest-exchange&gt;  &lt;src-queue&gt;
+
+      qpid-route [OPTIONS] list  [&lt;broker&gt;]
+      qpid-route [OPTIONS] flush [&lt;broker&gt;]
+      qpid-route [OPTIONS] map   [&lt;broker&gt;]
+
+      
+      qpid-route [OPTIONS] list connections [&lt;broker&gt;]
+    </pre><p>
+      The syntax for <span class="command"><strong>broker</strong></span>,
<span class="command"><strong>dest-broker</strong></span>, and <span
class="command"><strong>src-broker</strong></span> is as follows:
+    </p><pre class="screen">
+      [username/password@] hostname | ip-address [:&lt;port&gt;]
+    </pre><p>
+      The following are all valid examples of the above syntax: <span class="command"><strong>localhost</strong></span>,
<span class="command"><strong>10.1.1.7:10000</strong></span>, <span
class="command"><strong>broker-host:10000</strong></span>, <span class="command"><strong>guest/guest@localhost</strong></span>.
+    </p><p>
+      These are the options for <span class="command"><strong>qpid-route</strong></span>:
+    </p><div class="table"><a id="tabl-Messaging_User_Guide-The_qpid_route_Utility-qpid_route_options"></a><p
class="title"><strong>Table&#160;1.9.&#160;<span class="command">qpid-route</span>
options</strong></p><div class="table-contents"><table border="1" summary="qpid-route
options"><colgroup><col align="left" class="c1" /><col align="left" class="c2"
/></colgroup><tbody><tr><td align="left">
+	      <span class="command"><strong>-v</strong></span>
+	    </td><td align="left">
+	      Verbose output.
+	    </td></tr><tr><td align="left">
+	      <span class="command"><strong>-q</strong></span>
+	    </td><td align="left">
+	      Quiet output, will not print duplicate warnings.
+	    </td></tr><tr><td align="left">
+	      <span class="command"><strong>-d</strong></span>
+	    </td><td align="left">
+	      Make the route durable.
+	    </td></tr><tr><td align="left">
+	      <span class="command"><strong> --timeout N</strong></span>
+	    </td><td align="left">
+	      Maximum time to wait when qpid-route connects to a broker, in seconds. Default is
10 seconds.
+	    </td></tr><tr><td align="left">
+	      <span class="command"><strong>--ack N</strong></span>
+	    </td><td align="left">
+	      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.
+	    </td></tr><tr><td align="left">
+	      <span class="command"><strong>-s [ --src-local ]</strong></span>
+	    </td><td align="left">
+	      Configure the route in the source broker (create a push route).
+	    </td></tr><tr><td align="left">
+	      <span class="command"><strong>-t &lt;transport&gt; [ --transport
&lt;transport&gt;]</strong></span>
+	    </td><td align="left">
+	      Transport protocol to be used for the route.
+	      <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li
class="listitem"><p>
+		    tcp (default)
+		  </p></li><li class="listitem"><p>
+		    ssl
+		  </p></li><li class="listitem"><p>
+		    rdma
+		  </p></li></ul></div>
+
+	    </td></tr></tbody></table></div></div><br class="table-break"
/><div class="section"><div class="titlepage"><div><div><h4
class="title"><a id="sect-Messaging_User_Guide-The_qpid_route_Utility-Creating_and_Deleting_Queue_Routes"></a>1.4.4.1.&#160;Creating
and Deleting Queue Routes</h4></div></div></div><p>
+	The syntax for creating and deleting queue routes is as follows:
+      </p><pre class="screen">
+	qpid-route [OPTIONS] queue add &lt;dest-broker&gt; &lt;src-broker&gt; &lt;dest-exchange&gt;
&lt;src-queue&gt;
+	qpid-route [OPTIONS] queue del &lt;dest-broker&gt; &lt;src-broker&gt; &lt;dest-exchange&gt;
&lt;src-queue&gt;
+      </pre><p>
+	For instance, the following creates a queue route that routes all messages from the queue
named <span class="command"><strong>public</strong></span> on the
source broker <span class="command"><strong>localhost:10002</strong></span>
to the <span class="command"><strong>amq.fanout</strong></span> exchange
on the destination broker <span class="command"><strong>localhost:10001</strong></span>:
+      </p><pre class="screen">
+	$ qpid-route queue add localhost:10001 localhost:10002 amq.fanout public
+      </pre><p>
+	If the <span class="command"><strong>-d</strong></span> option is
specified, this queue route is persistent, and will be restored if one or both of the brokers
is restarted:
+      </p><pre class="screen">
+	$ qpid-route -d queue add localhost:10001 localhost:10002 amq.fanout public
+      </pre><p>
+	The <span class="command"><strong>del</strong></span> command takes
the same arguments as the <span class="command"><strong>add</strong></span>
command. The following command deletes the queue route described above:
+      </p><pre class="screen">
+	$ qpid-route queue del localhost:10001 localhost:10002 amq.fanout public
+      </pre></div><div class="section"><div class="titlepage"><div><div><h4
class="title"><a id="sect-Messaging_User_Guide-The_qpid_route_Utility-Creating_and_Deleting_Exchange_Routes"></a>1.4.4.2.&#160;Creating
and Deleting Exchange Routes</h4></div></div></div><p>
+	The syntax for creating and deleting exchange routes is as follows:
+      </p><pre class="screen">
+	qpid-route [OPTIONS] route add &lt;dest-broker&gt; &lt;src-broker&gt; &lt;exchange&gt;
&lt;routing-key&gt;
+	qpid-route [OPTIONS] route del &lt;dest-broker&gt; &lt;src-broker&gt; &lt;exchange&gt;
&lt;routing-key&gt;
+	qpid-route [OPTIONS] flush [&lt;broker&gt;]
+      </pre><p>
+	For instance, the following creates an exchange route that routes messages that match the
binding key <span class="command"><strong>global.#</strong></span>
from the <span class="command"><strong>amq.topic</strong></span> exchange
on the source broker <span class="command"><strong>localhost:10002</strong></span>
to the <span class="command"><strong>amq.topic</strong></span> exchange
on the destination broker <span class="command"><strong>localhost:10001</strong></span>:
+      </p><pre class="screen">
+	$ qpid-route route add localhost:10001 localhost:10002 amq.topic global.#
+      </pre><p>
+	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:
+      </p><pre class="screen">
+	$ qpid-route route add localhost:10002 localhost:10001 amq.topic global.#
+      </pre><p>
+	If the <span class="command"><strong>-d</strong></span> option is
specified, the exchange route is persistent, and will be restored if one or both of the brokers
is restarted:
+      </p><pre class="screen">
+	$ qpid-route -d route add localhost:10001 localhost:10002 amq.fanout public
+      </pre><p>
+	The <span class="command"><strong>del</strong></span> command takes
the same arguments as the <span class="command"><strong>add</strong></span>
command. The following command deletes the first exchange route described above:
+      </p><pre class="screen">
+	$ qpid-route route del localhost:10001 localhost:10002 amq.topic global.#
+      </pre></div><div class="section"><div class="titlepage"><div><div><h4
class="title"><a id="sect-Messaging_User_Guide-The_qpid_route_Utility-Deleting_all_routes_for_a_broker"></a>1.4.4.3.&#160;Deleting
all routes for a broker</h4></div></div></div><p>
+	Use the <span class="command"><strong>flush</strong></span> command
to delete all routes for a given broker:
+      </p><pre class="screen">
+	qpid-route [OPTIONS] flush [&lt;broker&gt;]
+      </pre><p>
+	For instance, the following command deletes all routes for the broker <span class="command"><strong>localhost:10001</strong></span>:
+      </p><pre class="screen">
+	$ qpid-route flush localhost:10001
+      </pre></div><div class="section"><div class="titlepage"><div><div><h4
class="title"><a id="sect-Messaging_User_Guide-The_qpid_route_Utility-Creating_and_Deleting_Dynamic_Exchange_Routes"></a>1.4.4.4.&#160;Creating
and Deleting Dynamic Exchange Routes</h4></div></div></div><p>
+	The syntax for creating and deleting dynamic exchange routes is as follows:
+      </p><pre class="screen">
+	qpid-route [OPTIONS] dynamic add &lt;dest-broker&gt; &lt;src-broker&gt;
&lt;exchange&gt;
+	qpid-route [OPTIONS] dynamic del &lt;dest-broker&gt; &lt;src-broker&gt;
&lt;exchange&gt;
+      </pre><p>
+	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 <span class="command"><strong>amq.topic</strong></span>
exchange. The following commands create a new topic exchange on each of two brokers:
+      </p><pre class="screen">
+	$ qpid-config -a localhost:10003 add exchange topic fed.topic
+	$ qpid-config -a localhost:10004 add exchange topic fed.topic
+      </pre><p>
+	Now let's create a dynamic exchange route that routes messages from the <span class="command"><strong>fed.topic</strong></span>
exchange on the source broker <span class="command"><strong>localhost:10004</strong></span>
to the <span class="command"><strong>fed.topic</strong></span> exchange
on the destination broker <span class="command"><strong>localhost:10003</strong></span>
if they match any binding on the destination broker's <span class="command"><strong>fed.topic</strong></span>
exchange:
+      </p><pre class="screen">
+	$ qpid-route dynamic add localhost:10003 localhost:10004 fed.topic
+      </pre><p>
+	Internally, this creates a private autodelete queue on the source broker, and binds that
queue to the <span class="command"><strong>fed.topic</strong></span>
exchange on the source broker, using each binding associated with the <span class="command"><strong>fed.topic</strong></span>
exchange on the destination broker.
+      </p><p>
+	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:
+      </p><pre class="screen">
+	$ qpid-route dynamic add localhost:10004 localhost:10003 fed.topic
+      </pre><p>
+	If the <span class="command"><strong>-d</strong></span> option is
specified, the exchange route is persistent, and will be restored if one or both of the brokers
is restarted:
+      </p><pre class="screen">
+	$ qpid-route -d dynamic add localhost:10004 localhost:10003 fed.topic
+      </pre><p>
+	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.
+      </p><p>
+	The <span class="command"><strong>del</strong></span> command takes
the same arguments as the <span class="command"><strong>add</strong></span>
command. The following command deletes the first exchange route described above:
+      </p><pre class="screen">
+	$ qpid-route dynamic del localhost:10004 localhost:10003 fed.topic
+      </pre><p>
+	Internally, this deletes the bindings on the source exchange for the the private queues
associated with the message route.
+      </p></div><div class="section"><div class="titlepage"><div><div><h4
class="title"><a id="sect-Messaging_User_Guide-The_qpid_route_Utility-Viewing_Routes"></a>1.4.4.5.&#160;Viewing
Routes</h4></div></div></div><p>
+	The <span class="command"><strong>route list</strong></span> command
shows the routes associated with an individual broker. For instance, suppose we have created
the following two routes:
+      </p><pre class="screen">
+	$ qpid-route dynamic add localhost:10003 localhost:10004 fed.topic
+	$ qpid-route dynamic add localhost:10004 localhost:10003 fed.topic
+      </pre><p>
+	We can now use <span class="command"><strong>route list</strong></span>
to show all routes for the broker <span class="command"><strong>localhost:10003</strong></span>:
+      </p><pre class="screen">
+	$ qpid-route route list localhost:10003
+	localhost:10003 localhost:10004 fed.topic &lt;dynamic&gt;
+      </pre><p>
+	Note that this shows only one of the two routes we created, the route for which <span
class="command"><strong>localhost:10003</strong></span> is a destination.
If we want to see the route for which <span class="command"><strong>localhost:10004</strong></span>
is a destination, we need to do another route list:
+      </p><pre class="screen">
+	$ qpid-route route list localhost:10004
+	localhost:10004 localhost:10003 fed.topic &lt;dynamic&gt;
+      </pre><p>
+	The <span class="command"><strong>route map</strong></span> 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:
+      </p><pre class="screen">
+	$ qpid-route route map localhost:10003
+
+	Finding Linked Brokers:
+	localhost:10003... Ok
+	localhost:10004... Ok
+
+	Dynamic Routes:
+
+	Exchange fed.topic:
+	localhost:10004 &lt;=&gt; localhost:10003
+
+	Static Routes:
+	none found
+      </pre><p>
+	Note that the two dynamic exchange links are displayed as though they were one bidirectional
link. The <span class="command"><strong>route map</strong></span>
command is particularly helpful for larger, more complex networks. Let's configure a somewhat
more complex network with 16 dynamic exchange routes:
+      </p><pre class="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
+      </pre><p>
+	Now we can use <span class="command"><strong>route map</strong></span>
starting with any one broker, and see the entire network:
+      </p><pre class="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:
+
+	Exchange fed.topic:
+	localhost:10002 &lt;=&gt; localhost:10001
+	localhost:10003 &lt;=&gt; localhost:10002
+	localhost:10004 &lt;=&gt; localhost:10002
+	localhost:10005 &lt;=&gt; localhost:10002
+	localhost:10006 &lt;=&gt; localhost:10005
+	localhost:10007 &lt;=&gt; localhost:10006
+	localhost:10008 &lt;=&gt; localhost:10006
+
+	Static Routes:
+	none found
+      </pre></div><div class="section"><div class="titlepage"><div><div><h4
class="title"><a id="sect-Messaging_User_Guide-The_qpid_route_Utility-Resilient_Connections"></a>1.4.4.6.&#160;Resilient
Connections</h4></div></div></div><p>
+	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 <em class="firstterm">resilient connections</em>;
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.
+      </p><p>
+	The command <span class="command"><strong>list connections</strong></span>
can be used to show the resilient connections for a broker:
+      </p><pre class="screen">
+	$ qpid-route list connections localhost:10001
+
+	Host            Port    Transport Durable  State             Last Error
+	=============================================================================
+	localhost       10002   tcp          N     Operational
+	localhost       10003   tcp          N     Operational
+	localhost       10009   tcp          N     Waiting           Connection refused
+      </pre><p>
+	In the above output, <span class="command"><strong>Last Error</strong></span>
contains the string representation of the last connection error received for the connection.
<span class="command"><strong>State</strong></span> represents the
state of the connection, and may be one of the following values:
+      </p><div class="table"><a id="tabl-Messaging_User_Guide-Resilient_Connections-State_values_in_qpid_route_list_connections"></a><p
class="title"><strong>Table&#160;1.10.&#160;State values in <span class="command">$
qpid-route list connections</span></strong></p><div class="table-contents"><table
border="1" summary="State values in $ qpid-route list connections"><colgroup><col
/><col /></colgroup><tbody><tr><td align="left">
+		Waiting
+	      </td><td align="left">
+		Waiting before attempting to reconnect.
+	      </td></tr><tr><td align="left">
+		Connecting
+	      </td><td align="left">
+		Attempting to establish the connection.
+	      </td></tr><tr><td align="left">
+		Operational
+	      </td><td align="left">
+		The connection has been established and can be used.
+	      </td></tr><tr><td align="left">
+		Failed
+	      </td><td align="left">
+		The connection failed and will not retry (usually because authentication failed).
+	      </td></tr><tr><td align="left">
+		Closed
+	      </td><td align="left">
+		The connection has been closed and will soon be deleted.
+	      </td></tr><tr><td align="left">
+		Passive
+	      </td><td align="left">
+		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.
+	      </td></tr></tbody></table></div></div><br class="table-break"
/></div></div><div class="section"><div class="titlepage"><div><div><h3
class="title"><a id="federation-broker-options"></a>1.4.5.&#160;Broker
options affecting federation</h3></div></div></div><p>
+      The following broker options affect federation:
+      </p><div class="table"><a id="federation-broker-options-table"></a><p
class="title"><strong>Table&#160;1.11.&#160;Broker Options for Federation</strong></p><div
class="table-contents"><table border="1" summary="Broker Options for Federation"><colgroup><col
align="left" class="c1" /><col align="left" class="c2" /></colgroup><thead><tr><th
align="center" colspan="2">
+		Options for Federation
+	      </th></tr></thead><tbody><tr><td align="left">
+		<code class="literal">federation-tag <em class="replaceable"><code>NAME</code></em></code>
+	      </td><td align="left">
+		A unique name to identify this broker in federation network.
+		If not specified, the broker will generate a unique identifier.
+	      </td></tr><tr><td align="left">
+		<code class="literal">link-maintenance-interval <em class="replaceable"><code>SECONDS</code></em></code>
+		<a class="footnoteref" href="chapter-ha.html#ftn.ha-seconds-spec"><sup class="footnoteref">[b]</sup></a>
+	      </td><td align="left">
+		<p>
+		  Interval to check if links need to be re-connected.  Default 2
+		  seconds. Can be a sub-second interval for faster failover,
+		  e.g. 0.1 seconds.
+		</p>
+	      </td></tr><tr><td align="left">
+		<code class="literal">link-heartbeat-interval <em class="replaceable"><code>SECONDS</code></em></code>
+		<a class="footnoteref" href="chapter-ha.html#ftn.ha-seconds-spec"><sup class="footnoteref">[b]</sup></a>
+	      </td><td align="left">
+		<p>
+		  Heart-beat interval for federation links. If no heart-beat is
+		  received for twice the interval the link is considered dead.
+		  Default 120 seconds.
+		</p>
+	      </td></tr></tbody></table></div></div><p><br
class="table-break" />
+    </p></div></div><div class="navfooter"><hr /><table
summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a
accesskey="p" href="ch01s03.html">Prev</a>&#160;</td><td align="center"
width="20%"><a accesskey="u" href="ch01.html">Up</a></td><td align="right"
width="40%">&#160;<a accesskey="n" href="chap-Messaging_User_Guide-Security.html">Next</a></td></tr><tr><td
align="left" valign="top" width="40%">1.3.&#160;
+    Cheat Sheet for configuring Exchange Options
+  &#160;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td
align="right" valign="top" width="40%">&#160;1.5.&#160;Security</td></tr></table></div></div>
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message