qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmur...@apache.org
Subject [4/7] qpid-site git commit: Qpid Dispatch 1.4.0 related updates
Date Tue, 16 Oct 2018 13:35:13 GMT
http://git-wip-us.apache.org/repos/asf/qpid-site/blob/2b7a4a81/content/releases/qpid-dispatch-1.4.0/user-guide/index.html
----------------------------------------------------------------------
diff --git a/content/releases/qpid-dispatch-1.4.0/user-guide/index.html b/content/releases/qpid-dispatch-1.4.0/user-guide/index.html
new file mode 100644
index 0000000..a039422
--- /dev/null
+++ b/content/releases/qpid-dispatch-1.4.0/user-guide/index.html
@@ -0,0 +1,8004 @@
+<!DOCTYPE html>
+<!--
+ -
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements.  See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership.  The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied.  See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+  <head>
+    <title>Using Qpid Dispatch - Apache Qpid&#8482;</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <link rel="stylesheet" href="/site.css" type="text/css" async="async"/>
+    <link rel="stylesheet" href="/deferred.css" type="text/css" defer="defer"/>
+    <script type="text/javascript">var _deferredFunctions = [];</script>
+    <script type="text/javascript" src="/deferred.js" defer="defer"></script>
+    <!--[if lte IE 8]>
+      <link rel="stylesheet" href="/ie.css" type="text/css"/>
+      <script type="text/javascript" src="/html5shiv.js"></script>
+    <![endif]-->
+
+    <!-- Redirects for `go get` and godoc.org -->
+    <meta name="go-import"
+          content="qpid.apache.org git https://git-wip-us.apache.org/repos/asf/qpid-proton.git"/>
+    <meta name="go-source"
+          content="qpid.apache.org
+https://github.com/apache/qpid-proton/blob/go1/README.md
+https://github.com/apache/qpid-proton/tree/go1{/dir}
+https://github.com/apache/qpid-proton/blob/go1{/dir}/{file}#L{line}"/>
+  </head>
+  <body>
+    <div id="-content">
+      <div id="-top" class="panel">
+        <a id="-menu-link"><img width="16" height="16" src="" alt="Menu"/></a>
+
+        <a id="-search-link"><img width="22" height="16" src="" alt="Search"/></a>
+
+        <ul id="-global-navigation">
+          <li><a id="-logotype" href="/index.html">Apache Qpid<sup>&#8482;</sup></a></li>
+          <li><a href="/documentation.html">Documentation</a></li>
+          <li><a href="/download.html">Download</a></li>
+          <li><a href="/discussion.html">Discussion</a></li>
+        </ul>
+      </div>
+
+      <div id="-menu" class="panel" style="display: none;">
+        <div class="flex">
+          <section>
+            <h3>Project</h3>
+
+            <ul>
+              <li><a href="/overview.html">Overview</a></li>
+              <li><a href="/components/index.html">Components</a></li>
+              <li><a href="/releases/index.html">Releases</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Messaging APIs</h3>
+
+            <ul>
+              <li><a href="/proton/index.html">Qpid Proton</a></li>
+              <li><a href="/components/jms/index.html">Qpid JMS</a></li>
+              <li><a href="/components/messaging-api/index.html">Qpid Messaging API</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Servers and tools</h3>
+
+            <ul>
+              <li><a href="/components/broker-j/index.html">Broker-J</a></li>
+              <li><a href="/components/cpp-broker/index.html">C++ broker</a></li>
+              <li><a href="/components/dispatch-router/index.html">Dispatch router</a></li>
+            </ul>
+          </section>
+
+          <section>
+            <h3>Resources</h3>
+
+            <ul>
+              <li><a href="/dashboard.html">Dashboard</a></li>
+              <li><a href="https://cwiki.apache.org/confluence/display/qpid/Index">Wiki</a></li>
+              <li><a href="/resources.html">More resources</a></li>
+            </ul>
+          </section>
+        </div>
+      </div>
+
+      <div id="-search" class="panel" style="display: none;">
+        <form action="http://www.google.com/search" method="get">
+          <input type="hidden" name="sitesearch" value="qpid.apache.org"/>
+          <input type="text" name="q" maxlength="255" autofocus="autofocus" tabindex="1"/>
+          <button type="submit">Search</button>
+          <a href="/search.html">More ways to search</a>
+        </form>
+      </div>
+
+      <div id="-middle" class="panel">
+        <ul id="-path-navigation"><li><a href="/index.html">Home</a></li><li><a href="/releases/index.html">Releases</a></li><li><a href="/releases/qpid-dispatch-1.4.0/index.html">Qpid Dispatch 1.4.0</a></li><li>Using Qpid Dispatch</li></ul>
+
+        <div id="-middle-content">
+          <h1>Using Qpid Dispatch</h1>
+<div id="toc" class="toc">
+<div id="toctitle">Table of Contents</div>
+<ul class="sectlevel1">
+<li><a href="#introduction">1. Introduction</a>
+<ul class="sectlevel2">
+<li><a href="#overview">1.1. Overview</a></li>
+<li><a href="#benefits">1.2. Benefits</a></li>
+<li><a href="#features">1.3. Features</a></li>
+</ul>
+</li>
+<li><a href="#theory_of_operation">2. Theory of Operation</a>
+<ul class="sectlevel2">
+<li><a href="#overview_2">2.1. Overview</a></li>
+<li><a href="#connections">2.2. Connections</a>
+<ul class="sectlevel3">
+<li><a href="#listener">2.2.1. Listener</a></li>
+<li><a href="#connector">2.2.2. Connector</a></li>
+</ul>
+</li>
+<li><a href="#addresses">2.3. Addresses</a>
+<ul class="sectlevel3">
+<li><a href="#mobile_addresses">2.3.1. Mobile Addresses</a></li>
+<li><a href="#link_route_addresses">2.3.2. Link Route Addresses</a></li>
+</ul>
+</li>
+<li><a href="#message_routing">2.4. Message Routing</a>
+<ul class="sectlevel3">
+<li><a href="#routing_patterns">2.4.1. Routing Patterns</a></li>
+<li><a href="#routing_mechanisms">2.4.2. Routing Mechanisms</a></li>
+<li><a href="#message_settlement">2.4.3. Message Settlement</a></li>
+</ul>
+</li>
+<li><a href="#security">2.5. Security</a></li>
+</ul>
+</li>
+<li><a href="#getting-started">3. Getting Started</a>
+<ul class="sectlevel2">
+<li><a href="#starting-the-router">3.1. Starting the Router</a></li>
+<li><a href="#routing_messages_in_a_peer_to_peer_configuration">3.2. Routing Messages in a Peer-to-Peer Configuration</a>
+<ul class="sectlevel3">
+<li><a href="#starting-the-receiver-client">3.2.1. Starting the Receiver Client</a></li>
+<li><a href="#sending-messages">3.2.2. Sending Messages</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#router-configuration">4. Configuration</a>
+<ul class="sectlevel2">
+<li><a href="#accessing_the_router_configuration_file">4.1. Accessing the Router Configuration File</a></li>
+<li><a href="#how_the_router_configuration_file_is_structured">4.2. How the Router Configuration File is Structured</a></li>
+<li><a href="#methods-for-using-pattern-matching">4.3. Methods for Using Pattern Matching and Wildcards</a>
+<ul class="sectlevel3">
+<li><a href="#router-address-pattern-matching">4.3.1. Pattern Matching for Addresses</a></li>
+<li><a href="#pattern-matching-vhost-policy-hostnames">4.3.2. Pattern Matching for Vhost Policy Hostnames</a></li>
+</ul>
+</li>
+<li><a href="#methods-for-changing-router-configuration">4.4. Changing a Router&#8217;s Configuration</a>
+<ul class="sectlevel3">
+<li><a href="#making-permanent-change-to-router-configuration">4.4.1. Making a Permanent Change to the Router&#8217;s Configuration</a></li>
+<li><a href="#changing-configuration-for-running-router">4.4.2. Changing the Configuration for a Running Router</a></li>
+</ul>
+</li>
+<li><a href="#default_configuration_settings">4.5. Default Configuration Settings</a></li>
+<li><a href="#setting_essential_configuration_properties">4.6. Setting Essential Configuration Properties</a></li>
+</ul>
+</li>
+<li><a href="#router-network-connections">5. Network Connections</a>
+<ul class="sectlevel2">
+<li><a href="#adding-incoming-connections">5.1. Listening for Incoming Connections</a></li>
+<li><a href="#adding-outgoing-connections">5.2. Adding Outgoing Connections</a></li>
+</ul>
+</li>
+<li><a href="#security-config">6. Security</a>
+<ul class="sectlevel2">
+<li><a href="#authenticating_remote_peers">6.1. Authenticating Remote Peers</a>
+<ul class="sectlevel3">
+<li><a href="#setting-up-ssl-for-encryption-and-authentication">6.1.1. Setting Up SSL/TLS for Encryption and Authentication</a></li>
+<li><a href="#setting-up-sasl-for-authentication-and-payload-encryption">6.1.2. Setting Up SASL for Authentication and Payload Encryption</a></li>
+<li><a href="#securing-incoming-connections">6.1.3. Securing Incoming Connections</a></li>
+<li><a href="#securing-outgoing-connections">6.1.4. Securing Outgoing Connections</a></li>
+<li><a href="#integrating-with-kerberos">6.1.5. Integrating with Kerberos</a></li>
+</ul>
+</li>
+<li><a href="#authorizing_access_to_messaging_resources">6.2. Authorizing Access to Messaging Resources</a>
+<ul class="sectlevel3">
+<li><a href="#how_dispatch_router_enforces_connection_and_resource_limits">6.2.1. How Dispatch Router Enforces Connection and Resource Limits</a></li>
+<li><a href="#setting_global_connection_limits">6.2.2. Setting Global Connection Limits</a></li>
+<li><a href="#setting_connection_and_resource_limits_for_messaging_endpoints">6.2.3. Setting Connection and Resource Limits for Messaging Endpoints</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#routing">7. Routing</a>
+<ul class="sectlevel2">
+<li><a href="#comparison_of_message_routing_and_link_routing">7.1. Comparison of Message Routing and Link Routing</a>
+<ul class="sectlevel3">
+<li><a href="#when_to_use_message_routing">7.1.1. When to Use Message Routing</a></li>
+<li><a href="#when_to_use_link_routing">7.1.2. When to Use Link Routing</a></li>
+</ul>
+</li>
+<li><a href="#configuring_message_routing">7.2. Configuring Message Routing</a>
+<ul class="sectlevel3">
+<li><a href="#addresses_2">7.2.1. Addresses</a></li>
+<li><a href="#routing-patterns-overview">7.2.2. Routing Patterns</a></li>
+<li><a href="#message_settlement_2">7.2.3. Message Settlement</a></li>
+<li><a href="#routing-messages-between-clients">7.2.4. Routing Messages Between Clients</a></li>
+<li><a href="#routing-messages-through-broker">7.2.5. Routing Messages Through a Broker Queue</a></li>
+<li><a href="#example_routing_messages_through_broker_queues">7.2.6. Example: Routing Messages Through Broker Queues</a></li>
+</ul>
+</li>
+<li><a href="#configuring_link_routing">7.3. Configuring Link Routing</a>
+<ul class="sectlevel3">
+<li><a href="#link_route_addresses_2">7.3.1. Link Route Addresses</a></li>
+<li><a href="#link_route_routing_patterns">7.3.2. Link Route Routing Patterns</a></li>
+<li><a href="#link_route_flow_control">7.3.3. Link Route Flow Control</a></li>
+<li><a href="#creating-link-route">7.3.4. Creating a Link Route</a></li>
+<li><a href="#example_using_a_link_route_to_provide_client_isolation">7.3.5. Example: Using a Link Route to Provide Client Isolation</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#logging">8. Logging</a>
+<ul class="sectlevel2">
+<li><a href="#logging-modules-you-can-configure">8.1. Logging Modules</a>
+<ul class="sectlevel3">
+<li><a href="#the_code_default_code_logging_module">8.1.1. The <code>DEFAULT</code> Logging Module</a></li>
+<li><a href="#the_code_router_code_logging_module">8.1.2. The <code>ROUTER</code> Logging Module</a></li>
+<li><a href="#the_code_router_core_code_logging_module">8.1.3. The <code>ROUTER_CORE</code> Logging Module</a></li>
+<li><a href="#the_code_router_hello_code_logging_module">8.1.4. The <code>ROUTER_HELLO</code> Logging Module</a></li>
+<li><a href="#the_code_router_ls_code_logging_module">8.1.5. The <code>ROUTER_LS</code> Logging Module</a></li>
+<li><a href="#the_code_router_ma_code_logging_module">8.1.6. The <code>ROUTER_MA</code> Logging Module</a></li>
+<li><a href="#the_code_message_code_logging_module">8.1.7. The <code>MESSAGE</code> Logging Module</a></li>
+<li><a href="#the_code_server_code_logging_module">8.1.8. The <code>SERVER</code> Logging Module</a></li>
+<li><a href="#the_code_agent_code_logging_module">8.1.9. The <code>AGENT</code> Logging Module</a></li>
+<li><a href="#the_code_container_code_logging_module">8.1.10. The <code>CONTAINER</code> Logging Module</a></li>
+<li><a href="#the_code_error_code_logging_module">8.1.11. The <code>ERROR</code> Logging Module</a></li>
+<li><a href="#the_code_policy_code_logging_module">8.1.12. The <code>POLICY</code> Logging Module</a></li>
+</ul>
+</li>
+<li><a href="#configure-default-logging">8.2. Configuring Logging</a></li>
+<li><a href="#viewing_log_entries">8.3. Viewing Log Entries</a>
+<ul class="sectlevel3">
+<li><a href="#viewing_log_entries_on_the_console">8.3.1. Viewing Log Entries on the Console</a></li>
+<li><a href="#viewing_log_entries_on_the_cli">8.3.2. Viewing Log Entries on the CLI</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#management">9. Management</a>
+<ul class="sectlevel2">
+<li><a href="#using_apache_qpid_dispatch_router_console">9.1. Using Apache Qpid Dispatch Router Console</a>
+<ul class="sectlevel3">
+<li><a href="#console-overview">9.1.1. Console Overview</a></li>
+<li><a href="#console-installation">9.1.2. Console Installation</a></li>
+<li><a href="#console-operation">9.1.3. Console Operation</a></li>
+</ul>
+</li>
+<li><a href="#monitoring-using-qdstat">9.2. Monitoring Dispatch Router Using <code>qdstat</code></a>
+<ul class="sectlevel3">
+<li><a href="#syntax_for_using_code_qdstat_code">9.2.1. Syntax for Using <code>qdstat</code></a></li>
+<li><a href="#viewing_general_statistics_for_a_router">9.2.2. Viewing General Statistics for a Router</a></li>
+<li><a href="#viewing_a_list_of_connections_to_a_router">9.2.3. Viewing a List of Connections to a Router</a></li>
+<li><a href="#viewing_amqp_links_attached_to_a_router">9.2.4. Viewing AMQP Links Attached to a Router</a></li>
+<li><a href="#viewing_known_routers_on_a_network">9.2.5. Viewing Known Routers on a Network</a></li>
+<li><a href="#viewing_addresses_known_to_a_router">9.2.6. Viewing Addresses Known to a Router</a></li>
+<li><a href="#viewing_a_router_s_autolinks">9.2.7. Viewing a Router&#8217;s Autolinks</a></li>
+<li><a href="#viewing_the_status_of_a_router_s_link_routes">9.2.8. Viewing the Status of a Router&#8217;s Link Routes</a></li>
+<li><a href="#viewing_memory_consumption_information">9.2.9. Viewing Memory Consumption Information</a></li>
+</ul>
+</li>
+<li><a href="#managing-router">9.3. Managing Dispatch Router Using <code>qdmanage</code></a>
+<ul class="sectlevel3">
+<li><a href="#syntax_for_using_code_qdmanage_code">9.3.1. Syntax for Using <code>qdmanage</code></a></li>
+<li><a href="#managing_network_connections">9.3.2. Managing Network Connections</a></li>
+<li><a href="#managing_security">9.3.3. Managing Security</a></li>
+<li><a href="#managing_routing">9.3.4. Managing Routing</a></li>
+<li><a href="#managing_logging">9.3.5. Managing Logging</a></li>
+</ul>
+</li>
+<li><a href="#management_entities">9.4. Management Entities</a></li>
+</ul>
+</li>
+<li><a href="#reliability">10. Reliability</a>
+<ul class="sectlevel2">
+<li><a href="#path_redundancy">10.1. Path Redundancy</a></li>
+<li><a href="#path_redundancy_and_temporal_decoupling">10.2. Path Redundancy and Temporal Decoupling</a></li>
+<li><a href="#sharded_queue">10.3. Sharded Queue</a></li>
+</ul>
+</li>
+<li><a href="#technical-details-specifications">11. Technical Details and Specifications</a>
+<ul class="sectlevel2">
+<li><a href="#client-compatibility">11.1. Client Compatibility</a></li>
+<li><a href="#amqp-mapping">11.2. AMQP Mapping</a>
+<ul class="sectlevel3">
+<li><a href="#message-annotations">11.2.1. Message Annotations</a></li>
+<li><a href="#sourcetarget-capabilities">11.2.2. Source/Target Capabilities</a></li>
+<li><a href="#dynamic-node-properties">11.2.3. Dynamic-Node-Properties</a></li>
+<li><a href="#addresses-and-address-formats">11.2.4. Addresses and Address Formats</a></li>
+<li><a href="#implementation-of-the-amqp-management-specification">11.2.5. Implementation of the AMQP Management Specification</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#cyrus-sasl">Appendix A: Using Cyrus SASL to Provide Authentication</a>
+<ul class="sectlevel2">
+<li><a href="#generating-sasl-database">A.1. Generating a SASL Database</a></li>
+<li><a href="#viewing_users_in_a_sasl_database">A.2. Viewing Users in a SASL Database</a></li>
+<li><a href="#configuring-sasl-database">A.3. Configuring a SASL Database</a></li>
+</ul>
+</li>
+</ul>
+</div>
+<div class="sect1">
+<h2 id="introduction">1. Introduction</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="overview">1.1. Overview</h3>
+<div class="paragraph">
+<p>The Dispatch Router is an AMQP 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.</p>
+</div>
+<div class="paragraph">
+<p>A messaging client can make a single AMQP connection into a messaging
+bus built of Dispatch Router 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.</p>
+</div>
+<div class="paragraph">
+<p>The router is an intermediary for messages but it is <em>not</em> a broker. It
+does not <em>take responsibility for</em> 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, <em>and</em> it will route
+the acknowledgement of that message by the ultimate receiver back across
+the same path. This means that <em>responsibility</em> for the message is
+transfered from the original sender to the ultimate receiver <em>as if
+they were directly connected</em>. However this is done via a flexible
+network that allows highly configurable routing of the message
+transparent to both sender and receiver.</p>
+</div>
+<div class="paragraph">
+<p>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.</p>
+</div>
+<div class="paragraph">
+<p>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 immediately if there is nobody
+to serve the request, but typically it can only wait for a timeout to
+discover this. With a Dispatch Router 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.</p>
+</div>
+<div class="paragraph">
+<p>For an exampe of using Dispatch Router 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 difficulty 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 Router network,
+<em>all</em> the receivers are connected to <em>all</em> the brokers. If there is a
+message anywhere it can be delivered to any receiver.</p>
+</div>
+<div class="paragraph">
+<p>Dispatch 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.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="benefits">1.2. Benefits</h3>
+<div class="paragraph">
+<p>Simplifies connectivity</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>An endpoint can do all of its messaging through a single transport
+connection</p>
+</li>
+<li>
+<p>Avoid opening holes in firewalls for incoming connections</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Provides messaging connectivity where there is no TCP/IP connectivity</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>A server or broker can be in a private IP network (behind a NAT
+firewall) and be accessible by messaging endpoints in other networks
+(learn more).</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Simplifies reliability</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Reliability and availability are provided using redundant topology,
+not server clustering</p>
+</li>
+<li>
+<p>Reliable end-to-end messaging without persistent stores</p>
+</li>
+<li>
+<p>Use a message broker only when you need store-and-forward semantics</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="features">1.3. Features</h3>
+<div class="ulist">
+<ul>
+<li>
+<p>Can be deployed stand-alone or in a network of routers</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Supports arbitrary network topology - no restrictions on redundancy</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Automatic route computation - adjusts quickly to changes in topology</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Provides remote access to brokers or other AMQP servers</p>
+</li>
+<li>
+<p>Security</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="theory_of_operation">2. Theory of Operation</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This section introduces some key concepts about the router.</p>
+</div>
+<div class="sect2">
+<h3 id="overview_2">2.1. Overview</h3>
+<div class="paragraph">
+<p>The Dispatch Router is an <em>application layer</em> program running as a normal
+user program or as a daemon.</p>
+</div>
+<div class="paragraph">
+<p>Dispatch Router accepts AMQP connections from clients and creates AMQP
+connections to brokers or AMQP-based services. Dispatch Router classifies
+incoming AMQP messages and routes the
+messages between message producers and message consumers.</p>
+</div>
+<div class="paragraph">
+<p>Dispatch 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 message source to every message
+destination and to recover quickly from failures. Dispatch Router relies on
+redundant network paths to provide continued connectivity in the face
+of system or network failure.</p>
+</div>
+<div class="paragraph">
+<p>A messaging client can make a single AMQP connection into a messaging
+bus built with routers and, over that connection, exchange messages
+with one or more message brokers connected to any router in the
+network. At the same time the client can exchange messages directly
+with other endpoints without involving a broker at all.</p>
+</div>
+</div>
+<div class="sect2">
+<h3 id="connections">2.2. Connections</h3>
+<div class="paragraph">
+<p>Dispatch Router connects clients, servers, AMQP services, and other
+routers through network connections.</p>
+</div>
+<div class="sect3">
+<h4 id="listener">2.2.1. Listener</h4>
+<div class="paragraph">
+<p>Dispatch Router provides <em>listeners</em> that accept client connections.
+A client connecting to a router listener uses the
+same methods that it would use to connect to a broker. From the
+client&#8217;s perspective the router connection and link establishment are
+identical to broker connection and link establishment.</p>
+</div>
+<div class="paragraph">
+<p>Several types of listeners are defined by their role.</p>
+</div>
+<table class="tableblock frame-all grid-all spread">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 80%;">
+</colgroup>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Role</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Description</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">normal</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The connection is used for AMQP clients using normal message delivery.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">inter-router</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The connection is assumed to be to another router in the network.  Inter-router discovery and routing protocols can only be used over inter-router connections.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">route-container</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The connection is a broker or other resource that holds known addresses. The router will use this connection to create links as necessary. The addresses are available for routing only after the remote resource has created a connection.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="connector">2.2.2. Connector</h4>
+<div class="paragraph">
+<p>Dispatch Router can also be configured to create outbound connections to
+messaging brokers or other AMQP entities using <em>connectors</em>. A
+connector is defined with the network address of the broker and the
+name or names of the resources that are available in that broker. When
+a router connects to a broker through a connector it uses the same
+methods a normal messaging client would use when connecting to the
+broker.</p>
+</div>
+<div class="paragraph">
+<p>Several types of connectors are defined by their role.</p>
+</div>
+<table class="tableblock frame-all grid-all spread">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 80%;">
+</colgroup>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Role</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Description</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">normal</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The connection is used for AMQP clients using normal message delivery. On this connector the router will initiate the connection but it will never create any links. Links are to be created by the peer that accepts the connection.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">inter-router</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The connection is assumed to be to another router in the network.  Inter-router discovery and routing protocols can only be used over inter-router connections.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">route-container</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The connection is to a broker or other resource that holds known addresses. The router will use this connection to create links as necessary. The addresses are available for routing only after the router has created a connection to the remote resource.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="sect2">
+<h3 id="addresses">2.3. Addresses</h3>
+<div class="paragraph">
+<p>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 <em>to</em> and <em>reply-to</em> fields of a message&#8217;s properties. They are also
+used during the creation of links in the <em>address</em> field of a <em>source</em> or
+a <em>target</em>.</p>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>Addresses in this discussion refer to AMQP protocol addresses and not
+to TCP/IP network addresses. TCP/IP network addresses are used by
+messaging clients, brokers, and routers to create AMQP connections.
+AMQP protocol addresses are the names of source and destination
+endpoints for messages within the messaging network.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>Addresses designate various kinds of entities in a messaging network:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Endpoint processes that consume data or offer a service</p>
+</li>
+<li>
+<p>Topics that match multiple consumers to multiple producers</p>
+</li>
+<li>
+<p>Entities within a messaging broker:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Queues</p>
+</li>
+<li>
+<p>Durable Topics</p>
+</li>
+<li>
+<p>Exchanges</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>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
+who creates addresses but the router treats them as opaque
+strings.</p>
+</div>
+<div class="paragraph">
+<p>Dispatch Router maintains several classes of address based on how the address is
+configured or discovered.</p>
+</div>
+<table class="tableblock frame-all grid-all spread">
+<colgroup>
+<col style="width: 25%;">
+<col style="width: 75%;">
+</colgroup>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Address Type</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Description</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">mobile</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The address is a rendezvous point between senders and receivers. The router aggregates and serializes messages from senders and distributes messages to receivers.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">link route</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">The address defines a private messaging path between a sender and a receiver. The router simply passes messages between the end points.</p></td>
+</tr>
+</tbody>
+</table>
+<div class="sect3">
+<h4 id="mobile_addresses">2.3.1. Mobile Addresses</h4>
+<div class="paragraph">
+<p>Routers consider addresses to be mobile such that any users of an
+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, the address users may be connected
+to multiple routers in the network.</p>
+</div>
+<div class="paragraph">
+<p>Mobile addresses are rendezvous points for senders and receivers.
+Messages arrive at the mobile address and are dispatched to their
+destinations according to the routing defined for the mobile address.
+The details of these routing patterns are discussed later.</p>
+</div>
+<div class="paragraph">
+<p>Mobile addresses may be discovered during normal router operation or
+configured through management settings.</p>
+</div>
+<div class="sect4">
+<h5 id="discovered_mobile_addresses">Discovered Mobile Addresses</h5>
+<div class="paragraph">
+<p>Mobile addresses are created when a client creates a link to a source
+or destination address that is unknown to the router network.</p>
+</div>
+<div class="paragraph">
+<p>Suppose a service provider wants to offer <em>my-service</em> that clients
+may use. The service provider must open a receiver link with source
+address <em>my-service</em>.  The router creates a mobile address
+<em>my-service</em> and propagates the address so that it is known to every
+router in the network.</p>
+</div>
+<div class="paragraph">
+<p>Later a client wants to use the service and creates a sending link
+with target address <em>my-service</em>. The router matches the service
+provider&#8217;s receiver having source address <em>my-service</em> to the client&#8217;s
+sender having target address <em>my-service</em> and routes messages between
+the two.</p>
+</div>
+<div class="paragraph">
+<p>Any number of other clients can create links to the service as
+well. The clients do not have to know where in the router network the
+service provider is physically located nor are the clients required to
+connect to a specific router to use the service. Regardless of how
+many clients are using the service the service provider needs only a
+single connection and link into the router network.</p>
+</div>
+<div class="paragraph">
+<p>Another view of this same scenario is when a client tries to use the
+service before service provider has connected to the network. In this
+case the router network creates the mobile address <em>my-service</em> as
+before. However, since the mobile address has only client sender links
+and no receiver links the router stalls the clients and prevents them
+from sending any messages.  Later, after the service provider connects
+and creates the receiver link, the router will issue credits to the
+clients and the messages will begin to flow between the clients and
+the service.</p>
+</div>
+<div class="paragraph">
+<p>The service provider can connect, disconnect, and reconnect from a
+different location without having to change any of the clients or
+their connections.  Imagine having the service running on a
+laptop. One day the connection is from corporate headquarters and the
+next day the connection is from some remote location. In this case the
+service provider&#8217;s computer will typically have different host IP
+addresses for each connection. Using the router network the service
+provider connects to the router network and offers the named service
+and the clients connect to the router network and consume from the
+named service. The router network routes messages between the mobile
+addresses effectively masking host IP addresses of the service
+provider and the client systems.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="configured_mobile_addresses">Configured Mobile Addresses</h5>
+<div class="paragraph">
+<p>Mobile addresses may be configured using the router <em>autoLink</em>
+object. An address created via an <em>autoLink</em> represents a queue,
+topic, or other service in an external broker. Logically the
+<em>autoLink</em> addresses are treated by the router network as if the
+broker had connected to the router and offered the services itself.</p>
+</div>
+<div class="paragraph">
+<p>For each configured mobile address the router will create a single
+link to the external resource. Messages flow between sender links and
+receiver links the same regardless if the mobile address was
+discovered or configured.</p>
+</div>
+<div class="paragraph">
+<p>Multiple <em>autoLink</em> objects may define the same address on multiple
+brokers.  In this case the router network creates a sharded resource
+split between the brokers. Any client can seamlessly send and receive
+messages from either broker.</p>
+</div>
+<div class="paragraph">
+<p>Note that the brokers do not need to be clustered or federated to
+receive this treatment. The brokers may even be from different vendors
+or be different versions of the same broker yet still work together to
+provide a larger service platform.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="link_route_addresses">2.3.2. Link Route Addresses</h4>
+<div class="paragraph">
+<p>Link route addresses may be configured using the router <em>linkRoute</em>
+object. An link route address represents a queue, topic, or other
+service in an external broker similar to addresses configured by
+<em>autoLink</em> objects. For link route addresses the router propagates a
+separate link attachment to the broker resource for each incoming
+client link. The router does not automatically create any links to the
+broker resource.</p>
+</div>
+<div class="paragraph">
+<p>Using link route addresses the router network does not participate in
+aggregated message distribution. The router simply passes message
+delivery and settlement between the two end points.</p>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="message_routing">2.4. Message Routing</h3>
+<div class="paragraph">
+<p>Addresses have semantics associated with them that are assigned when
+the address is provisioned or discovered.  The semantics of an address
+control how routers behave when they see the address being
+used. Address semantics include the following considerations:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Routing pattern - balanced, closest, multicast</p>
+</li>
+<li>
+<p>Routing mechanism - message routed, link routed</p>
+</li>
+</ul>
+</div>
+<div class="sect3">
+<h4 id="routing_patterns">2.4.1. Routing Patterns</h4>
+<div class="paragraph">
+<p>Routing patterns define the paths that a message with a mobile address
+can take across a network. These routing patterns can be used for both
+direct routing, in which the router distributes messages between
+clients without a broker, and indirect routing, in which the router
+enables clients to exchange messages through a broker.</p>
+</div>
+<div class="paragraph">
+<p>Note that the routing patterns fall into two categories:  Anycast
+(Balanced and Closest) and Multicast.  There is no concept of
+"unicast" in which there is only one consumer for an address.</p>
+</div>
+<div class="paragraph">
+<p>Anycast distribution delivers each message to one consumer whereas
+multicast distribution delivers each message to all consumers.</p>
+</div>
+<div class="paragraph">
+<p>Anycast delivery is reliable when the message deliveries are
+unsettled. There is a reliability contract that the router network
+abides by when delivering unsettled messages to anycast addresses.
+For every such delivery sent by a producer, the router network
+guarantees that one of the following outcomes will occur:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>The delivery shall be settled with ACCEPTED or REJECTED disposition where the disposition is supplied by the consumer.</p>
+</li>
+<li>
+<p>The delivery shall be settled with RELEASED disposition, meaning that the message was not delivered to any consumer.</p>
+</li>
+<li>
+<p>The delivery shall be settled with MODIFIED disposition, meaning that the message may have been delivered to a consumer but should be considered in-doubt and re-sent.</p>
+</li>
+<li>
+<p>The connection to the producer shall be dropped, signifying that all unsettled deliveries should now be considered in-doubt by the producer and later re-sent.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Multicast delivery is not reliable. If a producer sends an unsettled delivery, the disposition may be ACCEPTED or RELEASED.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>If ACCEPTED, there is no guarantee that the message was delivered to any consumer.</p>
+</li>
+<li>
+<p>If RELEASED, the message was definitely not delivered to any consumer.</p>
+</li>
+</ul>
+</div>
+<div class="sect4">
+<h5 id="balanced">Balanced</h5>
+<div class="paragraph">
+<p>An anycast method which allows multiple receivers to use the same
+address. In this case, messages (or links) are routed to exactly one
+of the receivers and the network attempts to balance the traffic load
+across the set of receivers using the same address. This routing
+delivers messages to receivers based on how quickly they settle the
+deliveries. Faster receivers get more messages.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="closest">Closest</h5>
+<div class="paragraph">
+<p>An anycast method in which even if there are more receivers for the
+same address, every message is sent along the shortest path to reach
+the destination. This means that only one receiver will get the
+message. Each message is delivered to the closest receivers in terms
+of topology cost. If there are multiple receivers with the same lowest
+cost, deliveries will be spread evenly among those receivers.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="multicast">Multicast</h5>
+<div class="paragraph">
+<p>Having multiple consumers on the same address at the same time,
+messages are routed such that each consumer receives one copy of the
+message.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="routing_mechanisms">2.4.2. Routing Mechanisms</h4>
+<div class="paragraph">
+<p>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 <em>routing</em>:</p>
+</div>
+<div class="literalblock">
+<div class="content">
+<pre>In a network built of multiple, interconnected routers 'routing'
+determines which connection to use to send a message directly
+to its destination or one step closer to its destination.</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>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.</p>
+</div>
+<div class="sect4">
+<h5 id="message_routed">Message Routed</h5>
+<div class="paragraph">
+<p>Message routing occurs upon delivery of a message and is done based on
+the address in the message&#8217;s <em>to</em> field.</p>
+</div>
+<div class="paragraph">
+<p>When a delivery arrives on an incoming message-routing link, the
+router extracts the address from the delivered message&#8217;s <em>to</em> 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.</p>
+</div>
+<div class="paragraph">
+<p>Message routing can also occur without an address in the
+message&#8217;s <em>to</em> field if the incoming link has a target address. In
+fact, if the sender uses a link with a target address, the <em>to</em> field
+shall be ignored even if used.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="link_routed">Link Routed</h5>
+<div class="paragraph">
+<p>Link routing occurs when a new link is attached to the router across
+one of its AMQP connections. It is done based on the <em>target.address</em>
+field of an inbound link and the <em>source.address</em> field of an outbound
+link.</p>
+</div>
+<div class="paragraph">
+<p>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.</p>
+</div>
+<div class="paragraph">
+<p>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.</p>
+</div>
+<div class="paragraph">
+<p>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.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="message_settlement">2.4.3. Message Settlement</h4>
+<div class="paragraph">
+<p>Messages may be delivered with varying degrees of reliability.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>At most once</p>
+</li>
+<li>
+<p>At least once</p>
+</li>
+<li>
+<p>Exactly once</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The reliability is negotiated between the client and server during
+link establishment. The router handles all levels of reliability by treating
+messages as either <em>pre-settled</em> or <em>unsettled</em>.</p>
+</div>
+<table class="tableblock frame-all grid-all spread">
+<colgroup>
+<col style="width: 20%;">
+<col style="width: 80%;">
+</colgroup>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Delivery</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Handling</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">pre-settled</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">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&#8217;s destination.</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">unsettled</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">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.</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="sect2">
+<h3 id="security">2.5. Security</h3>
+<div class="paragraph">
+<p>Dispatch Router uses the SSL protocol and related certificates and SASL
+protocol mechanisms to encrypt and authenticate remote peers. Router
+listeners act as network servers and router connectors act as network
+clients. Both connection types may be configured securely with SSL
+and SASL.</p>
+</div>
+<div class="paragraph">
+<p>The router <code>policy</code> module is an optional authorization mechanism
+enforcing user connection restrictions and AMQP resource access
+control.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="getting-started">3. Getting Started</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Before configuring Dispatch Router, you should understand how to start the router, how it is configured by default, and how to use it in a simple peer-to-peer configuration.</p>
+</div>
+<div class="sect2">
+<h3 id="starting-the-router">3.1. Starting the Router</h3>
+<div class="olist arabic">
+<div class="title">Procedure</div>
+<ol class="arabic">
+<li>
+<p>To start the router, use the <strong><code>qdrouterd</code></strong> command.</p>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>This example uses the default configuration to start the router as a daemon:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">$ qdrouterd -d</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>You can specify a different configuration file with which to start the router. For more information, see <a href="#methods-for-changing-router-configuration"><em>Changing a Router&#8217;s Configuration</em></a>.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>The router starts, using the default configuration file stored at <code>/etc/qpid-dispatch/qdrouterd.conf</code>.</p>
+</div>
+</li>
+<li>
+<p>View the log to verify the router status:</p>
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">$ qdstat --log</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This example shows that the router was correctly installed, is running, and is ready to route traffic between clients:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">$ qdstat --log
+Fri May 20 09:38:03 2017 SERVER (info) Container Name: Router.A <b class="conum">(1)</b>
+Fri May 20 09:38:03 2017 ROUTER (info) Router started in Standalone mode <b class="conum">(2)</b>
+Fri May 20 09:38:03 2017 ROUTER_CORE (info) Router Core thread running. 0/Router.A
+Fri May 20 09:38:03 2017 ROUTER_CORE (info) In-process subscription M/$management
+Fri May 20 09:38:03 2017 AGENT (info) Activating management agent on $_management_internal <b class="conum">(3)</b>
+Fri May 20 09:38:03 2017 ROUTER_CORE (info) In-process subscription L/$management
+Fri May 20 09:38:03 2017 ROUTER_CORE (info) In-process subscription L/$_management_internal
+Fri May 20 09:38:03 2017 DISPLAYNAME (info) Activating DisplayNameService on $displayname
+Fri May 20 09:38:03 2017 ROUTER_CORE (info) In-process subscription L/$displayname
+Fri May 20 09:38:03 2017 CONN_MGR (info) Configured Listener: 0.0.0.0:amqp proto=any role=normal <b class="conum">(4)</b>
+Fri May 20 09:38:03 2017 POLICY (info) Policy configured maximumConnections: 0, policyFolder: '', access rules enabled: 'false'
+Fri May 20 09:38:03 2017 POLICY (info) Policy fallback defaultApplication is disabled
+Fri May 20 09:38:03 2017 SERVER (info) Operational, 4 Threads Running <b class="conum">(5)</b></pre>
+</div>
+</div>
+<div class="colist arabic">
+<ol>
+<li>
+<p>The name of this router instance.</p>
+</li>
+<li>
+<p>By default, the router starts in <em>standalone</em> mode, which means that it cannot connect to other routers or be used in a router network.</p>
+</li>
+<li>
+<p>The management agent. It provides the <code>$management</code> address, through which management tools such as <code>qdmanage</code> and <code>qdstat</code> can perform create, read, update, and delete (CRUD) operations on the router. As an AMQP endpoint, the management agent supports all operations defined by the <a href="https://www.oasis-open.org/committees/download.php/54441/AMQP%20Management%20v1.0%20WD09">AMQP management specification (Draft 9)</a>.</p>
+</li>
+<li>
+<p>A listener is started on all available network interfaces and listens for connections on the standard AMQP port (5672, which is not encrypted).</p>
+</li>
+<li>
+<p>Threads for handling message traffic and all other internal operations.</p>
+</li>
+</ol>
+</div>
+</li>
+</ol>
+</div>
+</div>
+<div class="sect2">
+<h3 id="routing_messages_in_a_peer_to_peer_configuration">3.2. Routing Messages in a Peer-to-Peer Configuration</h3>
+<div class="paragraph">
+<p>This example demonstrates how the router can connect clients by receiving and sending messages between them. It uses the router&#8217;s default configuration file and does not require a broker.</p>
+</div>
+<div class="imageblock" style="text-align: center">
+<div class="content">
+<img src="images/01-peer-to-peer.png" alt="Peer-to-peer Communication">
+</div>
+<div class="title">Figure 1. Peer-to-peer Communication</div>
+</div>
+<div class="paragraph">
+<p>As the diagram indicates, the configuration consists of an Dispatch Router component with two clients connected to it: a sender and a receiver. The receiver wants to receive messages on a specific address, and the sender sends
+messages to that address.</p>
+</div>
+<div class="paragraph">
+<p>A broker is not used in this example, so there is no <em>"store and forward"</em> mechanism in the middle. Instead, the messages flow from sender to receiver only if the receiver is online, and the sender can confirm that the messages have arrived at their destination.</p>
+</div>
+<div class="paragraph">
+<p>This example uses a Apache Qpid Proton Python client to start a receiver client, and then send five messages from the sender client.</p>
+</div>
+<div class="paragraph">
+<div class="title">Prerequisites</div>
+<p>Apache Qpid Proton Python must be installed before you can complete the peer-to-peer routing example. For more information, see <a href="https://qpid.apache.org/proton/" class="bare">https://qpid.apache.org/proton/</a>.</p>
+</div>
+<div class="olist arabic">
+<div class="title">Procedure</div>
+<ol class="arabic">
+<li>
+<p><a href="#starting-the-receiver-client">Start the receiver client</a>.</p>
+</li>
+<li>
+<p><a href="#sending-messages">Send messages</a>.</p>
+</li>
+</ol>
+</div>
+<div class="sect3">
+<h4 id="starting-the-receiver-client">3.2.1. Starting the Receiver Client</h4>
+<div class="paragraph">
+<p>In this example, the receiver client is started first. This means that the messages will be sent as soon as the sender client is started.</p>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>In practice, the order in which you start senders and receivers does not matter. In both cases, messages will be sent as soon as the receiver comes online.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="ulist">
+<div class="title">Procedure</div>
+<ul>
+<li>
+<p>To start the receiver by using the Python receiver client, navigate to the Python examples directory and run the <code>simple_recv.py</code> example:</p>
+<div class="openblock">
+<div class="content">
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">$ cd <em>INSTALL_DIR</em>/examples/python/
+$ python simple_recv.py -a 127.0.0.1:5672/examples -m 5</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This command starts the receiver and listens on the default address (<code>127.0.0.1:5672/examples</code>). The receiver is also set to receive a maximum of five messages.</p>
+</div>
+</div>
+</div>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect3">
+<h4 id="sending-messages">3.2.2. Sending Messages</h4>
+<div class="paragraph">
+<p>After starting the receiver client, you can send messages from the sender. These messages will travel through the router to the receiver.</p>
+</div>
+<div class="ulist">
+<div class="title">Procedure</div>
+<ul>
+<li>
+<p>In a new terminal window, navigate to the Python examples directory and run the <code>simple_send.py</code> example:</p>
+<div class="openblock">
+<div class="content">
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">$ cd <em>INSTALL_DIR</em>/examples/python/
+$ python simple_send.py -a 127.0.0.1:5672/examples -m 5</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This command sends five auto-generated messages to the default address (<code>127.0.0.1:5672/examples</code>) and then confirms that they were delivered and acknowledged by the receiver:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">all messages confirmed</pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The receiver client receives the messages and displays their content:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">{u'sequence': 1L}
+{u'sequence': 2L}
+{u'sequence': 3L}
+{u'sequence': 4L}
+{u'sequence': 5L}</pre>
+</div>
+</div>
+</div>
+</div>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="router-configuration">4. Configuration</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Before starting Dispatch Router, you should understand where the router&#8217;s configuration file is stored, how the file is structured, and the methods you can use to modify it.</p>
+</div>
+<div class="sect2">
+<h3 id="accessing_the_router_configuration_file">4.1. Accessing the Router Configuration File</h3>
+<div class="paragraph">
+<p>The router&#8217;s configuration is defined in the router configuration file. You can access this file to view and modify that configuration.</p>
+</div>
+<div class="ulist">
+<div class="title">Procedure</div>
+<ul>
+<li>
+<p>Open the following file: <code>/etc/qpid-dispatch/qdrouterd.conf</code>.</p>
+<div class="openblock">
+<div class="content">
+<div class="paragraph">
+<p>When Dispatch Router is installed, <code>qdrouterd.conf</code> is installed in this directory by default. When the router is started, it runs with the settings defined in this file.</p>
+</div>
+<div class="paragraph">
+<p>For more information about the router configuration file (including available entities and attributes), see the <a href="https://qpid.apache.org/releases/qpid-dispatch-1.0.1/man/qdrouterd.html" target="_blank" rel="noopener">qdrouterd man page</a>.</p>
+</div>
+</div>
+</div>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect2">
+<h3 id="how_the_router_configuration_file_is_structured">4.2. How the Router Configuration File is Structured</h3>
+<div class="paragraph">
+<p>Before you can make changes to a router configuration file, you should understand how the file is structured.</p>
+</div>
+<div class="paragraph">
+<p>The configuration file contains sections. A section is a configurable entity, and it contains a set of attribute name-value pairs that define the settings for that entity. The syntax is as follows:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">sectionName {
+    attributeName: attributeValue
+    attributeName: attributeValue
+    ...
+}</pre>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="methods-for-using-pattern-matching">4.3. Methods for Using Pattern Matching and Wildcards</h3>
+<div class="paragraph">
+<p>The router configuration file supports pattern matching and wildcards to enable you to match multiple values for certain attributes. However, the syntax varies based on the type of entity that you are configuring.</p>
+</div>
+<div class="sect3">
+<h4 id="router-address-pattern-matching">4.3.1. Pattern Matching for Addresses</h4>
+<div class="paragraph">
+<p>In some router configuration scenarios, you might need to use pattern matching to match a range of addresses rather than a single, literal address. Address patterns match any address that corresponds to the pattern.</p>
+</div>
+<div class="paragraph">
+<p>An address pattern is a sequence of tokens (typically words) that are delimited by either <code>.</code> or <code>/</code> characters. They also can contain special wildcard characters that represent words:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>*</code> represents exactly one word</p>
+</li>
+<li>
+<p><code>#</code> represents zero or more words</p>
+</li>
+</ul>
+</div>
+<div class="exampleblock">
+<div class="title">Example 1. Address Pattern</div>
+<div class="content">
+<div class="paragraph">
+<p>This address contains two tokens, separated by the <code>/</code> delimiter:</p>
+</div>
+<div class="paragraph">
+<p><code>my/address</code></p>
+</div>
+</div>
+</div>
+<div class="exampleblock">
+<div class="title">Example 2. Address Pattern with Wildcard</div>
+<div class="content">
+<div class="paragraph">
+<p>This address contains three tokens. The <code>*</code> is a wildcard, representing any single word that might be between <code>my</code> and <code>address</code>:</p>
+</div>
+<div class="paragraph">
+<p><code>my/*/address</code></p>
+</div>
+</div>
+</div>
+<div class="paragraph">
+<p>The following table shows some address patterns and examples of the addresses that would match them:</p>
+</div>
+<table class="tableblock frame-all grid-all spread">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 33.3333%;">
+<col style="width: 33.3334%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">This pattern&#8230;&#8203;</th>
+<th class="tableblock halign-left valign-top">Matches&#8230;&#8203;</th>
+<th class="tableblock halign-left valign-top">But not&#8230;&#8203;</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>news/*</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>news/europe</code></p>
+</div>
+<div class="paragraph">
+<p><code>news/usa</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>news</code></p>
+</div>
+<div class="paragraph">
+<p><code>news/usa/sports</code></p>
+</div></div></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>news/#</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>news</code></p>
+</div>
+<div class="paragraph">
+<p><code>news/europe</code></p>
+</div>
+<div class="paragraph">
+<p><code>news/usa/sports</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>europe</code></p>
+</div>
+<div class="paragraph">
+<p><code>usa</code></p>
+</div></div></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>news/europe/#</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>news/europe</code></p>
+</div>
+<div class="paragraph">
+<p><code>news/europe/sports</code></p>
+</div>
+<div class="paragraph">
+<p><code>news/europe/politics/fr</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>news/usa</code></p>
+</div>
+<div class="paragraph">
+<p><code>europe</code></p>
+</div></div></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>news/*/sports</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>news/europe/sports</code></p>
+</div>
+<div class="paragraph">
+<p><code>news/usa/sports</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>news</code></p>
+</div>
+<div class="paragraph">
+<p><code>news/europe/fr/sports</code></p>
+</div></div></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="sect3">
+<h4 id="pattern-matching-vhost-policy-hostnames">4.3.2. Pattern Matching for Vhost Policy Hostnames</h4>
+<div class="paragraph">
+<p>In a vhost policy, vhost hostnames can be either literal hostnames or patterns that cover a range of hostnames.</p>
+</div>
+<div class="paragraph">
+<p>A hostname pattern is a sequence of words with one or more of the following wildcard characters:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><code>*</code> represents exactly one word</p>
+</li>
+<li>
+<p><code>#</code> represents zero or more words</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The following table shows some examples of hostname patterns:</p>
+</div>
+<table class="tableblock frame-all grid-all spread">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 33.3333%;">
+<col style="width: 33.3334%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">This pattern&#8230;&#8203;</th>
+<th class="tableblock halign-left valign-top">Matches&#8230;&#8203;</th>
+<th class="tableblock halign-left valign-top">But not&#8230;&#8203;</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>*.example.com</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>www.example.com</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>example.com</code>
+<code>srv2.www.example.com</code></p>
+</div></div></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>#.example.com</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>example.com</code>
+<code>www.example.com</code>
+<code>a.b.c.d.example.com</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>myhost.com</code></p>
+</div></div></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>www.*.test.example.com</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>www.a.test.example.com</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>www.test.example.com</code>
+<code>www.a.b.c.test.example.com</code></p>
+</div></div></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>www.#.test.example.com</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>www.test.example.com</code>
+<code>www.a.test.example.com</code>
+<code>www.a.b.c.test.example.com</code></p>
+</div></div></td>
+<td class="tableblock halign-left valign-top"><div><div class="paragraph">
+<p><code>test.example.com</code></p>
+</div></div></td>
+</tr>
+</tbody>
+</table>
+<div class="paragraph">
+<p>Vhost hostname pattern matching applies the following precedence rules:</p>
+</div>
+<table class="tableblock frame-all grid-all spread">
+<colgroup>
+<col style="width: 50%;">
+<col style="width: 50%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-top">Policy pattern</th>
+<th class="tableblock halign-left valign-top">Precedence</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Exact match</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">High</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">*</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Medium</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-top"><p class="tableblock">#</p></td>
+<td class="tableblock halign-left valign-top"><p class="tableblock">Low</p></td>
+</tr>
+</tbody>
+</table>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>Dispatch Router does not permit you to create vhost hostname patterns that conflict with existing patterns. This includes patterns that can be reduced to be the same as an existing pattern. For example, you would not be able to create the <code>#.#.#.#.com</code> pattern if <code>#.com</code> already exists.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="methods-for-changing-router-configuration">4.4. Changing a Router&#8217;s Configuration</h3>
+<div class="paragraph">
+<p>You can use different methods for changing a router&#8217;s configuration based on whether the router is currently running, and whether you want the change to take effect immediately.</p>
+</div>
+<div class="ulist">
+<div class="title">Choices</div>
+<ul>
+<li>
+<p><a href="#making-permanent-change-to-router-configuration">Make a permanent change to the router&#8217;s configuration</a>.</p>
+</li>
+<li>
+<p><a href="#changing-configuration-for-running-router">Change the configuration for a running router.</a></p>
+</li>
+</ul>
+</div>
+<div class="sect3">
+<h4 id="making-permanent-change-to-router-configuration">4.4.1. Making a Permanent Change to the Router&#8217;s Configuration</h4>
+<div class="paragraph">
+<p>You can make a permanent change to the router&#8217;s configuration by editing the router&#8217;s configuration file directly. You must restart the router for the changes to take effect, but the changes will be saved even if the router is stopped.</p>
+</div>
+<div class="olist arabic">
+<div class="title">Procedure</div>
+<ol class="arabic">
+<li>
+<p>Do one of the following:</p>
+<div class="ulist">
+<ul>
+<li>
+<p>Edit the default configuration file (<code>/etc/qpid-dispatch/qdrouterd.conf</code>).</p>
+</li>
+<li>
+<p>Create a new configuration file.</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>Start (or restart) the router.</p>
+<div class="paragraph">
+<p>If you created a new configuration file, you must specify the path using the <code>--conf</code> parameter. For example, the following command starts the router with a non-default configuration file:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">$ sudo qdrouterd -d --conf /etc/qpid-dispatch/new-configuration-file.conf</pre>
+</div>
+</div>
+</li>
+</ol>
+</div>
+</div>
+<div class="sect3">
+<h4 id="changing-configuration-for-running-router">4.4.2. Changing the Configuration for a Running Router</h4>
+<div class="paragraph">
+<p>If the router is running, you can change its configuration on the fly. The changes you make take effect immediately, but are lost if the router is stopped.</p>
+</div>
+<div class="ulist">
+<div class="title">Procedure</div>
+<ul>
+<li>
+<p>Use <code>qdmanage</code> to change the configuration.</p>
+<div class="paragraph">
+<p>For more information about using <code>qdmanage</code>, see <a href="#managing-router">Managing Dispatch Router Using <em>qdmanage</em></a>.</p>
+</div>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="default_configuration_settings">4.5. Default Configuration Settings</h3>
+<div class="paragraph">
+<p>The router&#8217;s configuration file controls the way in which the router functions. The default configuration file contains the minimum number of settings required for the router to run. As you become more familiar with the router, you can add to or change these settings, or create your own configuration files.</p>
+</div>
+<div class="paragraph">
+<p>When you installed Dispatch Router, the default configuration file was added at the following path: <code>/etc/qpid-dispatch/qdrouterd.conf</code>. It includes some basic configuration settings that define the router&#8217;s operating mode, how it listens for incoming connections, and routing patterns for the message routing mechanism.</p>
+</div>
+<div class="listingblock">
+<div class="title">Default Configuration File</div>
+<div class="content">
+<pre class="nowrap">router {
+    mode: standalone <b class="conum">(1)</b>
+    id: Router.A <b class="conum">(2)</b>
+}
+
+listener { <b class="conum">(3)</b>
+    host: 0.0.0.0 <b class="conum">(4)</b>
+    port: amqp <b class="conum">(5)</b>
+    authenticatePeer: no <b class="conum">(6)</b>
+}
+
+address { <b class="conum">(7)</b>
+    prefix: closest
+    distribution: closest
+}
+
+address {
+    prefix: multicast
+    distribution: multicast
+}
+
+address {
+    prefix: unicast
+    distribution: closest
+}
+
+address {
+    prefix: exclusive
+    distribution: closest
+}
+
+address {
+    prefix: broadcast
+    distribution: multicast
+}</pre>
+</div>
+</div>
+<div class="colist arabic">
+<ol>
+<li>
+<p>By default, the router operates in <em>standalone</em> mode. This means that it can only communicate with endpoints that are directly connected to it. It cannot connect to other routers, or participate in a router network.</p>
+</li>
+<li>
+<p>The unique identifier of the router. This ID is used as the <code>container-id</code> (container name) at the AMQP protocol level. It is required, and the router will not start if this attribute is not defined.</p>
+</li>
+<li>
+<p>The <code>listener</code> entity handles incoming connections from client endpoints.</p>
+</li>
+<li>
+<p>The IP address on which the router will listen for incoming connections. By default, the router is configured to listen on all network interfaces.</p>
+</li>
+<li>
+<p>The port on which the router will listen for incoming connections. By default, the default AMQP port (5672) is specified with a symbolic service name.</p>
+</li>
+<li>
+<p>Specifies whether the router should authenticate peers before they can connect to the router. By default, peer authentication is not required.</p>
+</li>
+<li>
+<p>By default, the router is configured to use the message routing mechanism. Each <code>address</code> entity defines how messages that are received with a particular address <code>prefix</code> should be distributed. For example, all messages with addresses that start with <code>closest</code> will be distributed using the <code>closest</code> distribution pattern.</p>
+</li>
+</ol>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>If a client requests a message with an address that is not defined in the router&#8217;s configuration file, the <code>balanced</code> distribution pattern will be used automatically.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="sect2">
+<h3 id="setting_essential_configuration_properties">4.6. Setting Essential Configuration Properties</h3>
+<div class="paragraph">
+<p>The router&#8217;s default configuration settings enable the router to run with minimal configuration. However, you may need to change some of these settings for the router to run properly in your environment.</p>
+</div>
+<div class="olist arabic">
+<div class="title">Procedure</div>
+<ol class="arabic">
+<li>
+<p>Open the router&#8217;s configuration file.</p>
+<div class="paragraph">
+<p>If you are changing the router&#8217;s default configuration file, the file is located at <code>/etc/qpid-dispatch/qdrouterd.conf</code>.</p>
+</div>
+</li>
+<li>
+<p>To define essential router information, change the following attributes as needed in the <code>router</code> section:</p>
+<div class="openblock">
+<div class="content">
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">router {
+    mode: <em>STANDALONE/INTERIOR</em>
+    id: <em>ROUTER_ID</em>
+}</pre>
+</div>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>mode</code></dt>
+<dd>
+<p>Specify one of the following modes:</p>
+<div class="ulist">
+<ul>
+<li>
+<p><code>standalone</code> - Use this mode if the router does not communicate with other routers and is not part of a router network. When operating in this mode, the router only routes messages between directly connected endpoints.</p>
+</li>
+<li>
+<p><code>interior</code> - Use this mode if the router is part of a router network and needs to collaborate with other routers.</p>
+</li>
+</ul>
+</div>
+</dd>
+<dt class="hdlist1"><code>id</code></dt>
+<dd>
+<p>The unique identifier for the router. This ID will also be the container name at the AMQP protocol level.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>For information about additional attributes, see <a href="https://qpid.apache.org/releases/qpid-dispatch-1.0.1/man/qdrouterd.conf.html#_router">router</a> in the <code>qdrouterd.conf</code> man page.</p>
+</div>
+</div>
+</div>
+</li>
+<li>
+<p>If necessary for your environment, secure the router.</p>
+<div class="openblock">
+<div class="content">
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#setting-up-ssl-for-encryption-and-authentication">Set up SSL/TLS for encryption, authentication, or both</a></p>
+</li>
+<li>
+<p><a href="#setting-up-sasl-for-authentication-and-payload-encryption">Set up SASL for authentication and payload encryption</a></p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</li>
+<li>
+<p>Connect the router to other routers, clients, and brokers.</p>
+<div class="openblock">
+<div class="content">
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#adding-incoming-connections">Add incoming connections</a></p>
+</li>
+<li>
+<p><a href="#adding-outgoing-connections">Add outgoing connections</a></p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</li>
+<li>
+<p>Set up routing for your environment:</p>
+<div class="openblock">
+<div class="content">
+<div class="ulist">
+<ul>
+<li>
+<p><a href="#routing-messages-between-clients">Configure the router to route messages between clients directly</a></p>
+</li>
+<li>
+<p><a href="#routing-messages-through-broker">Configure the router to route messages through a broker queue</a></p>
+</li>
+<li>
+<p><a href="#creating-link-route">Create a link route to define a private messaging path between endpoints</a></p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+</li>
+<li>
+<p><a href="#logging">Set up logging</a>.</p>
+</li>
+</ol>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="router-network-connections">5. Network Connections</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Connections define how the router communicates with clients, other routers, and brokers. You can configure <em>incoming connections</em> to define how the router listens for data from clients and other routers, and you can configure <em>outgoing connections</em> to define how the router sends data to other routers and brokers.</p>
+</div>
+<div class="sect2">
+<h3 id="adding-incoming-connections">5.1. Listening for Incoming Connections</h3>
+<div class="paragraph">
+<p>Listening for incoming connections involves setting the host and port on which the router should listen for traffic.</p>
+</div>
+<div class="olist arabic">
+<div class="title">Procedure</div>
+<ol class="arabic">
+<li>
+<p>In the router&#8217;s configuration file, add a <code>listener</code>:</p>
+<div class="openblock">
+<div class="content">
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">listener {
+    host: <em>HOST_NAME/ADDRESS</em>
+    port: <em>PORT_NUMBER/NAME</em>
+    ...
+}</pre>
+</div>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>host</code></dt>
+<dd>
+<p>Either an IP address (IPv4 or IPv6) or hostname on which the router should listen for incoming connections.</p>
+</dd>
+<dt class="hdlist1"><code>port</code></dt>
+<dd>
+<p>The port number or symbolic service name on which the router should listen for incoming connections.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>For information about additional attributes, see <a href="https://qpid.apache.org/releases/qpid-dispatch-1.0.1/man/qdrouterd.conf.html#_listener">listener</a> in the <code>qdrouterd.conf</code> man page.</p>
+</div>
+</div>
+</div>
+</li>
+<li>
+<p>If necessary, <a href="#securing-incoming-connections">secure the connection</a>.</p>
+<div class="paragraph">
+<p>If you have set up SSL/TLS or SASL in your environment, you can configure the router to only accept encrypted or authenticated communication on this connection.</p>
+</div>
+</li>
+<li>
+<p>If you want the router to listen for incoming connections on additional hosts or ports, configure an additional <code>listener</code> entity for each host and port.</p>
+</li>
+</ol>
+</div>
+</div>
+<div class="sect2">
+<h3 id="adding-outgoing-connections">5.2. Adding Outgoing Connections</h3>
+<div class="paragraph">
+<p>Configuring outgoing connections involves setting the host and port on which the router connects to other routers and brokers.</p>
+</div>
+<div class="paragraph">
+<p>When a router connects to a broker, the broker might provide backup connection data that the router can use if the primary connection fails. If the primary connection fails, the router attempts to reconnect by using a combination of the primary and&#8201;&#8212;&#8201;if provided&#8201;&#8212;&#8201;backup connections in round-robin fashion until the connection is successful. For more information about viewing the backup connection data provided by the broker, see <a href="#managing-connectors">Managing Connectors</a>.</p>
+</div>
+<div class="olist arabic">
+<div class="title">Procedure</div>
+<ol class="arabic">
+<li>
+<p>In the router&#8217;s configuration file, add a <code>connector</code>:</p>
+<div class="openblock">
+<div class="content">
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">connector {
+    name: <em>NAME</em>
+    host: <em>HOST_NAME/ADDRESS</em>
+    port: <em>PORT_NUMBER/NAME</em>
+    ...
+}</pre>
+</div>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>name</code></dt>
+<dd>
+<p>The name of the <code>connector</code>. You should specify a name that describes the entity to which the connector connects. This name is used by configured addresses (for example, a <code>linkRoute</code> entity) in order to specify which connection should be used for them.</p>
+</dd>
+<dt class="hdlist1"><code>host</code></dt>
+<dd>
+<p>Either an IP address (IPv4 or IPv6) or hostname on which the router should connect.</p>
+</dd>
+<dt class="hdlist1"><code>port</code></dt>
+<dd>
+<p>The port number or symbolic service name on which the router should connect.</p>
+</dd>
+</dl>
+</div>
+<div class="paragraph">
+<p>For information about additional attributes, see <a href="https://qpid.apache.org/releases/qpid-dispatch-1.0.1/man/qdrouterd.conf.html#_connector">connector</a> in the <code>qdrouterd.conf</code> man page.</p>
+</div>
+</div>
+</div>
+</li>
+<li>
+<p>If necessary, <a href="#securing-outgoing-connections">secure the connection</a>.</p>
+<div class="paragraph">
+<p>If you have set up SSL/TLS or SASL in your environment, you can configure the router to only send encrypted or authenticated communication on this connection.</p>
+</div>
+</li>
+<li>
+<p>For each remaining router or broker to which this router should connect, configure an additional <code>connector</code> entity.</p>
+</li>
+</ol>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="security-config">6. Security</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>Securing your router network involves configuring authentication and authorization. You can authenticate and encrypt the router&#8217;s connections using SSL/TLS or SASL. Additionally, you can authorize access to messaging resources by setting user connection restrictions and defining AMQP resource access control.</p>
+</div>
+<div class="sect2">
+<h3 id="authenticating_remote_peers">6.1. Authenticating Remote Peers</h3>
+<div class="paragraph">
+<p>You can configure Dispatch Router to communicate with clients, routers, and brokers in a secure way by authenticating and encrypting the router&#8217;s connections. Dispatch Router supports the following security protocols:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p><em>SSL/TLS</em> for certificate-based encryption and mutual authentication</p>
+</li>
+<li>
+<p><em>SASL</em> for authentication and payload encryption</p>
+</li>
+</ul>
+</div>
+<div class="sect3">
+<h4 id="setting-up-ssl-for-encryption-and-authentication">6.1.1. Setting Up SSL/TLS for Encryption and Authentication</h4>
+<div class="paragraph">
+<p>Before you can secure incoming and outgoing connections using SSL/TLS encryption and authentication, you must first set up the SSL/TLS profile in the router&#8217;s configuration file.</p>
+</div>
+<div class="paragraph">
+<div class="title">Prerequisites</div>
+<p>You must have the following files in PEM format:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>An X.509 CA certificate (used for signing the router certificate for the SSL/TLS server authentication feature).</p>
+</li>
+<li>
+<p>A private key (with or without password protection) for the router.</p>
+</li>
+<li>
+<p>An X.509 router certificate signed by the X.509 CA certificate.</p>
+</li>
+</ul>
+</div>
+<div class="ulist">
+<div class="title">Procedure</div>
+<ul>
+<li>
+<p>In the router&#8217;s configuration file, add an <code>sslProfile</code> section:</p>
+<div class="openblock">
+<div class="content">
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">sslProfile {
+    name: <em>NAME</em>
+    ciphers: <em>CIPHERS</em>
+    protocols: <em>PROTOCOL</em>
+    caCertFile: <em>PATH</em>.pem
+    certFile: <em>PATH</em>.pem
+    privateKeyFile: <em>PATH</em>.pem
+    password: <em>PASSWORD/PATH_TO_PASSWORD_FILE</em>
+    ...
+}</pre>
+</div>
+</div>
+<div class="dlist">
+<dl>
+<dt class="hdlist1"><code>name</code></dt>
+<dd>
+<p>A name for the SSL/TLS profile. You can use this name to refer to the profile from the incoming and outgoing connections.</p>
+<div class="paragraph">
+<p>For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">name: router-ssl-profile</pre>
+</div>
+</div>
+</dd>
+<dt class="hdlist1"><code>ciphers</code></dt>
+<dd>
+<p>The SSL cipher suites that can be used by this SSL/TLS profile. If certain ciphers are unsuitable for your environment, you can use this attribute to restrict them from being used.</p>
+<div class="paragraph">
+<p>To enable a cipher list, enter one or more cipher strings separated by colons (<code>:</code>).</p>
+</div>
+<div class="exampleblock">
+<div class="title">Example 3. Enabling a Cipher List</div>
+<div class="content">
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">ciphers: ALL:!aNULL:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="paragraph">
+<p>To see the full list of available ciphers, use the <code>openssl ciphers</code> command. For more information about each cipher, see the <a href="https://www.openssl.org/docs/manmaster/man1/ciphers.html" target="_blank" rel="noopener">ciphers man page</a>.</p>
+</div>
+</dd>
+<dt class="hdlist1"><code>protocols</code></dt>
+<dd>
+<p>The SSL/TLS protocols that this router can use. You can specify a list of one or more of the following values: TLSv1, TLSv1.1, or TLSv1.2.</p>
+<div class="paragraph">
+<p>To specify multiple protocols, separate the protocols with a space.</p>
+</div>
+<div class="exampleblock">
+<div class="title">Example 4. Specifying Multiple Protocols</div>
+<div class="content">
+<div class="paragraph">
+<p>This example permits the SSL/TLS profile to use TLS v1.1 and TLS v1.2 only:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">protocols: TLSv1.1 TLSv1.2</pre>
+</div>
+</div>
+</div>
+</div>
+<div class="paragraph">
+<p>If you do not specify a value, the router will use the TLS protocol specified by the system-wide configuration.</p>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>When setting the TLS protocol versions for the router, you should also consider the TLS protocol version (or versions) used by your client applications. If a subset of TLS protocol versions does not exist between a client and the router, the client will not be able to connect to the router.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+</dd>
+<dt class="hdlist1"><code>caCertFile</code></dt>
+<dd>
+<p>The absolute path to the file that contains the public certificates of trusted certificate authorities (CA).</p>
+<div class="paragraph">
+<p>For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">caCertFile: /qdrouterd/ssl_certs/ca-cert.pem</pre>
+</div>
+</div>
+</dd>
+<dt class="hdlist1"><code>certFile</code></dt>
+<dd>
+<p>The absolute path to the file containing the PEM-formatted public certificate to be used on the local end of any connections using this profile.</p>
+<div class="paragraph">
+<p>For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">certFile: /qdrouterd/ssl_certs/router-cert-pwd.pem</pre>
+</div>
+</div>
+</dd>
+<dt class="hdlist1"><code>privateKeyFile</code></dt>
+<dd>
+<p>The absolute path to the file containing the PEM-formatted private key for the above certificate.</p>
+<div class="paragraph">
+<p>For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="nowrap">privateKeyFile: /qdrouterd/ssl_certs

<TRUNCATED>

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


Mime
View raw message