summaryrefslogtreecommitdiff
path: root/doc/book/src
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2012-05-04 15:39:19 +0000
committerKim van der Riet <kpvdr@apache.org>2012-05-04 15:39:19 +0000
commit633c33f224f3196f3f9bd80bd2e418d8143fea06 (patch)
tree1391da89470593209466df68c0b40b89c14963b1 /doc/book/src
parentc73f9286ebff93a6c8dbc29cf05e258c4b55c976 (diff)
downloadqpid-python-633c33f224f3196f3f9bd80bd2e418d8143fea06.tar.gz
QPID-3858: Updated branch - merged from trunk r.1333987
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1334037 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'doc/book/src')
-rw-r--r--doc/book/src/AMQP-Messaging-Broker-Java.xml72
-rw-r--r--doc/book/src/Makefile.inc63
-rw-r--r--doc/book/src/Starting-a-cluster.xml561
-rw-r--r--doc/book/src/amqp-advanced-message-queueing-protocol.html237
-rw-r--r--doc/book/src/common/css/style.css279
-rw-r--r--doc/book/src/cpp-broker/AMQP-Compatibility.xml (renamed from doc/book/src/AMQP-Compatibility.xml)0
-rw-r--r--doc/book/src/cpp-broker/AMQP-Messaging-Broker-CPP-Book.xml (renamed from doc/book/src/AMQP-Messaging-Broker-CPP-Book.xml)37
-rw-r--r--doc/book/src/cpp-broker/Active-Active-Cluster.xml561
-rw-r--r--doc/book/src/cpp-broker/Active-Passive-Cluster.xml661
-rw-r--r--doc/book/src/cpp-broker/Cheat-Sheet-for-configuring-Exchange-Options.xml (renamed from doc/book/src/Cheat-Sheet-for-configuring-Exchange-Options.xml)0
-rw-r--r--doc/book/src/cpp-broker/Cheat-Sheet-for-configuring-Queue-Options.xml (renamed from doc/book/src/Cheat-Sheet-for-configuring-Queue-Options.xml)0
-rw-r--r--doc/book/src/cpp-broker/HA-Queue-Replication.xml54
-rw-r--r--doc/book/src/cpp-broker/LVQ.xml (renamed from doc/book/src/LVQ.xml)11
-rw-r--r--doc/book/src/cpp-broker/Makefile20
-rw-r--r--doc/book/src/cpp-broker/Managing-CPP-Broker.xml (renamed from doc/book/src/Managing-CPP-Broker.xml)39
-rw-r--r--doc/book/src/cpp-broker/QMF-Python-Console-Tutorial.xml (renamed from doc/book/src/QMF-Python-Console-Tutorial.xml)0
-rw-r--r--doc/book/src/cpp-broker/Qpid-Interoperability-Documentation.xml (renamed from doc/book/src/Qpid-Interoperability-Documentation.xml)0
-rw-r--r--doc/book/src/cpp-broker/Qpid-Management-Framework.xml (renamed from doc/book/src/Qpid-Management-Framework.xml)0
-rw-r--r--doc/book/src/cpp-broker/Running-CPP-Broker.xml (renamed from doc/book/src/Running-CPP-Broker.xml)0
-rw-r--r--doc/book/src/cpp-broker/Security.xml (renamed from doc/book/src/Security.xml)431
-rw-r--r--doc/book/src/cpp-broker/Using-Broker-Federation.xml (renamed from doc/book/src/Using-Broker-Federation.xml)0
-rw-r--r--doc/book/src/cpp-broker/Using-message-groups.xml (renamed from doc/book/src/Using-message-groups.xml)0
-rw-r--r--doc/book/src/cpp-broker/producer-flow-control.xml (renamed from doc/book/src/producer-flow-control.xml)0
-rw-r--r--doc/book/src/cpp-broker/queue-state-replication.xml (renamed from doc/book/src/queue-state-replication.xml)0
-rw-r--r--doc/book/src/css/style.css129
-rw-r--r--doc/book/src/java-broker/AMQP-Messaging-Broker-Java-Book.xml (renamed from doc/book/src/AMQP-Messaging-Broker-Java-Book.xml)0
-rw-r--r--doc/book/src/java-broker/Add-New-Users.xml (renamed from doc/book/src/Add-New-Users.xml)0
-rw-r--r--doc/book/src/java-broker/Broker-Configuration-Guide.xml (renamed from doc/book/src/Broker-Configuration-Guide.xml)2
-rw-r--r--doc/book/src/java-broker/Configure-ACLs.xml (renamed from doc/book/src/Configure-ACLs.xml)0
-rw-r--r--doc/book/src/java-broker/Configure-Java-Qpid-to-use-a-SSL-connection.xml (renamed from doc/book/src/Configure-Java-Qpid-to-use-a-SSL-connection.xml)0
-rw-r--r--doc/book/src/java-broker/Configure-Log4j-CompositeRolling-Appender.xml (renamed from doc/book/src/Configure-Log4j-CompositeRolling-Appender.xml)0
-rw-r--r--doc/book/src/java-broker/Configure-the-Broker-via-config.xml.xml (renamed from doc/book/src/Configure-the-Broker-via-config.xml.xml)0
-rw-r--r--doc/book/src/java-broker/Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml (renamed from doc/book/src/Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml)0
-rw-r--r--doc/book/src/java-broker/Configuring-Management-Users.xml (renamed from doc/book/src/Configuring-Management-Users.xml)0
-rw-r--r--doc/book/src/java-broker/Configuring-Qpid-JMX-Management-Console.xml (renamed from doc/book/src/Configuring-Qpid-JMX-Management-Console.xml)0
-rw-r--r--doc/book/src/java-broker/Debug-using-log4j.xml (renamed from doc/book/src/Debug-using-log4j.xml)0
-rw-r--r--doc/book/src/java-broker/How-to-Tune-M3-Java-Broker-Performance.xml (renamed from doc/book/src/How-to-Tune-M3-Java-Broker-Performance.xml)0
-rw-r--r--doc/book/src/java-broker/How-to-Use-SlowConsumerDisconnect.xml (renamed from doc/book/src/How-to-Use-SlowConsumerDisconnect.xml)0
-rw-r--r--doc/book/src/java-broker/Java-Broker-Feature-Guide.xml (renamed from doc/book/src/Java-Broker-Feature-Guide.xml)0
-rw-r--r--doc/book/src/java-broker/Java-Environment-Variables.xml (renamed from doc/book/src/Java-Environment-Variables.xml)0
-rw-r--r--doc/book/src/java-broker/Makefile20
-rw-r--r--doc/book/src/java-broker/Management-Console-Security.xml (renamed from doc/book/src/Management-Console-Security.xml)5
-rw-r--r--doc/book/src/java-broker/MessageStore-Tool.xml (renamed from doc/book/src/MessageStore-Tool.xml)0
-rw-r--r--doc/book/src/java-broker/Qpid-JMX-Management-Console-FAQ.xml (renamed from doc/book/src/Qpid-JMX-Management-Console-FAQ.xml)0
-rw-r--r--doc/book/src/java-broker/Qpid-JMX-Management-Console-User-Guide.xml (renamed from doc/book/src/Qpid-JMX-Management-Console-User-Guide.xml)44
-rw-r--r--doc/book/src/java-broker/Qpid-JMX-Management-Console.xml (renamed from doc/book/src/Qpid-JMX-Management-Console.xml)0
-rw-r--r--doc/book/src/java-broker/Qpid-Java-Broker-Management-CLI.xml (renamed from doc/book/src/Qpid-Java-Broker-Management-CLI.xml)0
-rw-r--r--doc/book/src/java-broker/Qpid-Java-Build-How-To.xml (renamed from doc/book/src/Qpid-Java-Build-How-To.xml)0
-rw-r--r--doc/book/src/java-broker/Qpid-Java-FAQ.xml (renamed from doc/book/src/Qpid-Java-FAQ.xml)0
-rw-r--r--doc/book/src/java-broker/Qpid-Management-Features.xml (renamed from doc/book/src/Qpid-Management-Features.xml)0
-rw-r--r--doc/book/src/java-broker/Qpid-Troubleshooting-Guide.xml (renamed from doc/book/src/Qpid-Troubleshooting-Guide.xml)0
-rw-r--r--doc/book/src/java-broker/Topic-Configuration.xml (renamed from doc/book/src/java/broker/configuration/Topic-Configuration.xml)0
-rw-r--r--doc/book/src/java-broker/Use-Priority-Queues.xml (renamed from doc/book/src/Use-Priority-Queues.xml)0
-rw-r--r--doc/book/src/java-broker/images/3113098.png (renamed from doc/book/src/images/jmx_console/3113098.png)bin9805 -> 9805 bytes
-rw-r--r--doc/book/src/java-broker/images/3113099.png (renamed from doc/book/src/images/jmx_console/3113099.png)bin12882 -> 12882 bytes
-rw-r--r--doc/book/src/java-broker/images/3113100.png (renamed from doc/book/src/images/jmx_console/3113100.png)bin38529 -> 38529 bytes
-rw-r--r--doc/book/src/java-broker/images/3113101.png (renamed from doc/book/src/images/jmx_console/3113101.png)bin45933 -> 45933 bytes
-rw-r--r--doc/book/src/java-broker/images/3113102.png (renamed from doc/book/src/images/jmx_console/3113102.png)bin7126 -> 7126 bytes
-rw-r--r--doc/book/src/java-broker/images/3113103.png (renamed from doc/book/src/images/jmx_console/3113103.png)bin34693 -> 34693 bytes
-rw-r--r--doc/book/src/java-broker/images/3113104.png (renamed from doc/book/src/images/jmx_console/3113104.png)bin61810 -> 61810 bytes
-rw-r--r--doc/book/src/java-broker/images/3113105.png (renamed from doc/book/src/images/jmx_console/3113105.png)bin26365 -> 26365 bytes
-rw-r--r--doc/book/src/java-broker/images/3113106.png (renamed from doc/book/src/images/jmx_console/3113106.png)bin45911 -> 45911 bytes
-rw-r--r--doc/book/src/java-broker/images/3113107.png (renamed from doc/book/src/images/jmx_console/3113107.png)bin31789 -> 31789 bytes
-rw-r--r--doc/book/src/java-broker/images/3113108.png (renamed from doc/book/src/images/jmx_console/3113108.png)bin39198 -> 39198 bytes
-rw-r--r--doc/book/src/java-broker/images/3113109.png (renamed from doc/book/src/images/jmx_console/3113109.png)bin13295 -> 13295 bytes
-rw-r--r--doc/book/src/java-broker/images/3113110.png (renamed from doc/book/src/images/jmx_console/3113110.png)bin38715 -> 38715 bytes
-rw-r--r--doc/book/src/java-broker/images/3113111.png (renamed from doc/book/src/images/jmx_console/3113111.png)bin52694 -> 52694 bytes
-rw-r--r--doc/book/src/java-broker/images/3113112.png (renamed from doc/book/src/images/jmx_console/3113112.png)bin39276 -> 39276 bytes
-rw-r--r--doc/book/src/java-broker/images/3113113.png (renamed from doc/book/src/images/jmx_console/3113113.png)bin46459 -> 46459 bytes
-rw-r--r--doc/book/src/java-broker/images/3113114.png (renamed from doc/book/src/images/jmx_console/3113114.png)bin64661 -> 64661 bytes
-rw-r--r--doc/book/src/java-broker/images/3113115.png (renamed from doc/book/src/images/jmx_console/3113115.png)bin38902 -> 38902 bytes
-rw-r--r--doc/book/src/java-broker/images/3113116.png (renamed from doc/book/src/images/jmx_console/3113116.png)bin9252 -> 9252 bytes
-rw-r--r--doc/book/src/java-broker/images/3113117.png (renamed from doc/book/src/images/jmx_console/3113117.png)bin40855 -> 40855 bytes
-rw-r--r--doc/book/src/java-broker/images/3113118.png (renamed from doc/book/src/images/jmx_console/3113118.png)bin13796 -> 13796 bytes
-rw-r--r--doc/book/src/java-broker/images/3113119.png (renamed from doc/book/src/images/jmx_console/3113119.png)bin39115 -> 39115 bytes
-rw-r--r--doc/book/src/old/ACL.xml (renamed from doc/book/src/ACL.xml)0
-rw-r--r--doc/book/src/old/AMQP-.NET-Messaging-Client.xml (renamed from doc/book/src/AMQP-.NET-Messaging-Client.xml)0
-rw-r--r--doc/book/src/old/AMQP-C++-Messaging-Client.xml (renamed from doc/book/src/AMQP-C++-Messaging-Client.xml)0
-rw-r--r--doc/book/src/old/AMQP-Java-JMS-Messaging-Client.xml (renamed from doc/book/src/AMQP-Java-JMS-Messaging-Client.xml)0
-rw-r--r--doc/book/src/old/AMQP-Messaging-Broker-CPP.xml (renamed from doc/book/src/AMQP-Messaging-Broker-CPP.xml)2
-rw-r--r--doc/book/src/old/AMQP-Python-Messaging-Client.xml (renamed from doc/book/src/AMQP-Python-Messaging-Client.xml)0
-rw-r--r--doc/book/src/old/AMQP-Ruby-Messaging-Client.xml (renamed from doc/book/src/AMQP-Ruby-Messaging-Client.xml)0
-rw-r--r--doc/book/src/old/AMQP.xml (renamed from doc/book/src/AMQP.xml)0
-rw-r--r--doc/book/src/old/Binding-URL-Format.xml (renamed from doc/book/src/Binding-URL-Format.xml)0
-rw-r--r--doc/book/src/old/Book-Info.xml (renamed from doc/book/src/Book-Info.xml)0
-rw-r--r--doc/book/src/old/Book.xml (renamed from doc/book/src/Book.xml)0
-rw-r--r--doc/book/src/old/Broker-CPP.xml (renamed from doc/book/src/Broker-CPP.xml)0
-rw-r--r--doc/book/src/old/Broker-Java.xml (renamed from doc/book/src/Broker-Java.xml)0
-rw-r--r--doc/book/src/old/Clients.xml (renamed from doc/book/src/Clients.xml)0
-rw-r--r--doc/book/src/old/Connection-URL-Format.xml (renamed from doc/book/src/Connection-URL-Format.xml)0
-rw-r--r--doc/book/src/old/Download.xml (renamed from doc/book/src/Download.xml)0
-rw-r--r--doc/book/src/old/Excel-AddIn.xml (renamed from doc/book/src/Excel-AddIn.xml)0
-rw-r--r--doc/book/src/old/FAQ.xml (renamed from doc/book/src/FAQ.xml)0
-rw-r--r--doc/book/src/old/Getting-Started.xml (renamed from doc/book/src/Getting-Started.xml)0
-rw-r--r--doc/book/src/old/How-to-Use-JNDI.xml (renamed from doc/book/src/How-to-Use-JNDI.xml)2
-rw-r--r--doc/book/src/old/InfoPlugin.xml (renamed from doc/book/src/InfoPlugin.xml)0
-rw-r--r--doc/book/src/old/Introduction.xml (renamed from doc/book/src/Introduction.xml)0
-rw-r--r--doc/book/src/old/Java-Broker-StatusLogMessages.xml (renamed from doc/book/src/Java-Broker-StatusLogMessages.xml)0
-rw-r--r--doc/book/src/old/Java-JMS-Selector-Syntax.xml (renamed from doc/book/src/Java-JMS-Selector-Syntax.xml)0
-rw-r--r--doc/book/src/old/Management-Design-notes.xml (renamed from doc/book/src/Management-Design-notes.xml)0
-rw-r--r--doc/book/src/old/NET-User-Guide.xml (renamed from doc/book/src/NET-User-Guide.xml)0
-rw-r--r--doc/book/src/old/PythonBrokerTest.xml (renamed from doc/book/src/PythonBrokerTest.xml)0
-rw-r--r--doc/book/src/old/QMan-Qpid-Management-bridge.xml (renamed from doc/book/src/QMan-Qpid-Management-bridge.xml)0
-rw-r--r--doc/book/src/old/Qpid-ACLs.xml (renamed from doc/book/src/Qpid-ACLs.xml)0
-rw-r--r--doc/book/src/old/Qpid-Book.xml (renamed from doc/book/src/Qpid-Book.xml)0
-rw-r--r--doc/book/src/old/Qpid-Compatibility-And-Interoperability-Book.xml (renamed from doc/book/src/Qpid-Compatibility-And-Interoperability-Book.xml)0
-rw-r--r--doc/book/src/old/SASL-Compatibility.xml (renamed from doc/book/src/SASL-Compatibility.xml)0
-rw-r--r--doc/book/src/old/SSL.xml (renamed from doc/book/src/SSL.xml)0
-rw-r--r--doc/book/src/old/Security-Plugins.xml (renamed from doc/book/src/Security-Plugins.xml)0
-rw-r--r--doc/book/src/old/System-Properties.xml (renamed from doc/book/src/System-Properties.xml)0
-rw-r--r--doc/book/src/old/Using-Qpid-with-other-JNDI-Providers.xml (renamed from doc/book/src/Using-Qpid-with-other-JNDI-Providers.xml)0
-rw-r--r--doc/book/src/old/WCF.xml (renamed from doc/book/src/WCF.xml)0
-rw-r--r--doc/book/src/old/schemas.xml102
-rw-r--r--doc/book/src/programming/Makefile20
-rw-r--r--doc/book/src/programming/Message-Groups-Guide.xml (renamed from doc/book/src/Message-Groups-Guide.xml)0
-rw-r--r--doc/book/src/programming/Programming-In-Apache-Qpid-Book.xml (renamed from doc/book/src/Programming-In-Apache-Qpid.xml)4700
-rw-r--r--doc/book/src/qmf/QmfBook.xml (renamed from doc/book/src/QmfBook.xml)0
-rw-r--r--doc/book/src/qmf/QmfIntroduction.xml (renamed from doc/book/src/QmfIntroduction.xml)0
-rw-r--r--doc/book/src/schemas.xml101
119 files changed, 4447 insertions, 3706 deletions
diff --git a/doc/book/src/AMQP-Messaging-Broker-Java.xml b/doc/book/src/AMQP-Messaging-Broker-Java.xml
deleted file mode 100644
index 6cd7ce915e..0000000000
--- a/doc/book/src/AMQP-Messaging-Broker-Java.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- 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.
-
--->
-
-<part id="Java-Broker">
- <title>AMQP Messaging Broker (Implemented in Java)</title>
- <partintro>
- <para>Qpid provides two AMQP messaging brokers:</para>
-
- <itemizedlist>
- <listitem><para>Implemented in C++ - high performance, low latency, and RDMA support.</para></listitem>
- <listitem><para>Implemented in Java - Fully JMS compliant, runs on any Java platform.</para></listitem>
- </itemizedlist>
-
- <para>Both AMQP messaging brokers support clients in multiple languages, as long as the messaging client and the messaging broker use the same version of AMQP. See <link linkend="AMQP-Compatibility"/> to see which messaging clients work with each broker.</para>
-
- <para>This section contains information specific to the broker that is implemented in Java.</para>
- </partintro>
-
-<chapter id="Java-General-User-Guides">
- <title>General User Guides</title>
-
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Java-Broker-Feature-Guide.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-Java-FAQ.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Java-Environment-Variables.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-Troubleshooting-Guide.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Broker-Configuration-Guide.xml"/>
-</chapter>
-
-<chapter id="Qpid-Java-Broker-HowTos">
-<title>How Tos</title>
-
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Add-New-Users.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure-ACLs.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure-Java-Qpid-to-use-a-SSL-connection.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure-Log4j-CompositeRolling-Appender.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure-the-Broker-via-config.xml.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Debug-using-log4j.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="How-to-Tune-M3-Java-Broker-Performance.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-Java-Build-How-To.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Use-Priority-Queues.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="How-to-Use-SlowConsumerDisconnect.xml"/>
-</chapter>
-
-
-<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-JMX-Management-Console.xml"/>
-
-<chapter id="QpidJavaBroker-ManagementTools">
-<title>Management Tools</title>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="MessageStore-Tool.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-Java-Broker-Management-CLI.xml"/>
-</chapter>
-</part>
diff --git a/doc/book/src/Makefile.inc b/doc/book/src/Makefile.inc
new file mode 100644
index 0000000000..12cab54f8a
--- /dev/null
+++ b/doc/book/src/Makefile.inc
@@ -0,0 +1,63 @@
+#
+# 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.
+#
+
+BOOK=$(wildcard *Book.xml)
+XML=$(wildcard *.xml) $(wildcard ../common/*.xml)
+IMAGES=$(wildcard images/*.png)
+CSS=$(wilcard ../common/css/*.css)
+
+OUTPUTDIR=output
+OUTPUT= $(BOOK:%.xml=$(OUTPUTDIR)/%/)
+
+all: html pdf
+
+pdf: $(OUTPUT)/pdf $(BOOK:%.xml=$(OUTPUT)/pdf/%.pdf)
+
+html: $(OUTPUT)/html $(BOOK:%.xml=$(OUTPUT)/html/index.html)
+
+$(OUTPUT)/html/images: $(IMAGES)
+ -mkdir -p $(OUTPUT)/html/images
+ -cp images/*.png $(OUTPUT)/html/images/
+
+$(OUTPUT)/html/css: $(CSS)
+ -mkdir -p $(OUTPUT)/html/css
+ -cp ../common/css/*.css $(OUTPUT)/html/css
+
+$(OUTPUT)/html:
+ -mkdir -p $(OUTPUT)/html
+
+$(OUTPUT)/pdf:
+ -mkdir -p $(OUTPUT)/pdf
+
+$(OUTPUT)/html/index.html: $(BOOK) $(OUTPUT)/html/css $(OUTPUT)/html/images $(XML)
+ xsltproc -o $(OUTPUT)/html/ --xinclude --stringparam chunk.section.depth 1 --stringparam section.autolabel 1 --stringparam callout.graphics 0 --stringparam callout.unicode 0 --stringparam section.label.includes.component.label 1 --stringparam use.id.as.filename 1 --stringparam html.stylesheet css/style.css --stringparam section.autolabel.max.depth 3 --stringparam toc.section.depth 2 --stringparam chunker.output.encoding UTF-8 --stringparam css.decoration 0 ../../xsl/html-custom.xsl $<
+
+%.fo: %.xml
+ xsltproc --xinclude --stringparam section.autolabel 1 --stringparam callout.graphics 0 --stringparam callout.unicode 0 --stringparam section.label.includes.component.label 1 http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl $< > $@
+
+
+%.pdf: %.fo
+ fop $< $@
+
+$(OUTPUT)/pdf/%.pdf: %.pdf
+ @mv $< $@
+
+clean:
+ -rm -rf $(OUTPUT) *.fo
+
diff --git a/doc/book/src/Starting-a-cluster.xml b/doc/book/src/Starting-a-cluster.xml
deleted file mode 100644
index 036e571649..0000000000
--- a/doc/book/src/Starting-a-cluster.xml
+++ /dev/null
@@ -1,561 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- 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.
-
--->
-
-<section id="chap-Messaging_User_Guide-High_Availability_Messaging_Clusters">
- <title>High Availability Messaging Clusters</title>
- <para>
- High Availability Messaging Clusters provide fault tolerance by ensuring that every broker in a <firstterm>cluster</firstterm> has the same queues, exchanges, messages, and bindings, and allowing a client to <firstterm>fail over</firstterm> to a new broker and continue without any loss of messages if the current broker fails or becomes unavailable. Because all brokers are automatically kept in a consistent state, clients can connect to and use any broker in a cluster. Any number of messaging brokers can be run as one <firstterm>cluster</firstterm>, and brokers can be added to or removed from a cluster while it is in use.
- </para>
- <para>
- High Availability Messaging Clusters are implemented using using the <ulink url="http://www.openais.org/">OpenAIS Cluster Framework</ulink>.
- </para>
- <para>
- An OpenAIS daemon runs on every machine in the cluster, and these daemons communicate using multicast on a particular address. Every qpidd process in a cluster joins a named group that is automatically synchronized using OpenAIS Closed Process Groups (CPG) — the qpidd processes multicast events to the named group, and CPG ensures that each qpidd process receives all the events in the same sequence. All members get an identical sequence of events, so they can all update their state consistently.
- </para>
- <para>
- Two messaging brokers are in the same cluster if
- <orderedlist>
- <listitem>
- <para>
- They run on hosts in the same OpenAIS cluster; that is, OpenAIS is configured with the same mcastaddr, mcastport and bindnetaddr, and
- </para>
-
- </listitem>
- <listitem>
- <para>
- They use the same cluster name.
- </para>
-
- </listitem>
-
- </orderedlist>
-
- </para>
- <para>
- High Availability Clustering has a cost: in order to allow each broker in a cluster to continue the work of any other broker, a cluster must replicate state for all brokers in the cluster. Because of this, the brokers in a cluster should normally be on a LAN; there should be fast and reliable connections between brokers. Even on a LAN, using multiple brokers in a cluster is somewhat slower than using a single broker without clustering. This may be counter-intuitive for people who are used to clustering in the context of High Performance Computing or High Throughput Computing, where clustering increases performance or throughput.
- </para>
-
- <para>
- High Availability Messaging Clusters should be used together with Red Hat Clustering Services (RHCS); without RHCS, clusters are vulnerable to the &#34;split-brain&#34; condition, in which a network failure splits the cluster into two sub-clusters that cannot communicate with each other. See the documentation on the <command>--cluster-cman</command> option for details on running using RHCS with High Availability Messaging Clusters. See the <ulink url="http://sources.redhat.com/cluster/wiki">CMAN Wiki</ulink> for more detail on CMAN and split-brain conditions. Use the <command>--cluster-cman</command> option to enable RHCS when starting the broker.
- </para>
- <section id="sect-Messaging_User_Guide-High_Availability_Messaging_Clusters-Starting_a_Broker_in_a_Cluster">
- <title>Starting a Broker in a Cluster</title>
- <para>
- Clustering is implemented using the <filename>cluster.so</filename> module, which is loaded by default when you start a broker. To run brokers in a cluster, make sure they all use the same OpenAIS mcastaddr, mcastport, and bindnetaddr. All brokers in a cluster must also have the same cluster name — specify the cluster name in <filename>qpidd.conf</filename>:
- </para>
-
-<screen>cluster-name=&#34;local_test_cluster&#34;
-</screen>
- <para>
- On RHEL6, you must create the file <filename>/etc/corosync/uidgid.d/qpidd</filename> to tell Corosync the name of the user running the broker.By default, the user is qpidd:
- </para>
-
-<programlisting>
-uidgid {
- uid: qpidd
- gid: qpidd
-}
-</programlisting>
- <para>
- On RHEL5, the primary group for the process running qpidd must be the ais group. If you are running qpidd as a service, it is run as the <command>qpidd</command> user, which is already in the ais group. If you are running the broker from the command line, you must ensure that the primary group for the user running qpidd is ais. You can set the primary group using <command>newgrp</command>:
- </para>
-
-<screen>$ newgrp ais
-</screen>
- <para>
- You can then run the broker from the command line, specifying the cluster name as an option.
- </para>
-
-<screen>[jonathan@localhost]$ qpidd --cluster-name=&#34;local_test_cluster&#34;
-</screen>
- <para>
- All brokers in a cluster must have identical configuration, with a few exceptions noted below. They must load the same set of plug-ins, and have matching configuration files and command line arguments. The should also have identical ACL files and SASL databases if these are used. If one broker uses persistence, all must use persistence — a mix of transient and persistent brokers is not allowed. Differences in configuration can cause brokers to exit the cluster. For instance, if different ACL settings allow a client to access a queue on broker A but not on broker B, then publishing to the queue will succeed on A and fail on B, so B will exit the cluster to prevent inconsistency.
- </para>
- <para>
- The following settings can differ for brokers on a given cluster:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- logging options
- </para>
-
- </listitem>
- <listitem>
- <para>
- cluster-url — if set, it will be different for each broker.
- </para>
-
- </listitem>
- <listitem>
- <para>
- port — brokers can listen on different ports.
- </para>
-
- </listitem>
-
- </itemizedlist>
- <para>
- The qpid log contains entries that record significant clustering events, e.g. when a broker becomes a member of a cluster, the membership of a cluster is changed, or an old journal is moved out of the way. For instance, the following message states that a broker has been added to a cluster as the first node:
- </para>
-
-<screen>
-2009-07-09 18:13:41 info 127.0.0.1:1410(READY) member update: 127.0.0.1:1410(member)
-2009-07-09 18:13:41 notice 127.0.0.1:1410(READY) first in cluster
-</screen>
- <note>
- <para>
- If you are using SELinux, the qpidd process and OpenAIS must have the same SELinux context, or else SELinux must be set to permissive mode. If both qpidd and OpenAIS are run as services, they have the same SELinux context. If both OpenAIS and qpidd are run as user processes, they have the same SELinux context. If one is run as a service, and the other is run as a user process, they have different SELinux contexts.
- </para>
-
- </note>
- <para>
- The following options are available for clustering:
- </para>
- <table frame="all" id="tabl-Messaging_User_Guide-Starting_a_Broker_in_a_Cluster-Options_for_High_Availability_Messaging_Cluster">
- <title>Options for High Availability Messaging Cluster</title>
- <tgroup align="left" cols="2" colsep="1" rowsep="1">
- <colspec colname="c1" colwidth="1*"></colspec>
- <colspec colname="c2" colwidth="4*"></colspec>
- <thead>
- <row>
- <entry align="center" nameend="c2" namest="c1">
- Options for High Availability Messaging Cluster
- </entry>
-
- </row>
-
- </thead>
- <tbody>
- <row>
- <entry>
- <command>--cluster-name <replaceable>NAME</replaceable></command>
- </entry>
- <entry>
- Name of the Messaging Cluster to join. A Messaging Cluster consists of all brokers started with the same cluster-name and openais configuration.
- </entry>
-
- </row>
- <row>
- <entry>
- <command>--cluster-size <replaceable>N</replaceable></command>
- </entry>
- <entry>
- Wait for at least N initial members before completing cluster initialization and serving clients. Use this option in a persistent cluster so all brokers in a persistent cluster can exchange the status of their persistent store and do consistency checks before serving clients.
- </entry>
-
- </row>
- <row>
- <entry>
- <command>--cluster-url <replaceable>URL</replaceable></command>
- </entry>
- <entry>
- An AMQP URL containing the local address that the broker advertizes to clients for fail-over connections. This is different for each host. By default, all local addresses for the broker are advertized. You only need to set this if
- <orderedlist>
- <listitem>
- <para>
- Your host has more than one active network interface, and
- </para>
-
- </listitem>
- <listitem>
- <para>
- You want to restrict client fail-over to a specific interface or interfaces.
- </para>
-
- </listitem>
-
- </orderedlist>
- <para>Each broker in the cluster is specified using the following form:</para>
-
-<programlisting>url = [&#34;amqp:&#34;][ user [&#34;/&#34; password] &#34;@&#34; ] protocol_addr
- (&#34;,&#34; protocol_addr)*
-protocol_addr = tcp_addr / rmda_addr / ssl_addr / ...
-tcp_addr = [&#34;tcp:&#34;] host [&#34;:&#34; port]
-rdma_addr = &#34;rdma:&#34; host [&#34;:&#34; port]
-ssl_addr = &#34;ssl:&#34; host [&#34;:&#34; port]</programlisting>
-
- <para>In most cases, only one address is advertized, but more than one address can be specified in if the machine running the broker has more than one network interface card, and you want to allow clients to connect using multiple network interfaces. Use a comma delimiter (&#34;,&#34;) to separate brokers in the URL. Examples:</para>
- <itemizedlist>
- <listitem>
- <para>
- <command>amqp:tcp:192.168.1.103:5672</command> advertizes a single address to the broker for failover.
- </para>
-
- </listitem>
- <listitem>
- <para>
- <command>amqp:tcp:192.168.1.103:5672,tcp:192.168.1.105:5672</command> advertizes two different addresses to the broker for failover, on two different network interfaces.
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </entry>
-
- </row>
- <row>
- <entry>
- <command>--cluster-cman</command>
- </entry>
- <entry>
- <para>
- CMAN protects against the &#34;split-brain&#34; condition, in which a network failure splits the cluster into two sub-clusters that cannot communicate with each other. When &#34;split-brain&#34; occurs, each of the sub-clusters can access shared resources without knowledge of the other sub-cluster, resulting in corrupted cluster integrity.
- </para>
- <para>
- To avoid &#34;split-brain&#34;, CMAN uses the notion of a &#34;quorum&#34;. If more than half the cluster nodes are active, the cluster has quorum and can act. If half (or fewer) nodes are active, the cluster does not have quorum, and all cluster activity is stopped. There are other ways to define the quorum for particular use cases (e.g. a cluster of only 2 members), see the <ulink url="http://sources.redhat.com/cluster/wiki">CMAN Wiki</ulink>
-for more detail.
- </para>
- <para>
- When enabled, the broker will wait until it belongs to a quorate cluster before accepting client connections. It continually monitors the quorum status and shuts down immediately if the node it runs on loses touch with the quorum.
- </para>
-
- </entry>
-
- </row>
- <row>
- <entry>
- --cluster-username
- </entry>
- <entry>
- SASL username for connections between brokers.
- </entry>
-
- </row>
- <row>
- <entry>
- --cluster-password
- </entry>
- <entry>
- SASL password for connections between brokers.
- </entry>
-
- </row>
- <row>
- <entry>
- --cluster-mechanism
- </entry>
- <entry>
- SASL authentication mechanism for connections between brokers
- </entry>
-
- </row>
-
- </tbody>
-
- </tgroup>
-
- </table>
- <para>
- If a broker is unable to establish a connection to another broker in the cluster, the log will contain SASL errors, e.g:
- </para>
-
-<screen>2009-aug-04 10:17:37 info SASL: Authentication failed: SASL(-13): user not found: Password verification failed
-</screen>
- <para>
- You can set the SASL user name and password used to connect to other brokers using the <command>cluster-username</command> and <command>cluster-password</command> properties when you start the broker. In most environment, it is easiest to create an account with the same user name and password on each broker in the cluster, and use these as the <command>cluster-username</command> and <command>cluster-password</command>. You can also set the SASL mode using <command>cluster-mechanism</command>. Remember that any mechanism you enable for broker-to-broker communication can also be used by a client, so do not enable <command>cluster-mechanism=ANONYMOUS</command> in a secure environment.
- </para>
- <para>
- Once the cluster is running, run <command>qpid-cluster</command> to make sure that the brokers are running as one cluster. See the following section for details.
- </para>
- <para>
- If the cluster is correctly configured, queues and messages are replicated to all brokers in the cluster, so an easy way to test the cluster is to run a program that routes messages to a queue on one broker, then connect to a different broker in the same cluster and read the messages to make sure they have been replicated. The <command>drain</command> and <command>spout</command> programs can be used for this test.
- </para>
-
- </section>
-
- <section id="sect-Messaging_User_Guide-High_Availability_Messaging_Clusters-qpid_cluster">
- <title>qpid-cluster</title>
- <para>
- <command>qpid-cluster</command> is a command-line utility that allows you to view information on a cluster and its brokers, disconnect a client connection, shut down a broker in a cluster, or shut down the entire cluster. You can see the options using the <command>--help</command> option:
- </para>
-
-<screen>$ ./qpid-cluster --help
-</screen>
-
-<screen>Usage: qpid-cluster [OPTIONS] [broker-addr]
-
- broker-addr is in the form: [username/password@] hostname | ip-address [:&#60;port&#62;]
- ex: localhost, 10.1.1.7:10000, broker-host:10000, guest/guest@localhost
-
-Options:
- -C [--all-connections] View client connections to all cluster members
- -c [--connections] ID View client connections to specified member
- -d [--del-connection] HOST:PORT
- Disconnect a client connection
- -s [--stop] ID Stop one member of the cluster by its ID
- -k [--all-stop] Shut down the whole cluster
- -f [--force] Suppress the &#39;are-you-sure?&#39; prompt
- -n [--numeric] Don&#39;t resolve names
-</screen>
- <para>
- Let&#39;s connect to a cluster and display basic information about the cluser and its brokers. When you connect to the cluster using <command>qpid-tool</command>, you can use the host and port for any broker in the cluster. For instance, if a broker in the cluster is running on <filename>localhost</filename> on port 6664, you can start <command>qpid-tool</command> like this:
- </para>
-
-<screen>
-$ qpid-cluster localhost:6664
-</screen>
- <para>
- Here is the output:
- </para>
-
-<screen>
- Cluster Name: local_test_cluster
-Cluster Status: ACTIVE
- Cluster Size: 3
- Members: ID=127.0.0.1:13143 URL=amqp:tcp:192.168.1.101:6664,tcp:192.168.122.1:6664,tcp:10.16.10.62:6664
- : ID=127.0.0.1:13167 URL=amqp:tcp:192.168.1.101:6665,tcp:192.168.122.1:6665,tcp:10.16.10.62:6665
- : ID=127.0.0.1:13192 URL=amqp:tcp:192.168.1.101:6666,tcp:192.168.122.1:6666,tcp:10.16.10.62:6666
-</screen>
- <para>
- The ID for each broker in cluster is given on the left. For instance, the ID for the first broker in the cluster is <command>127.0.0.1:13143</command>. The URL in the output is the broker&#39;s advertized address. Let&#39;s use the ID to shut the broker down using the <command>--stop</command> command:
- </para>
-
-<screen>$ ./qpid-cluster localhost:6664 --stop 127.0.0.1:13143
-</screen>
-
- </section>
-
- <section id="sect-Messaging_User_Guide-High_Availability_Messaging_Clusters-Failover_in_Clients">
- <title>Failover in Clients</title>
- <para>
- If a client is connected to a broker, the connection fails if the broker crashes or is killed. If heartbeat is enabled for the connection, a connection also fails if the broker hangs, the machine the broker is running on fails, or the network connection to the broker is lost — the connection fails no later than twice the heartbeat interval.
- </para>
- <para>
- When a client&#39;s connection to a broker fails, any sent messages that have been acknowledged to the sender will have been replicated to all brokers in the cluster, any received messages that have not yet been acknowledged by the receiving client requeued to all brokers, and the client API notifies the application of the failure by throwing an exception.
- </para>
- <para>
- Clients can be configured to automatically reconnect to another broker when it receives such an exception. Any messages that have been sent by the client, but not yet acknowledged as delivered, are resent. Any messages that have been read by the client, but not acknowledged, are delivered to the client.
- </para>
- <para>
- TCP is slow to detect connection failures. A client can configure a connection to use a heartbeat to detect connection failure, and can specify a time interval for the heartbeat. If heartbeats are in use, failures will be detected no later than twice the heartbeat interval. The Java JMS client enables hearbeat by default. See the sections on Failover in Java JMS Clients and Failover in C++ Clients for the code to enable heartbeat.
- </para>
- <section id="sect-Messaging_User_Guide-Failover_in_Clients-Failover_in_Java_JMS_Clients">
- <title>Failover in Java JMS Clients</title>
- <para>
- In Java JMS clients, client failover is handled automatically if it is enabled in the connection. Any messages that have been sent by the client, but not yet acknowledged as delivered, are resent. Any messages that have been read by the client, but not acknowledged, are sent to the client.
- </para>
- <para>
- You can configure a connection to use failover using the <command>failover</command> property:
- </para>
-
-<screen>
-connectionfactory.qpidConnectionfactory = amqp://guest:guest@clientid/test?brokerlist=&#39;tcp://localhost:5672&#39;&amp;failover=&#39;failover_exchange&#39;
-</screen>
- <para>
- This property can take three values:
- </para>
- <variablelist id="vari-Messaging_User_Guide-Failover_in_Java_JMS_Clients-Failover_Modes">
- <title>Failover Modes</title>
- <varlistentry>
- <term>failover_exchange</term>
- <listitem>
- <para>
- If the connection fails, fail over to any other broker in the cluster.
- </para>
-
- </listitem>
-
- </varlistentry>
- <varlistentry>
- <term>roundrobin</term>
- <listitem>
- <para>
- If the connection fails, fail over to one of the brokers specified in the <command>brokerlist</command>.
- </para>
-
- </listitem>
-
- </varlistentry>
- <varlistentry>
- <term>singlebroker</term>
- <listitem>
- <para>
- Failover is not supported; the connection is to a single broker only.
- </para>
-
- </listitem>
-
- </varlistentry>
-
- </variablelist>
- <para>
- In a Connection URL, heartbeat is set using the <command>idle_timeout</command> property, which is an integer corresponding to the heartbeat period in seconds. For instance, the following line from a JNDI properties file sets the heartbeat time out to 3 seconds:
- </para>
-
-<screen>
-connectionfactory.qpidConnectionfactory = amqp://guest:guest@clientid/test?brokerlist=&#39;tcp://localhost:5672&#39;,idle_timeout=3
-</screen>
-
- </section>
-
- <section id="sect-Messaging_User_Guide-Failover_in_Clients-Failover_and_the_Qpid_Messaging_API">
- <title>Failover and the Qpid Messaging API</title>
- <para>
- The Qpid Messaging API also supports automatic reconnection in the event a connection fails. . Senders can also be configured to replay any in-doubt messages (i.e. messages whice were sent but not acknowleged by the broker. See &#34;Connection Options&#34; and &#34;Sender Capacity and Replay&#34; in <citetitle>Programming in Apache Qpid</citetitle> for details.
- </para>
- <para>
- In C++ and python clients, heartbeats are disabled by default. You can enable them by specifying a heartbeat interval (in seconds) for the connection via the &#39;heartbeat&#39; option.
- </para>
- <para>
- See &#34;Cluster Failover&#34; in <citetitle>Programming in Apache Qpid</citetitle> for details on how to keep the client aware of cluster membership.
- </para>
-
- </section>
-
-
- </section>
-
- <section id="sect-Messaging_User_Guide-High_Availability_Messaging_Clusters-Error_handling_in_Clusters">
- <title>Error handling in Clusters</title>
- <para>
- If a broker crashes or is killed, or a broker machine failure, broker connection failure, or a broker hang is detected, the other brokers in the cluster are notified that it is no longer a member of the cluster. If a new broker is joined to the cluster, it synchronizes with an active broker to obtain the current cluster state; if this synchronization fails, the new broker exit the cluster and aborts.
- </para>
- <para>
- If a broker becomes extremely busy and stops responding, it stops accepting incoming work. All other brokers continue processing, and the non-responsive node caches all AIS traffic. When it resumes, the broker completes processes all cached AIS events, then accepts further incoming work. <!-- If a broker is non-responsive for too long, it is assumed to be hanging, and treated as described in the previous paragraph. -->
- </para>
- <para>
- Broker hangs are only detected if the watchdog plugin is loaded and the <command>--watchdog-interval</command> option is set. The watchdog plug-in kills the qpidd broker process if it becomes stuck for longer than the watchdog interval. In some cases, e.g. certain phases of error resolution, it is possible for a stuck process to hang other cluster members that are waiting for it to send a message. Using the watchdog, the stuck process is terminated and removed from the cluster, allowing other members to continue and clients of the stuck process to fail over to other members.
- </para>
- <para>
- Redundancy can also be achieved directly in the AIS network by specifying more than one network interface in the AIS configuration file. This causes Totem to use a redundant ring protocol, which makes failure of a single network transparent.
- </para>
- <para>
- Redundancy can be achieved at the operating system level by using NIC bonding, which combines multiple network ports into a single group, effectively aggregating the bandwidth of multiple interfaces into a single connection. This provides both network load balancing and fault tolerance.
- </para>
- <para>
- If any broker encounters an error, the brokers compare notes to see if they all received the same error. If not, the broker removes itself from the cluster and shuts itself down to ensure that all brokers in the cluster have consistent state. For instance, a broker may run out of disk space; if this happens, the broker shuts itself down. Examining the broker&#39;s log can help determine the error and suggest ways to prevent it from occuring in the future.
- </para>
- <!-- "Bad case" for cluster matrix - things we will fix, or things users may encounter long term? -->
- </section>
-
- <section id="sect-Messaging_User_Guide-High_Availability_Messaging_Clusters-Persistence_in_High_Availability_Message_Clusters">
- <title>Persistence in High Availability Message Clusters</title>
- <para>
- Persistence and clustering are two different ways to provide reliability. Most systems that use a cluster do not enable persistence, but you can do so if you want to ensure that messages are not lost even if the last broker in a cluster fails. A cluster must have all transient or all persistent members, mixed clusters are not allowed. Each broker in a persistent cluster has it&#39;s own independent replica of the cluster&#39;s state it its store.
- </para>
- <section id="sect-Messaging_User_Guide-Persistence_in_High_Availability_Message_Clusters-Clean_and_Dirty_Stores">
- <title>Clean and Dirty Stores</title>
- <para>
- When a broker is an active member of a cluster, its store is marked &#34;dirty&#34; because it may be out of date compared to other brokers in the cluster. If a broker leaves a running cluster because it is stopped, it crashes or the host crashes, its store continues to be marked &#34;dirty&#34;.
- </para>
- <para>
- If the cluster is reduced to a single broker, its store is marked &#34;clean&#34; since it is the only broker making updates. If the cluster is shut down with the command <literal>qpid-cluster -k</literal> then all the stores are marked clean.
- </para>
- <para>
- When a cluster is initially formed, brokers with clean stores read from their stores. Brokers with dirty stores, or brokers that join after the cluster is running, discard their old stores and initialize a new store with an update from one of the running brokers. The <command>--truncate</command> option can be used to force a broker to discard all existing stores even if they are clean. (A dirty store is discarded regardless.)
- </para>
- <para>
- Discarded stores are copied to a back up directory. The active store is in &#60;data-dir&#62;/rhm. Back-up stores are in &#60;data-dir&#62;/_cluster.bak.&#60;nnnn&#62;/rhm, where &#60;nnnn&#62; is a 4 digit number. A higher number means a more recent backup.
- </para>
-
- </section>
-
- <section id="sect-Messaging_User_Guide-Persistence_in_High_Availability_Message_Clusters-Starting_a_persistent_cluster">
- <title>Starting a persistent cluster</title>
- <para>
- When starting a persistent cluster broker, set the cluster-size option to the number of brokers in the cluster. This allows the brokers to wait until the entire cluster is running so that they can synchronize their stored state.
- </para>
- <para>
- The cluster can start if:
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- all members have empty stores, or
- </para>
-
- </listitem>
- <listitem>
- <para>
- at least one member has a clean store
- </para>
-
- </listitem>
-
- </itemizedlist>
-
- </para>
- <para>
- All members of the new cluster will be initialized with the state from a clean store.
- </para>
-
- </section>
-
- <section id="sect-Messaging_User_Guide-Persistence_in_High_Availability_Message_Clusters-Stopping_a_persistent_cluster">
- <title>Stopping a persistent cluster</title>
- <para>
- To cleanly shut down a persistent cluster use the command <command>qpid-cluster -k</command>. This causes all brokers to synchronize their state and mark their stores as &#34;clean&#34; so they can be used when the cluster restarts.
- </para>
-
- </section>
-
- <section id="sect-Messaging_User_Guide-Persistence_in_High_Availability_Message_Clusters-Starting_a_persistent_cluster_with_no_clean_store">
- <title>Starting a persistent cluster with no clean store</title>
- <para>
- If the cluster has previously had a total failure and there are no clean stores then the brokers will fail to start with the log message <literal>Cannot recover, no clean store.</literal> If this happens you can start the cluster by marking one of the stores &#34;clean&#34; as follows:
- </para>
- <procedure>
- <step>
- <para>
- Move the latest store backup into place in the brokers data-directory. The backups end in a 4 digit number, the latest backup is the highest number.
- </para>
-
-<screen>
- cd &#60;data-dir&#62;
- mv rhm rhm.bak
- cp -a _cluster.bak.&#60;nnnn&#62;/rhm .
-</screen>
-
- </step>
- <step>
- <para>
- Mark the store as clean:
-<screen>qpid-cluster-store -c &#60;data-dir&#62;</screen>
-
- </para>
-
- </step>
-
- </procedure>
-
- <para>
- Now you can start the cluster, all members will be initialized from the store you marked as clean.
- </para>
-
- </section>
-
- <section id="sect-Messaging_User_Guide-Persistence_in_High_Availability_Message_Clusters-Isolated_failures_in_a_persistent_cluster">
- <title>Isolated failures in a persistent cluster</title>
- <para>
- A broker in a persistent cluster may encounter errors that other brokers in the cluster do not; if this happens, the broker shuts itself down to avoid making the cluster state inconsistent. For example a disk failure on one node will result in that node shutting down. Running out of storage capacity can also cause a node to shut down because because the brokers may not run out of storage at exactly the same point, even if they have similar storage configuration. To avoid unnecessary broker shutdowns, make sure the queue policy size of each durable queue is less than the capacity of the journal for the queue.
- </para>
-
- </section>
-
-
- </section>
-
-
-</section>
diff --git a/doc/book/src/amqp-advanced-message-queueing-protocol.html b/doc/book/src/amqp-advanced-message-queueing-protocol.html
deleted file mode 100644
index 9d46429d03..0000000000
--- a/doc/book/src/amqp-advanced-message-queueing-protocol.html
+++ /dev/null
@@ -1,237 +0,0 @@
-<!--
-
- 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.
-
--->
-
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<HTML>
- <HEAD>
- <LINK type="text/css" rel="stylesheet" href="resources/space.css">
- <STYLE type="text/css">
- .footer {
- background-image: url('http://cwiki.apache.org/confluence/images/border/border_bottom.gif');
- background-repeat: repeat-x;
- background-position: left top;
- padding-top: 4px;
- color: #666;
- clear: both;
- }
- .left {
- padding-top: 5px;
- float : left;
- width : 15em;
- }
- .pagecontent {
- float: left;
- width: 70%;
- }
- </STYLE>
- <SCRIPT type="text/javascript" language="javascript">
- var hide = null;
- var show = null;
- var children = null;
-
- function init() {
- /* Search form initialization */
- var form = document.forms['search'];
- if (form != null) {
- form.elements['domains'].value = location.hostname;
- form.elements['sitesearch'].value = location.hostname;
- }
-
- /* Children initialization */
- hide = document.getElementById('hide');
- show = document.getElementById('show');
- children = document.all != null ?
- document.all['children'] :
- document.getElementById('children');
- if (children != null) {
- children.style.display = 'none';
- show.style.display = 'inline';
- hide.style.display = 'none';
- }
- }
-
- function showChildren() {
- children.style.display = 'block';
- show.style.display = 'none';
- hide.style.display = 'inline';
- }
-
- function hideChildren() {
- children.style.display = 'none';
- show.style.display = 'inline';
- hide.style.display = 'none';
- }
- </SCRIPT>
- <TITLE>Apache Qpid: Open Source AMQP Messaging - AMQP (Advanced Message Queueing Protocol)</TITLE>
- <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
- <BODY onload="init()">
- <TABLE border="0" cellpadding="2" cellspacing="0" width="100%">
- <TR class="topBar">
- <TD align="left" valign="middle" class="topBarDiv" align="left" nowrap="">
- &nbsp;<A href="index.html" title="Apache Qpid">Apache Qpid</A>&nbsp;&gt;&nbsp;<A href="index.html" title="Index">Index</A>&nbsp;&gt;&nbsp;<A href="" title="AMQP (Advanced Message Queueing Protocol)">AMQP (Advanced Message Queueing Protocol)</A>
- </TD>
- <TD align="right" valign="middle" nowrap="">
- <FORM name="search" action="http://www.google.com/search" method="get">
- <INPUT type="hidden" name="ie" value="UTF-8">
- <INPUT type="hidden" name="oe" value="UTF-8">
- <INPUT type="hidden" name="domains" value="">
- <INPUT type="hidden" name="sitesearch" value="">
- <INPUT type="text" name="q" maxlength="255" value="">
- <INPUT type="submit" name="btnG" value="Google Search">
- </FORM>
- </TD>
- </TR>
- </TABLE>
-
- <DIV id="PageContent">
- <DIV class="pageheader" style="padding: 6px 0px 0px 0px;">
-<DIV>
-<TABLE border="0" width="90%">
-<TR>
-<TD align="left">
-<A href="http://qpid.apache.org/">
-<IMG src="http://qpid.apache.org/images/qpid-logo.png" height="69" width="225" border="0"></A>
-</TD>
-<TD>
-</TD>
-<TD align="right"> <A href="http://www.apache.org/">
- <IMG src="http://qpid.apache.org/images/asf-logo.png" height="69" width="225" border="0"></A></TD>
-</TR>
-</TABLE>
-</DIV>
-
- </DIV>
-
-<!--
-
-
- <div class="pagesubheading" style="margin: 0px 10px 0px 10px;">
- Added by <a href="/confluence/display/~jonathan.robie@redhat.com">Jonathan Robie</a>, last edited by <a href="/confluence/display/~jonathan.robie@redhat.com">Jonathan Robie</a> on Feb 18, 2009
- &nbsp;(<a class="noprint" href="/confluence/pages/diffpages.action?pageId=110693&originalId=110695">view change</a>)
-
- </div>
--->
-
- <DIV class="left">
-
-
-
-
- <DIV class="panel" style="background-color: E0E0FF;border-color: #202080;border-style: solid;border-width: 1px;"><DIV class="panelContent" style="background-color: E0E0FF;">
-<H3><A name="Navigation-ApacheQpid"></A>Apache Qpid</H3>
-<P> <A href="index.html" title="Index">Home</A><BR>
- <A href="download.html" title="Download">Download</A><BR>
- <A href="getting-started.html" title="Getting Started">Getting Started</A> <BR>
- <A href="documentation.html" title="Documentation">Documentation</A><BR>
- <A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A><BR>
- <A href="http://issues.apache.org/jira/browse/qpid" rel="nofollow">Issue Reporting</A><BR>
- <A href="faq.html" title="FAQ">FAQ/How to</A></P>
-
-<H3><A name="Navigation-Resources"></A>Resources</H3>
-<P> <A href="getting-involved.html" title="Getting Involved">Getting Involved</A><BR>
- <A href="qpid-integrations.html" title="Qpid Integrations">Qpid Integrated with..</A><BR>
- <A href="source-repository.html" title="Source Repository">Source Repository</A><BR>
- <A href="building.html" title="Building">Building Qpid</A><BR>
- <A href="developer-pages.html" title="Developer Pages">Developer Pages</A><BR>
- <A href="qpid-management-framework.html" title="Qpid Management Framework">QMF</A></P>
-
-<H3><A name="Navigation-AboutQpid"></A>About Qpid</H3>
-<P> <A href="people.html" title="People">People</A><BR>
- <A href="license.html" title="License">License</A><BR>
- <A href="project-status.html" title="Project Status">Project Status</A><BR>
- <A href="acknowledgments.html" title="Acknowledgments">Acknowledgments</A></P>
-
-<H3><A name="Navigation-AboutAMQP"></A>About AMQP</H3>
-<P> <A href="" title="AMQP (Advanced Message Queueing Protocol)">What is AMQP ?</A><BR>
- <A href="" title="AMQP (Advanced Message Queueing Protocol)">AMQP Specification Download</A></P>
-
-<P><IMG src="navigation.data/AMQP_logo_71px-small.jpg" align="absmiddle" border="0"></P>
-</DIV></DIV>
- </DIV>
-
- <DIV class="pagecontent">
- <DIV class="wiki-content">
- <H2><A name="AMQP%28AdvancedMessageQueueingProtocol%29-WhatisAMQP%3F"></A>What is AMQP?</H2>
-
-<P>AMQP <A href="http://www.amqp.org/" rel="nofollow">Advanced Message Queuing Protocol</A> is an open standard designed to support reliable, high-performance messaging over the Internet. AMQP can be used for any distributed or business application, and supports common messaging paradigms like point-to-point, fanout, publish-subscribe, and request-response.</P>
-
-<P>Apache Qpid implements AMQP, including transaction management, queuing, clustering, federation, security, management and multi-platform support.</P>
-
-
-<P>Apache Qpid implements the latest AMQP specification, providing transaction management, queuing, distribution, security, management, clustering, federation and heterogeneous multi-platform support and a lot more. </P>
-
-<P>Apache Qpid is highly optimized, and <A href="amqp-compatibility.html" title="AMQP compatibility">aims to be 100% AMQP Compliant</A>.</P>
-
-<H2><A name="AMQP%28AdvancedMessageQueueingProtocol%29-DownloadtheAMQPSpecifications"></A>Download the AMQP Specifications</H2>
-
-<H3><A name="AMQP%28AdvancedMessageQueueingProtocol%29-AMQPversion010"></A>AMQP version 0-10</H3>
-
-
-<UL>
- <LI><A href="https://jira.amqp.org/confluence/download/attachments/720900/amqp.0-10.pdf?version=1" rel="nofollow">AMQP 0-10 Specification (PDF) </A></LI>
- <LI><A href="https://jira.amqp.org/confluence/download/attachments/720900/amqp.0-10.xml?version=1" rel="nofollow">AMQP 0-10 Protocol Definition XML </A></LI>
- <LI><A href="https://jira.amqp.org/confluence/download/attachments/720900/amqp.0-10.dfd?version=1" rel="nofollow">AMQP 0-10 Protocol Definition DTD </A></LI>
-</UL>
-
-
-<H3><A name="AMQP%28AdvancedMessageQueueingProtocol%29-AMQPversion091"></A>AMQP version 0-9-1</H3>
-
-<UL>
- <LI><A href="https://jira.amqp.org/confluence/download/attachments/720900/amqp0-9-1.pdf?version=1" rel="nofollow">AMQP 0-9-1 Specification (PDF) </A></LI>
- <LI><A href="https://jira.amqp.org/confluence/download/attachments/720900/amqp0-9-1.xml?version=1" rel="nofollow">AMQP 0-9-1 Protocol Documentation (PDF) </A></LI>
- <LI><A href="https://jira.amqp.org/confluence/download/attachments/720900/amqp0-9-1.dtd?version=1" rel="nofollow">AMQP 0-9-1 Protocol Definitions (XML) </A></LI>
-</UL>
-
-
-<H3><A name="AMQP%28AdvancedMessageQueueingProtocol%29-AMQPversion09"></A>AMQP version 0-9</H3>
-
-<UL>
- <LI><A href="https://jira.amqp.org/confluence/download/attachments/720900/amqp0-9.pdf?version=1" rel="nofollow">AMQP 0-9 Specification (PDF) </A></LI>
- <LI><A href="https://jira.amqp.org/confluence/download/attachments/720900/amqp0-9.xml?version=1" rel="nofollow">AMQP 0-9 Protocol Documentation (PDF) </A></LI>
- <LI><A href="https://jira.amqp.org/confluence/download/attachments/720900/amqp0-9.dtd?version=1" rel="nofollow">AMQP 0-9 Protocol Definitions (XML) </A></LI>
-</UL>
-
-
-<H3><A name="AMQP%28AdvancedMessageQueueingProtocol%29-AMQPversion08"></A>AMQP version 0-8</H3>
-
-<UL>
- <LI><A href="https://jira.amqp.org/confluence/download/attachments/720900/amqp0-8.pdf?version=1" rel="nofollow">AMQP 0-8 Specification (PDF) </A></LI>
- <LI><A href="https://jira.amqp.org/confluence/download/attachments/720900/amqp0-8.dtd?version=1" rel="nofollow">AMQP 0-8 Protocol Documentation (PDF) </A></LI>
- <LI><A href="https://jira.amqp.org/confluence/download/attachments/720900/amqp0-8.xml?version=1" rel="nofollow">AMQP 0-8 Protocol Definitions (XML) </A></LI>
-</UL>
-
- </DIV>
-
-<!--
- -->
-
- </DIV>
-
- <DIV class="footer">
- Apache Qpid, Enterprise AMQP Messaging
- &nbsp;
- &copy; 2004-2008 The Apache Software Foundation.
- &nbsp;
- (<A href="http://cwiki.apache.org/confluence/pages/editpage.action?pageId=110693">edit this page</A>)
- </DIV>
- </BODY>
-</HTML>
diff --git a/doc/book/src/common/css/style.css b/doc/book/src/common/css/style.css
new file mode 100644
index 0000000000..c681596592
--- /dev/null
+++ b/doc/book/src/common/css/style.css
@@ -0,0 +1,279 @@
+/*
+ *
+ * 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.
+ *
+ */
+ul {
+ list-style-type:square;
+}
+
+th {
+ font-weight: bold;
+}
+
+.navfooter td {
+ font-size:10pt;
+}
+
+.navheader td {
+ font-size:10pt;
+}
+
+body {
+ margin:0;
+ background:#FFFFFF;
+ font-family:"Verdana", sans-serif;
+ font-size:10pt;
+}
+
+.container {
+ width:950px;
+ margin:0 auto;
+}
+
+body a {
+ color:#000000;
+}
+
+
+div.book {
+ margin-left:10pt;
+ margin-right:10pt;
+}
+
+div.preface {
+ margin-left:10pt;
+ margin-right:10pt;
+}
+
+div.chapter {
+ margin-left:10pt;
+ margin-right:10pt;
+}
+
+div.section {
+ margin-left:10pt;
+ margin-right:10pt;
+}
+
+div.titlepage {
+ margin-left:-10pt;
+ margin-right:-10pt;
+}
+
+.calloutlist td {
+ font-size:10pt;
+}
+
+.table-contents table {
+ border-spacing: 0px;
+}
+
+.table-contents td {
+ font-size:10pt;
+ padding-left:6px;
+ padding-right:6px;
+}
+
+div.breadcrumbs {
+ font-size:9pt;
+ margin-right:10pt;
+ padding-bottom:16px;
+}
+
+.chapter h2.title {
+ font-size:20pt;
+ color:#0c3b82;
+}
+
+.chapter .section h2.title {
+ font-size:18pt;
+ color:#0c3b82;
+}
+
+.section h2.title {
+ font-size:16pt;
+ color:#0c3b82;
+}
+
+.section h3.title {
+ font-size:14pt;
+ color:#0c3b82;
+}
+
+.section h4.title {
+ font-size:12pt;
+ color:#0c3b82;
+}
+
+.section h5.title {
+ font-size:12pt;
+ color:#0c3b82;
+}
+
+.section h6.title {
+ font-size:12pt;
+ color:#0c3b82;
+}
+
+.toc a {
+ font-size:9pt;
+}
+
+.header {
+ height:100px;
+ width:950px;
+ background:url(http://qpid.apache.org/images/header.png)
+}
+
+.logo {
+ text-align:center;
+ font-weight:600;
+ padding:0 0 0 0;
+ font-size:14px;
+ font-family:"Verdana", cursive;
+}
+
+.logo a {
+ color:#000000;
+ text-decoration:none;
+}
+
+.main_text_area {
+ margin-left:200px;
+}
+
+.main_text_area_top {
+ height:14px;
+ font-size:1px;
+}
+
+.main_text_area_bottom {
+ display:none;
+/* height:14px;
+ margin-bottom:4px;*/
+}
+
+.main_text_area_body {
+ padding:5px 24px;
+}
+
+.main_text_area_body p {
+ text-align:justify;
+}
+
+.main_text_area br {
+ line-height:10px;
+}
+
+.main_text_area h1 {
+ font-size:28px;
+ font-weight:600;
+ margin:0 0 24px 0;
+ color:#0c3b82;
+ font-family:"Verdana", Times, serif;
+}
+
+.main_text_area h2 {
+ font-size:24px;
+ font-weight:600;
+ margin:24px 0 8px 0;
+ color:#0c3b82;
+ font-family:"Verdana",Times, serif;
+}
+
+.main_text_area ol, .main_text_area ul {
+ padding:0;
+ margin:10px 0;
+ margin-left:20px;
+}
+
+.main_text_area li {
+/* margin-left:40px; */
+}
+
+.main_text_area, .menu_box {
+ font-size:13px;
+ line-height:17px;
+ color:#000000;
+}
+
+.main_text_area {
+ font-size:14px;
+}
+
+.main_text_area a {
+ color:#000000;
+}
+
+.main_text_area a:hover {
+ color:#000000;
+}
+
+.menu_box {
+ width:196px;
+ float:left;
+ margin-left:4px;
+}
+
+.menu_box_top {
+ background:url(http://qpid.apache.org/images/menu_top.png) no-repeat;
+ height:14px;
+ font-size:1px;
+}
+
+.menu_box_body {
+ background:url(http://qpid.apache.org/images/menu_body.png) repeat-y;
+ padding:5px 24px 5px 24px;
+}
+
+.menu_box_bottom {
+ background:url(http://qpid.apache.org/images/menu_bottom.png) no-repeat;
+ height:14px;
+ font-size:1px;
+ margin-bottom:1px;
+}
+
+.menu_box h3 {
+ font-size:20px;
+ font-weight:500;
+ margin:0 0 8px 0;
+ color:#0c3b82;
+ font-family:"Verdana",Times, serif;
+}
+
+.menu_box ul {
+ margin:12px;
+ padding:0px;
+}
+
+.menu_box li {
+ list-style:square;
+}
+
+.menu_box a {
+ color:#000000;
+ text-decoration:none;
+}
+
+.menu_box a:hover {
+ color:#000000;
+ text-decoration:underline;
+}
+
+
diff --git a/doc/book/src/AMQP-Compatibility.xml b/doc/book/src/cpp-broker/AMQP-Compatibility.xml
index e5aa98cf96..e5aa98cf96 100644
--- a/doc/book/src/AMQP-Compatibility.xml
+++ b/doc/book/src/cpp-broker/AMQP-Compatibility.xml
diff --git a/doc/book/src/AMQP-Messaging-Broker-CPP-Book.xml b/doc/book/src/cpp-broker/AMQP-Messaging-Broker-CPP-Book.xml
index 10d83ec887..228c6a5e15 100644
--- a/doc/book/src/AMQP-Messaging-Broker-CPP-Book.xml
+++ b/doc/book/src/cpp-broker/AMQP-Messaging-Broker-CPP-Book.xml
@@ -20,7 +20,7 @@
-->
-<book>
+<book xmlns:xi="http://www.w3.org/2001/XInclude">
<title>AMQP Messaging Broker (Implemented in C++)</title>
<preface>
<title>Introduction</title>
@@ -46,21 +46,20 @@
Running the AMQP Messaging Broker
</title>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Running-CPP-Broker.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Cheat-Sheet-for-configuring-Queue-Options.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Cheat-Sheet-for-configuring-Exchange-Options.xml"/>
-
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Using-Broker-Federation.xml"/>
-
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Security.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="LVQ.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="queue-state-replication.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Starting-a-cluster.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="producer-flow-control.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP-Compatibility.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-Interoperability-Documentation.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Using-message-groups.xml"/>
-
+ <xi:include href="Running-CPP-Broker.xml"/>
+ <xi:include href="Cheat-Sheet-for-configuring-Queue-Options.xml"/>
+ <xi:include href="Cheat-Sheet-for-configuring-Exchange-Options.xml"/>
+ <xi:include href="Using-Broker-Federation.xml"/>
+ <xi:include href="Security.xml"/>
+ <xi:include href="LVQ.xml"/>
+ <xi:include href="queue-state-replication.xml"/>
+ <xi:include href="Active-Active-Cluster.xml"/>
+ <xi:include href="producer-flow-control.xml"/>
+ <xi:include href="AMQP-Compatibility.xml"/>
+ <xi:include href="Qpid-Interoperability-Documentation.xml"/>
+ <xi:include href="Using-message-groups.xml"/>
+ <xi:include href="Active-Passive-Cluster.xml"/>
+ <xi:include href="HA-Queue-Replication.xml"/>
</chapter>
@@ -69,8 +68,8 @@
Managing the AMQP Messaging Broker
</title>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Managing-CPP-Broker.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-Management-Framework.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="QMF-Python-Console-Tutorial.xml"/>
+ <xi:include href="Managing-CPP-Broker.xml"/>
+ <xi:include href="Qpid-Management-Framework.xml"/>
+ <xi:include href="QMF-Python-Console-Tutorial.xml"/>
</chapter>
</book>
diff --git a/doc/book/src/cpp-broker/Active-Active-Cluster.xml b/doc/book/src/cpp-broker/Active-Active-Cluster.xml
new file mode 100644
index 0000000000..28db3876e2
--- /dev/null
+++ b/doc/book/src/cpp-broker/Active-Active-Cluster.xml
@@ -0,0 +1,561 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+<section id="chap-Messaging_User_Guide-Active_Active_Cluster">
+ <title>Active-active Messaging Clusters</title>
+ <para>
+ Active-active Messaging Clusters provide fault tolerance by ensuring that every broker in a <firstterm>cluster</firstterm> has the same queues, exchanges, messages, and bindings, and allowing a client to <firstterm>fail over</firstterm> to a new broker and continue without any loss of messages if the current broker fails or becomes unavailable. <firstterm>Active-active</firstterm> refers to the fact that all brokers in the cluster can actively serve clients. Because all brokers are automatically kept in a consistent state, clients can connect to and use any broker in a cluster. Any number of messaging brokers can be run as one <firstterm>cluster</firstterm>, and brokers can be added to or removed from a cluster while it is in use.
+ </para>
+ <para>
+ High Availability Messaging Clusters are implemented using using the <ulink url="http://www.openais.org/">OpenAIS Cluster Framework</ulink>.
+ </para>
+ <para>
+ An OpenAIS daemon runs on every machine in the cluster, and these daemons communicate using multicast on a particular address. Every qpidd process in a cluster joins a named group that is automatically synchronized using OpenAIS Closed Process Groups (CPG) — the qpidd processes multicast events to the named group, and CPG ensures that each qpidd process receives all the events in the same sequence. All members get an identical sequence of events, so they can all update their state consistently.
+ </para>
+ <para>
+ Two messaging brokers are in the same cluster if
+ <orderedlist>
+ <listitem>
+ <para>
+ They run on hosts in the same OpenAIS cluster; that is, OpenAIS is configured with the same mcastaddr, mcastport and bindnetaddr, and
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ They use the same cluster name.
+ </para>
+
+ </listitem>
+
+ </orderedlist>
+
+ </para>
+ <para>
+ High Availability Clustering has a cost: in order to allow each broker in a cluster to continue the work of any other broker, a cluster must replicate state for all brokers in the cluster. Because of this, the brokers in a cluster should normally be on a LAN; there should be fast and reliable connections between brokers. Even on a LAN, using multiple brokers in a cluster is somewhat slower than using a single broker without clustering. This may be counter-intuitive for people who are used to clustering in the context of High Performance Computing or High Throughput Computing, where clustering increases performance or throughput.
+ </para>
+
+ <para>
+ High Availability Messaging Clusters should be used together with Red Hat Clustering Services (RHCS); without RHCS, clusters are vulnerable to the &#34;split-brain&#34; condition, in which a network failure splits the cluster into two sub-clusters that cannot communicate with each other. See the documentation on the <command>--cluster-cman</command> option for details on running using RHCS with High Availability Messaging Clusters. See the <ulink url="http://sources.redhat.com/cluster/wiki">CMAN Wiki</ulink> for more detail on CMAN and split-brain conditions. Use the <command>--cluster-cman</command> option to enable RHCS when starting the broker.
+ </para>
+ <section id="sect-Messaging_User_Guide-High_Availability_Messaging_Clusters-Starting_a_Broker_in_a_Cluster">
+ <title>Starting a Broker in a Cluster</title>
+ <para>
+ Clustering is implemented using the <filename>cluster.so</filename> module, which is loaded by default when you start a broker. To run brokers in a cluster, make sure they all use the same OpenAIS mcastaddr, mcastport, and bindnetaddr. All brokers in a cluster must also have the same cluster name — specify the cluster name in <filename>qpidd.conf</filename>:
+ </para>
+
+ <screen>cluster-name=&#34;local_test_cluster&#34;
+ </screen>
+ <para>
+ On RHEL6, you must create the file <filename>/etc/corosync/uidgid.d/qpidd</filename> to tell Corosync the name of the user running the broker.By default, the user is qpidd:
+ </para>
+
+ <programlisting>
+ uidgid {
+ uid: qpidd
+ gid: qpidd
+ }
+ </programlisting>
+ <para>
+ On RHEL5, the primary group for the process running qpidd must be the ais group. If you are running qpidd as a service, it is run as the <command>qpidd</command> user, which is already in the ais group. If you are running the broker from the command line, you must ensure that the primary group for the user running qpidd is ais. You can set the primary group using <command>newgrp</command>:
+ </para>
+
+ <screen>$ newgrp ais
+ </screen>
+ <para>
+ You can then run the broker from the command line, specifying the cluster name as an option.
+ </para>
+
+ <screen>[jonathan@localhost]$ qpidd --cluster-name=&#34;local_test_cluster&#34;
+ </screen>
+ <para>
+ All brokers in a cluster must have identical configuration, with a few exceptions noted below. They must load the same set of plug-ins, and have matching configuration files and command line arguments. The should also have identical ACL files and SASL databases if these are used. If one broker uses persistence, all must use persistence — a mix of transient and persistent brokers is not allowed. Differences in configuration can cause brokers to exit the cluster. For instance, if different ACL settings allow a client to access a queue on broker A but not on broker B, then publishing to the queue will succeed on A and fail on B, so B will exit the cluster to prevent inconsistency.
+ </para>
+ <para>
+ The following settings can differ for brokers on a given cluster:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ logging options
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ cluster-url — if set, it will be different for each broker.
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ port — brokers can listen on different ports.
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+ <para>
+ The qpid log contains entries that record significant clustering events, e.g. when a broker becomes a member of a cluster, the membership of a cluster is changed, or an old journal is moved out of the way. For instance, the following message states that a broker has been added to a cluster as the first node:
+ </para>
+
+ <screen>
+ 2009-07-09 18:13:41 info 127.0.0.1:1410(READY) member update: 127.0.0.1:1410(member)
+ 2009-07-09 18:13:41 notice 127.0.0.1:1410(READY) first in cluster
+ </screen>
+ <note>
+ <para>
+ If you are using SELinux, the qpidd process and OpenAIS must have the same SELinux context, or else SELinux must be set to permissive mode. If both qpidd and OpenAIS are run as services, they have the same SELinux context. If both OpenAIS and qpidd are run as user processes, they have the same SELinux context. If one is run as a service, and the other is run as a user process, they have different SELinux contexts.
+ </para>
+
+ </note>
+ <para>
+ The following options are available for clustering:
+ </para>
+ <table frame="all" id="tabl-Messaging_User_Guide-Starting_a_Broker_in_a_Cluster-Options_for_High_Availability_Messaging_Cluster">
+ <title>Options for High Availability Messaging Cluster</title>
+ <tgroup align="left" cols="2" colsep="1" rowsep="1">
+ <colspec colname="c1" colwidth="1*"></colspec>
+ <colspec colname="c2" colwidth="4*"></colspec>
+ <thead>
+ <row>
+ <entry align="center" nameend="c2" namest="c1">
+ Options for High Availability Messaging Cluster
+ </entry>
+
+ </row>
+
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <command>--cluster-name <replaceable>NAME</replaceable></command>
+ </entry>
+ <entry>
+ Name of the Messaging Cluster to join. A Messaging Cluster consists of all brokers started with the same cluster-name and openais configuration.
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ <command>--cluster-size <replaceable>N</replaceable></command>
+ </entry>
+ <entry>
+ Wait for at least N initial members before completing cluster initialization and serving clients. Use this option in a persistent cluster so all brokers in a persistent cluster can exchange the status of their persistent store and do consistency checks before serving clients.
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ <command>--cluster-url <replaceable>URL</replaceable></command>
+ </entry>
+ <entry>
+ An AMQP URL containing the local address that the broker advertizes to clients for fail-over connections. This is different for each host. By default, all local addresses for the broker are advertized. You only need to set this if
+ <orderedlist>
+ <listitem>
+ <para>
+ Your host has more than one active network interface, and
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ You want to restrict client fail-over to a specific interface or interfaces.
+ </para>
+
+ </listitem>
+
+ </orderedlist>
+ <para>Each broker in the cluster is specified using the following form:</para>
+
+ <programlisting>url = [&#34;amqp:&#34;][ user [&#34;/&#34; password] &#34;@&#34; ] protocol_addr
+ (&#34;,&#34; protocol_addr)*
+ protocol_addr = tcp_addr / rmda_addr / ssl_addr / ...
+ tcp_addr = [&#34;tcp:&#34;] host [&#34;:&#34; port]
+ rdma_addr = &#34;rdma:&#34; host [&#34;:&#34; port]
+ ssl_addr = &#34;ssl:&#34; host [&#34;:&#34; port]</programlisting>
+
+ <para>In most cases, only one address is advertized, but more than one address can be specified in if the machine running the broker has more than one network interface card, and you want to allow clients to connect using multiple network interfaces. Use a comma delimiter (&#34;,&#34;) to separate brokers in the URL. Examples:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <command>amqp:tcp:192.168.1.103:5672</command> advertizes a single address to the broker for failover.
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ <command>amqp:tcp:192.168.1.103:5672,tcp:192.168.1.105:5672</command> advertizes two different addresses to the broker for failover, on two different network interfaces.
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ <command>--cluster-cman</command>
+ </entry>
+ <entry>
+ <para>
+ CMAN protects against the &#34;split-brain&#34; condition, in which a network failure splits the cluster into two sub-clusters that cannot communicate with each other. When &#34;split-brain&#34; occurs, each of the sub-clusters can access shared resources without knowledge of the other sub-cluster, resulting in corrupted cluster integrity.
+ </para>
+ <para>
+ To avoid &#34;split-brain&#34;, CMAN uses the notion of a &#34;quorum&#34;. If more than half the cluster nodes are active, the cluster has quorum and can act. If half (or fewer) nodes are active, the cluster does not have quorum, and all cluster activity is stopped. There are other ways to define the quorum for particular use cases (e.g. a cluster of only 2 members), see the <ulink url="http://sources.redhat.com/cluster/wiki">CMAN Wiki</ulink>
+ for more detail.
+ </para>
+ <para>
+ When enabled, the broker will wait until it belongs to a quorate cluster before accepting client connections. It continually monitors the quorum status and shuts down immediately if the node it runs on loses touch with the quorum.
+ </para>
+
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ --cluster-username
+ </entry>
+ <entry>
+ SASL username for connections between brokers.
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ --cluster-password
+ </entry>
+ <entry>
+ SASL password for connections between brokers.
+ </entry>
+
+ </row>
+ <row>
+ <entry>
+ --cluster-mechanism
+ </entry>
+ <entry>
+ SASL authentication mechanism for connections between brokers
+ </entry>
+
+ </row>
+
+ </tbody>
+
+ </tgroup>
+
+ </table>
+ <para>
+ If a broker is unable to establish a connection to another broker in the cluster, the log will contain SASL errors, e.g:
+ </para>
+
+ <screen>2009-aug-04 10:17:37 info SASL: Authentication failed: SASL(-13): user not found: Password verification failed
+ </screen>
+ <para>
+ You can set the SASL user name and password used to connect to other brokers using the <command>cluster-username</command> and <command>cluster-password</command> properties when you start the broker. In most environment, it is easiest to create an account with the same user name and password on each broker in the cluster, and use these as the <command>cluster-username</command> and <command>cluster-password</command>. You can also set the SASL mode using <command>cluster-mechanism</command>. Remember that any mechanism you enable for broker-to-broker communication can also be used by a client, so do not enable <command>cluster-mechanism=ANONYMOUS</command> in a secure environment.
+ </para>
+ <para>
+ Once the cluster is running, run <command>qpid-cluster</command> to make sure that the brokers are running as one cluster. See the following section for details.
+ </para>
+ <para>
+ If the cluster is correctly configured, queues and messages are replicated to all brokers in the cluster, so an easy way to test the cluster is to run a program that routes messages to a queue on one broker, then to a different broker in the same cluster and read the messages to make sure they have been replicated. The <command>drain</command> and <command>spout</command> programs can be used for this test.
+ </para>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-High_Availability_Messaging_Clusters-qpid_cluster">
+ <title>qpid-cluster</title>
+ <para>
+ <command>qpid-cluster</command> is a command-line utility that allows you to view information on a cluster and its brokers, disconnect a client connection, shut down a broker in a cluster, or shut down the entire cluster. You can see the options using the <command>--help</command> option:
+ </para>
+
+ <screen>$ ./qpid-cluster --help
+ </screen>
+
+ <screen>Usage: qpid-cluster [OPTIONS] [broker-addr]
+
+ broker-addr is in the form: [username/password@] hostname | ip-address [:&#60;port&#62;]
+ ex: localhost, 10.1.1.7:10000, broker-host:10000, guest/guest@localhost
+
+ Options:
+ -C [--all-connections] View client connections to all cluster members
+ -c [--connections] ID View client connections to specified member
+ -d [--del-connection] HOST:PORT
+ Disconnect a client connection
+ -s [--stop] ID Stop one member of the cluster by its ID
+ -k [--all-stop] Shut down the whole cluster
+ -f [--force] Suppress the &#39;are-you-sure?&#39; prompt
+ -n [--numeric] Don&#39;t resolve names
+ </screen>
+ <para>
+ Let&#39;s connect to a cluster and display basic information about the cluser and its brokers. When you connect to the cluster using <command>qpid-tool</command>, you can use the host and port for any broker in the cluster. For instance, if a broker in the cluster is running on <filename>localhost</filename> on port 6664, you can start <command>qpid-tool</command> like this:
+ </para>
+
+ <screen>
+ $ qpid-cluster localhost:6664
+ </screen>
+ <para>
+ Here is the output:
+ </para>
+
+ <screen>
+ Cluster Name: local_test_cluster
+ Cluster Status: ACTIVE
+ Cluster Size: 3
+ Members: ID=127.0.0.1:13143 URL=amqp:tcp:192.168.1.101:6664,tcp:192.168.122.1:6664,tcp:10.16.10.62:6664
+ : ID=127.0.0.1:13167 URL=amqp:tcp:192.168.1.101:6665,tcp:192.168.122.1:6665,tcp:10.16.10.62:6665
+ : ID=127.0.0.1:13192 URL=amqp:tcp:192.168.1.101:6666,tcp:192.168.122.1:6666,tcp:10.16.10.62:6666
+ </screen>
+ <para>
+ The ID for each broker in cluster is given on the left. For instance, the ID for the first broker in the cluster is <command>127.0.0.1:13143</command>. The URL in the output is the broker&#39;s advertized address. Let&#39;s use the ID to shut the broker down using the <command>--stop</command> command:
+ </para>
+
+ <screen>$ ./qpid-cluster localhost:6664 --stop 127.0.0.1:13143
+ </screen>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-High_Availability_Messaging_Clusters-Failover_in_Clients">
+ <title>Failover in Clients</title>
+ <para>
+ If a client is connected to a broker, the connection fails if the broker crashes or is killed. If heartbeat is enabled for the connection, a connection also fails if the broker hangs, the machine the broker is running on fails, or the network connection to the broker is lost — the connection fails no later than twice the heartbeat interval.
+ </para>
+ <para>
+ When a client&#39;s connection to a broker fails, any sent messages that have been acknowledged to the sender will have been replicated to all brokers in the cluster, any received messages that have not yet been acknowledged by the receiving client requeued to all brokers, and the client API notifies the application of the failure by throwing an exception.
+ </para>
+ <para>
+ Clients can be configured to automatically reconnect to another broker when it receives such an exception. Any messages that have been sent by the client, but not yet acknowledged as delivered, are resent. Any messages that have been read by the client, but not acknowledged, are delivered to the client.
+ </para>
+ <para>
+ TCP is slow to detect connection failures. A client can configure a connection to use a heartbeat to detect connection failure, and can specify a time interval for the heartbeat. If heartbeats are in use, failures will be detected no later than twice the heartbeat interval. The Java JMS client enables hearbeat by default. See the sections on Failover in Java JMS Clients and Failover in C++ Clients for the code to enable heartbeat.
+ </para>
+ <section id="sect-Messaging_User_Guide-Failover_in_Clients-Failover_in_Java_JMS_Clients">
+ <title>Failover in Java JMS Clients</title>
+ <para>
+ In Java JMS clients, client failover is handled automatically if it is enabled in the connection. Any messages that have been sent by the client, but not yet acknowledged as delivered, are resent. Any messages that have been read by the client, but not acknowledged, are sent to the client.
+ </para>
+ <para>
+ You can configure a connection to use failover using the <command>failover</command> property:
+ </para>
+
+ <screen>
+ connectionfactory.qpidConnectionfactory = amqp://guest:guest@clientid/test?brokerlist=&#39;tcp://localhost:5672&#39;&amp;failover=&#39;failover_exchange&#39;
+ </screen>
+ <para>
+ This property can take three values:
+ </para>
+ <variablelist id="vari-Messaging_User_Guide-Failover_in_Java_JMS_Clients-Failover_Modes">
+ <title>Failover Modes</title>
+ <varlistentry>
+ <term>failover_exchange</term>
+ <listitem>
+ <para>
+ If the connection fails, fail over to any other broker in the cluster.
+ </para>
+
+ </listitem>
+
+ </varlistentry>
+ <varlistentry>
+ <term>roundrobin</term>
+ <listitem>
+ <para>
+ If the connection fails, fail over to one of the brokers specified in the <command>brokerlist</command>.
+ </para>
+
+ </listitem>
+
+ </varlistentry>
+ <varlistentry>
+ <term>singlebroker</term>
+ <listitem>
+ <para>
+ Failover is not supported; the connection is to a single broker only.
+ </para>
+
+ </listitem>
+
+ </varlistentry>
+
+ </variablelist>
+ <para>
+ In a Connection URL, heartbeat is set using the <command>idle_timeout</command> property, which is an integer corresponding to the heartbeat period in seconds. For instance, the following line from a JNDI properties file sets the heartbeat time out to 3 seconds:
+ </para>
+
+ <screen>
+ connectionfactory.qpidConnectionfactory = amqp://guest:guest@clientid/test?brokerlist=&#39;tcp://localhost:5672&#39;,idle_timeout=3
+ </screen>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-Failover_in_Clients-Failover_and_the_Qpid_Messaging_API">
+ <title>Failover and the Qpid Messaging API</title>
+ <para>
+ The Qpid Messaging API also supports automatic reconnection in the event a connection fails. . Senders can also be configured to replay any in-doubt messages (i.e. messages whice were sent but not acknowleged by the broker. See &#34;Connection Options&#34; and &#34;Sender Capacity and Replay&#34; in <citetitle>Programming in Apache Qpid</citetitle> for details.
+ </para>
+ <para>
+ In C++ and python clients, heartbeats are disabled by default. You can enable them by specifying a heartbeat interval (in seconds) for the connection via the &#39;heartbeat&#39; option.
+ </para>
+ <para>
+ See &#34;Cluster Failover&#34; in <citetitle>Programming in Apache Qpid</citetitle> for details on how to keep the client aware of cluster membership.
+ </para>
+
+ </section>
+
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-High_Availability_Messaging_Clusters-Error_handling_in_Clusters">
+ <title>Error handling in Clusters</title>
+ <para>
+ If a broker crashes or is killed, or a broker machine failure, broker connection failure, or a broker hang is detected, the other brokers in the cluster are notified that it is no longer a member of the cluster. If a new broker is joined to the cluster, it synchronizes with an active broker to obtain the current cluster state; if this synchronization fails, the new broker exit the cluster and aborts.
+ </para>
+ <para>
+ If a broker becomes extremely busy and stops responding, it stops accepting incoming work. All other brokers continue processing, and the non-responsive node caches all AIS traffic. When it resumes, the broker completes processes all cached AIS events, then accepts further incoming work. <!-- If a broker is non-responsive for too long, it is assumed to be hanging, and treated as described in the previous paragraph. -->
+ </para>
+ <para>
+ Broker hangs are only detected if the watchdog plugin is loaded and the <command>--watchdog-interval</command> option is set. The watchdog plug-in kills the qpidd broker process if it becomes stuck for longer than the watchdog interval. In some cases, e.g. certain phases of error resolution, it is possible for a stuck process to hang other cluster members that are waiting for it to send a message. Using the watchdog, the stuck process is terminated and removed from the cluster, allowing other members to continue and clients of the stuck process to fail over to other members.
+ </para>
+ <para>
+ Redundancy can also be achieved directly in the AIS network by specifying more than one network interface in the AIS configuration file. This causes Totem to use a redundant ring protocol, which makes failure of a single network transparent.
+ </para>
+ <para>
+ Redundancy can be achieved at the operating system level by using NIC bonding, which combines multiple network ports into a single group, effectively aggregating the bandwidth of multiple interfaces into a single connection. This provides both network load balancing and fault tolerance.
+ </para>
+ <para>
+ If any broker encounters an error, the brokers compare notes to see if they all received the same error. If not, the broker removes itself from the cluster and shuts itself down to ensure that all brokers in the cluster have consistent state. For instance, a broker may run out of disk space; if this happens, the broker shuts itself down. Examining the broker&#39;s log can help determine the error and suggest ways to prevent it from occuring in the future.
+ </para>
+ <!-- "Bad case" for cluster matrix - things we will fix, or things users may encounter long term? -->
+ </section>
+
+ <section id="sect-Messaging_User_Guide-High_Availability_Messaging_Clusters-Persistence_in_High_Availability_Message_Clusters">
+ <title>Persistence in High Availability Message Clusters</title>
+ <para>
+ Persistence and clustering are two different ways to provide reliability. Most systems that use a cluster do not enable persistence, but you can do so if you want to ensure that messages are not lost even if the last broker in a cluster fails. A cluster must have all transient or all persistent members, mixed clusters are not allowed. Each broker in a persistent cluster has it&#39;s own independent replica of the cluster&#39;s state it its store.
+ </para>
+ <section id="sect-Messaging_User_Guide-Persistence_in_High_Availability_Message_Clusters-Clean_and_Dirty_Stores">
+ <title>Clean and Dirty Stores</title>
+ <para>
+ When a broker is an active member of a cluster, its store is marked &#34;dirty&#34; because it may be out of date compared to other brokers in the cluster. If a broker leaves a running cluster because it is stopped, it crashes or the host crashes, its store continues to be marked &#34;dirty&#34;.
+ </para>
+ <para>
+ If the cluster is reduced to a single broker, its store is marked &#34;clean&#34; since it is the only broker making updates. If the cluster is shut down with the command <literal>qpid-cluster -k</literal> then all the stores are marked clean.
+ </para>
+ <para>
+ When a cluster is initially formed, brokers with clean stores read from their stores. Brokers with dirty stores, or brokers that join after the cluster is running, discard their old stores and initialize a new store with an update from one of the running brokers. The <command>--truncate</command> option can be used to force a broker to discard all existing stores even if they are clean. (A dirty store is discarded regardless.)
+ </para>
+ <para>
+ Discarded stores are copied to a back up directory. The active store is in &#60;data-dir&#62;/rhm. Back-up stores are in &#60;data-dir&#62;/_cluster.bak.&#60;nnnn&#62;/rhm, where &#60;nnnn&#62; is a 4 digit number. A higher number means a more recent backup.
+ </para>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-Persistence_in_High_Availability_Message_Clusters-Starting_a_persistent_cluster">
+ <title>Starting a persistent cluster</title>
+ <para>
+ When starting a persistent cluster broker, set the cluster-size option to the number of brokers in the cluster. This allows the brokers to wait until the entire cluster is running so that they can synchronize their stored state.
+ </para>
+ <para>
+ The cluster can start if:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ all members have empty stores, or
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ at least one member has a clean store
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+
+ </para>
+ <para>
+ All members of the new cluster will be initialized with the state from a clean store.
+ </para>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-Persistence_in_High_Availability_Message_Clusters-Stopping_a_persistent_cluster">
+ <title>Stopping a persistent cluster</title>
+ <para>
+ To cleanly shut down a persistent cluster use the command <command>qpid-cluster -k</command>. This causes all brokers to synchronize their state and mark their stores as &#34;clean&#34; so they can be used when the cluster restarts.
+ </para>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-Persistence_in_High_Availability_Message_Clusters-Starting_a_persistent_cluster_with_no_clean_store">
+ <title>Starting a persistent cluster with no clean store</title>
+ <para>
+ If the cluster has previously had a total failure and there are no clean stores then the brokers will fail to start with the log message <literal>Cannot recover, no clean store.</literal> If this happens you can start the cluster by marking one of the stores &#34;clean&#34; as follows:
+ </para>
+ <procedure>
+ <step>
+ <para>
+ Move the latest store backup into place in the brokers data-directory. The backups end in a 4 digit number, the latest backup is the highest number.
+ </para>
+
+ <screen>
+ cd &#60;data-dir&#62;
+ mv rhm rhm.bak
+ cp -a _cluster.bak.&#60;nnnn&#62;/rhm .
+ </screen>
+
+ </step>
+ <step>
+ <para>
+ Mark the store as clean:
+ <screen>qpid-cluster-store -c &#60;data-dir&#62;</screen>
+
+ </para>
+
+ </step>
+
+ </procedure>
+
+ <para>
+ Now you can start the cluster, all members will be initialized from the store you marked as clean.
+ </para>
+
+ </section>
+
+ <section id="sect-Messaging_User_Guide-Persistence_in_High_Availability_Message_Clusters-Isolated_failures_in_a_persistent_cluster">
+ <title>Isolated failures in a persistent cluster</title>
+ <para>
+ A broker in a persistent cluster may encounter errors that other brokers in the cluster do not; if this happens, the broker shuts itself down to avoid making the cluster state inconsistent. For example a disk failure on one node will result in that node shutting down. Running out of storage capacity can also cause a node to shut down because because the brokers may not run out of storage at exactly the same point, even if they have similar storage configuration. To avoid unnecessary broker shutdowns, make sure the queue policy size of each durable queue is less than the capacity of the journal for the queue.
+ </para>
+
+ </section>
+
+
+ </section>
+
+
+</section>
diff --git a/doc/book/src/cpp-broker/Active-Passive-Cluster.xml b/doc/book/src/cpp-broker/Active-Passive-Cluster.xml
new file mode 100644
index 0000000000..5f5823bdd2
--- /dev/null
+++ b/doc/book/src/cpp-broker/Active-Passive-Cluster.xml
@@ -0,0 +1,661 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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
+h"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.
+
+-->
+
+<section id="chap-Messaging_User_Guide-Active_Passive_Cluster">
+
+ <title>Active-passive Messaging Clusters (Preview)</title>
+
+ <section>
+ <title>Overview</title>
+ <para>
+ This release provides a preview of a new module for High Availability (HA). The new module is
+ not yet complete or ready for production use. It being made available so that users can
+ experiment with the new approach and provide feedback early in the development process.
+ Feedback should go to <ulink url="mailto:user@qpid.apache.org">dev@qpid.apache.org</ulink>.
+ </para>
+ <para>
+ The old cluster module takes an <firstterm>active-active</firstterm> approach, i.e. all the
+ brokers in a cluster are able to handle client requests simultaneously. The new HA module
+ takes an <firstterm>active-passive</firstterm>, <firstterm>hot-standby</firstterm> approach.
+ </para>
+ <para>
+ In an active-passive cluster only one broker, known as the <firstterm>primary</firstterm>, is
+ active and serving clients at a time. The other brokers are standing by as
+ <firstterm>backups</firstterm>. Changes on the primary are immediately replicated to all the
+ backups so they are always up-to-date or "hot". If the primary fails, one of the backups is
+ promoted to take over as the new primary. Clients fail-over to the new primary
+ automatically. If there are multiple backups, the backups also fail-over to become backups of
+ the new primary. Backup brokers reject connection attempts, to enforce the requirement that
+ only the primary be active.
+ </para>
+ <para>
+ This approach depends on an external <firstterm>cluster resource manager</firstterm> to detect
+ failures and choose the primary. <ulink
+ url="https://fedorahosted.org/cluster/wiki/RGManager">Rgmanager</ulink> is supported
+ initially, but others may be supported in the future.
+ </para>
+ <section>
+ <title>Why the new approach?</title>
+ <para>
+ The new active-passive approach has several advantages compared to the
+ existing active-active cluster module.
+ <itemizedlist>
+ <listitem>
+ It does not depend directly on openais or corosync. It does not use multicast
+ which simplifies deployment.
+ </listitem>
+ <listitem>
+ It is more portable: in environments that don't support corosync, it can be
+ integrated with a resource manager available in that environment.
+ </listitem>
+ <listitem>
+ Replication to a <firstterm>disaster recovery</firstterm> site can be handled as
+ simply another node in the cluster, it does not require a separate replication
+ mechanism.
+ </listitem>
+ <listitem>
+ It can take advantage of features provided by the resource manager, for example
+ virtual IP addresses.
+ </listitem>
+ <listitem>
+ Improved performance and scalability due to better use of multiple CPU s
+ </listitem>
+ </itemizedlist>
+ </para>
+ </section>
+ <section>
+ <title>Limitations</title>
+
+ <para>
+ There are a number of known limitations in the current preview implementation. These
+ will be fixed in the production versions.
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ Transactional changes to queue state are not replicated atomically. If the primary crashes
+ during a transaction, it is possible that the backup could contain only part of the
+ changes introduced by a transaction.
+ </listitem>
+ <listitem>
+ During a fail-over one backup is promoted to primary and any other backups switch to
+ the new primary. Messages sent to the new primary before all the backups have
+ switched could be lost if the new primary itself fails before all the backups have
+ switched.
+ </listitem>
+ <listitem>
+ Acknowledgments are confirmed to clients before the message has been dequeued
+ from replicas or indeed from the local store if that is asynchronous.
+ </listitem>
+ <listitem>
+ When used with a persistent store: if the entire cluster fails, there are no tools to help
+ identify the most recent store.
+ </listitem>
+ <listitem>
+ A persistent broker must have its store erased before joining an existing cluster.
+ In the production version a persistent broker will be able to load its store and
+ avoid downloading messages that are in the store from the primary.
+ </listitem>
+ <listitem>
+ Configuration changes (creating or deleting queues, exchanges and bindings) are
+ replicated asynchronously. Management tools used to make changes will consider the
+ change complete when it is complete on the primary, it may not yet be replicated
+ to all the backups.
+ </listitem>
+ <listitem>
+ Deletions made immediately after a failure (before all the backups are ready) may
+ be lost on a backup. Queues, exchange or bindings that were deleted on the primary could
+ re-appear if that backup is promoted to primary on a subsequent failure.
+ </listitem>
+ <listitem>
+ Better control is needed over which queues/exchanges are replicated and which are not.
+ </listitem>
+ <listitem>
+ There are some known issues affecting performance, both the throughput of
+ replication and the time taken for backups to fail-over. Performance will improve
+ in the production version.
+ </listitem>
+ <listitem>
+ Federated links from the primary will be lost in fail over, they will not be
+ re-connected on the new primary. Federation links to the primary can fail over.
+ </listitem>
+ <listitem>
+ Only plain FIFO queues can be replicated. LVQ and ring queues are not yet supported.
+ </listitem>
+ </itemizedlist>
+ </section>
+ </section>
+
+ <section>
+ <title>Virtual IP Addresses</title>
+ <para>
+ Some resource managers (including <command>rgmanager</command>) support
+ <firstterm>virtual IP addresses</firstterm>. A virtual IP address is an IP
+ address that can be relocated to any of the nodes in a cluster. The
+ resource manager associates this address with the primary node in the
+ cluster, and relocates it to the new primary when there is a failure. This
+ simplifies configuration as you can publish a single IP address rather
+ than a list.
+ </para>
+ <para>
+ A virtual IP address can be used by clients and backup brokers to connect
+ to the primary. The following sections will explain how to configure
+ virtual IP addresses for clients or brokers.
+ </para>
+ </section>
+
+ <section>
+ <title>Configuring the Brokers</title>
+ <para>
+ The broker must load the <filename>ha</filename> module, it is loaded by
+ default. The following broker options are available for the HA module.
+ </para>
+ <table frame="all" id="ha-broker-options">
+ <title>Options for High Availability Messaging Cluster</title>
+ <tgroup align="left" cols="2" colsep="1" rowsep="1">
+ <colspec colname="c1" colwidth="1*"/>
+ <colspec colname="c2" colwidth="3*"/>
+ <thead>
+ <row>
+ <entry align="center" nameend="c2" namest="c1">
+ Options for High Availability Messaging Cluster
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <literal>--ha-cluster <replaceable>yes|no</replaceable></literal>
+ </entry>
+ <entry>
+ Set to "yes" to have the broker join a cluster.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal>--ha-brokers <replaceable>URL</replaceable></literal>
+ </entry>
+ <entry>
+ <para>
+ The URL
+ <footnote>
+ <para>
+ The full format of the URL is given by this grammar:
+ <programlisting>
+ url = ["amqp:"][ user ["/" password] "@" ] addr ("," addr)*
+ addr = tcp_addr / rmda_addr / ssl_addr / ...
+ tcp_addr = ["tcp:"] host [":" port]
+ rdma_addr = "rdma:" host [":" port]
+ ssl_addr = "ssl:" host [":" port]'
+ </programlisting>
+ </para>
+ </footnote>
+ used by brokers to connect to each other. If you use a virtual IP address
+ then this is a single address, for example
+ <literal>amqp:20.0.20.200</literal>. If you do not use a virtual IP
+ address then the URL must list all the addresses of brokers in the
+ cluster, for example <literal>amqp:node1,node2,node3</literal>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry><literal>--ha-public-brokers <replaceable>URL</replaceable></literal> </entry>
+ <entry>
+ <para>
+ The URL used by clients to connect to the brokers. This has the same
+ format as the <literal>--ha-brokers</literal> URL above.
+ </para>
+ <para>
+ If this option is not set, clients will use the same URL as brokers.
+ This option allows you to put client traffic on a different network from
+ broker traffic, which is recommended.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry><literal>--ha-replicate</literal></entry>
+ <foo/>
+ <entry>
+ <para>
+ Specifies whether queues and exchanges are replicated by default.
+ For details see <xref linkend="creating-replicated"/>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para><literal>--ha-username <replaceable>USER</replaceable></literal></para>
+ <para><literal>--ha-password <replaceable>PASS</replaceable></literal></para>
+ <para><literal>--ha-mechanism <replaceable>MECH</replaceable></literal></para>
+ </entry>
+ <entry>
+ Authentication settings used by brokers to connect to each other.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ To configure a HA cluster you must set at least <literal>ha-cluster</literal> and
+ <literal>ha-brokers</literal>.
+ </para>
+ </section>
+
+ <section>
+ <title>The Cluster Resource Manager</title>
+ <para>
+ Broker fail-over is managed by a <firstterm>cluster resource
+ manager</firstterm>. An integration with <ulink
+ url="https://fedorahosted.org/cluster/wiki/RGManager">rgmanager</ulink> is
+ provided, but it is possible to integrate with other resource managers.
+ </para>
+ <para>
+ The resource manager is responsible for starting the <command>qpidd</command> broker
+ on each node in the cluster. The resource manager <firstterm>promotes</firstterm>
+ one of the brokers to be the primary. The other brokers connect to the primary as
+ backups, using the URL provided in the <literal>ha-brokers</literal> configuration
+ option.
+ </para>
+ <para>
+ Once connected, the backup brokers synchronize their state with the
+ primary. When a backup is synchronized, or "hot", it is ready to take
+ over if the primary fails. Backup brokers continually receive updates
+ from the primary in order to stay synchronized.
+ </para>
+ <para>
+ If the primary fails, backup brokers go into fail-over mode. The resource
+ manager must detect the failure and promote one of the backups to be the
+ new primary. The other backups connect to the new primary and synchronize
+ their state with it.
+ </para>
+ <para>
+ The resource manager is also responsible for protecting the cluster from
+ <firstterm>split-brain</firstterm> conditions resulting from a network partition. A
+ network partition divide a cluster into two sub-groups which cannot see each other.
+ Usually a <firstterm>quorum</firstterm> voting algorithm is used that disables nodes
+ in the inquorate sub-group.
+ </para>
+ </section>
+
+ <section>
+ <title>Configuring <command>rgmanager</command> as resource manager</title>
+ <para>
+ This section assumes that you are already familiar with setting up and configuring
+ clustered services using <command>cman</command> and
+ <command>rgmanager</command>. It will show you how to configure an active-passive,
+ hot-standby <command>qpidd</command> HA cluster with <command>rgmanager</command>.
+ </para>
+ <para>
+ You must provide a <literal>cluster.conf</literal> file to configure
+ <command>cman</command> and <command>rgmanager</command>. Here is
+ an example <literal>cluster.conf</literal> file for a cluster of 3 nodes named
+ node1, node2 and node3. We will go through the configuration step-by-step.
+ </para>
+ <programlisting>
+ <![CDATA[
+<?xml version="1.0"?>
+<!--
+This is an example of a cluster.conf file to run qpidd HA under rgmanager.
+This example assumes a 3 node cluster, with nodes named node1, node2 and node3.
+
+NOTE: fencing is not shown, you must configure fencing appropriately for your cluster.
+-->
+
+<cluster name="qpid-test" config_version="18">
+ <!-- The cluster has 3 nodes. Each has a unique nodid and one vote
+ for quorum. -->
+ <clusternodes>
+ <clusternode name="node1.example.com" nodeid="1"/>
+ <clusternode name="node2.example.com" nodeid="2"/>
+ <clusternode name="node3.example.com" nodeid="3"/>
+ </clusternodes>
+ <!-- Resouce Manager configuration. -->
+ <rm>
+ <!--
+ There is a failoverdomain for each node containing just that node.
+ This lets us stipulate that the qpidd service should always run on each node.
+ -->
+ <failoverdomains>
+ <failoverdomain name="node1-domain" restricted="1">
+ <failoverdomainnode name="node1.example.com"/>
+ </failoverdomain>
+ <failoverdomain name="node2-domain" restricted="1">
+ <failoverdomainnode name="node2.example.com"/>
+ </failoverdomain>
+ <failoverdomain name="node3-domain" restricted="1">
+ <failoverdomainnode name="node3.example.com"/>
+ </failoverdomain>
+ </failoverdomains>
+
+ <resources>
+ <!-- This script starts a qpidd broker acting as a backup. -->
+ <script file="/etc/init.d/qpidd" name="qpidd"/>
+
+ <!-- This script promotes the qpidd broker on this node to primary. -->
+ <script file="/etc/init.d/qpidd-primary" name="qpidd-primary"/>
+
+ <!-- This is a virtual IP address for broker replication traffic. -->
+ <ip address="20.0.10.200" monitor_link="1"/>
+
+ <!-- This is a virtual IP address on a seprate network for client traffic. -->
+ <ip address="20.0.20.200" monitor_link="1"/>
+ </resources>
+
+ <!-- There is a qpidd service on each node, it should be restarted if it fails. -->
+ <service name="node1-qpidd-service" domain="node1-domain" recovery="restart">
+ <script ref="qpidd"/>
+ </service>
+ <service name="node2-qpidd-service" domain="node2-domain" recovery="restart">
+ <script ref="qpidd"/>
+ </service>
+ <service name="node3-qpidd-service" domain="node3-domain" recovery="restart">
+ <script ref="qpidd"/>
+ </service>
+
+ <!-- There should always be a single qpidd-primary service, it can run on any node. -->
+ <service name="qpidd-primary-service" autostart="1" exclusive="0" recovery="relocate">
+ <script ref="qpidd-primary"/>
+ <!-- The primary has the IP addresses for brokers and clients to connect. -->
+ <ip ref="20.0.10.200"/>
+ <ip ref="20.0.20.200"/>
+ </service>
+ </rm>
+</cluster>
+ ]]>
+ </programlisting>
+
+ <para>
+ There is a <literal>failoverdomain</literal> for each node containing just that
+ one node. This lets us stipulate that the qpidd service should always run on all
+ nodes.
+ </para>
+ <para>
+ The <literal>resources</literal> section defines the <command>qpidd</command>
+ script used to start the <command>qpidd</command> service. It also defines the
+ <command>qpid-primary</command> script which does not
+ actually start a new service, rather it promotes the existing
+ <command>qpidd</command> broker to primary status.
+ </para>
+ <para>
+ The <literal>resources</literal> section also defines a pair of virtual IP
+ addresses on different sub-nets. One will be used for broker-to-broker
+ communication, the other for client-to-broker.
+ </para>
+ <para>
+ To take advantage of the virtual IP addresses, <filename>qpidd.conf</filename>
+ should contain these lines:
+ </para>
+ <programlisting>
+ ha-cluster=yes
+ ha-brokers=20.0.20.200
+ ha-public-brokers=20.0.10.200
+ </programlisting>
+ <para>
+ This configuration specifies that backup brokers will use 20.0.20.200
+ to connect to the primary and will advertise 20.0.10.200 to clients.
+ Clients should connect to 20.0.10.200.
+ </para>
+ <para>
+ The <literal>service</literal> section defines 3 <literal>qpidd</literal>
+ services, one for each node. Each service is in a restricted fail-over
+ domain containing just that node, and has the <literal>restart</literal>
+ recovery policy. The effect of this is that rgmanager will run
+ <command>qpidd</command> on each node, restarting if it fails.
+ </para>
+ <para>
+ There is a single <literal>qpidd-primary-service</literal> using the
+ <command>qpidd-primary</command> script which is not restricted to a
+ domain and has the <literal>relocate</literal> recovery policy. This means
+ rgmanager will start <command>qpidd-primary</command> on one of the nodes
+ when the cluster starts and will relocate it to another node if the
+ original node fails. Running the <literal>qpidd-primary</literal> script
+ does not start a new broker process, it promotes the existing broker to
+ become the primary.
+ </para>
+ </section>
+
+ <section>
+ <title>Broker Administration Tools</title>
+ <para>
+ Normally, clients are not allowed to connect to a backup broker. However management tools are
+ allowed to connect to a backup brokers. If you use these tools you <emphasis>must
+ not</emphasis> add or remove messages from replicated queues, or delete replicated queues or
+ exchanges as this will corrupt the replication process and may cause message loss.
+ </para>
+ <para>
+ <command>qpid-ha</command> allows you to view and change HA configuration settings.
+ </para>
+ <para>
+ The tools <command>qpid-config</command>, <command>qpid-route</command> and
+ <command>qpid-stat</command> will connect to a backup if you pass the flag <command>--ha-admin</command> on the
+ command line.
+ </para>
+ </section>
+
+ <section id="ha-creating-replicated">
+ <title>Creating replicated queues and exchanges</title>
+ <para>
+ By default, queues and exchanges are not replicated automatically. You can change
+ the default behavior by setting the <literal>ha-replicate</literal> configuration
+ option. It has one of the following values:
+ <itemizedlist>
+ <listitem>
+ <firstterm>all</firstterm>: Replicate everything automatically: queues, exchanges, bindings and messages.
+ </listitem>
+ <listitem>
+ <firstterm>configuration</firstterm>: Replicate the existence of queues,
+ exchange and bindings but don't replicate messages.
+ </listitem>
+ <listitem>
+ <firstterm>none</firstterm>: Don't replicate anything, this is the default.
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ You can over-ride the default for a particular queue or exchange by passing the
+ argument <literal>qpid.replicate</literal> when creating the queue or exchange. It
+ takes the same values as <literal>ha-replicate</literal>
+ </para>
+ <para>
+ Bindings are automatically replicated if the queue and exchange being bound both
+ have replication <literal>all</literal> or <literal>configuration</literal>, they
+ are not replicated otherwise.
+ </para>
+ <para>
+ You can create replicated queues and exchanges with the
+ <command>qpid-config</command> management tool like this:
+ </para>
+ <programlisting>
+ qpid-config add queue myqueue --replicate all
+ </programlisting>
+ <para>
+ To create replicated queues and exchanges via the client API, add a
+ <literal>node</literal> entry to the address like this:
+ </para>
+ <programlisting>
+ "myqueue;{create:always,node:{x-declare:{arguments:{'qpid.replicate':all}}}}"
+ </programlisting>
+ </section>
+
+ <section>
+ <title>Client Connection and Fail-over</title>
+ <para>
+ Clients can only connect to the primary broker. Backup brokers
+ automatically reject any connection attempt by a client.
+ </para>
+ <para>
+ Clients are configured with the URL for the cluster (details below for
+ each type of client). There are two possibilities
+ <itemizedlist>
+ <listitem>
+ The URL contains multiple addresses, one for each broker in the cluster.
+ </listitem>
+ <listitem>
+ The URL contains a single <firstterm>virtual IP address</firstterm>
+ that is assigned to the primary broker by the resource manager.
+ <footnote><para>Only if the resource manager supports virtual IP addresses</para></footnote>
+ </listitem>
+ </itemizedlist>
+ In the first case, clients will repeatedly re-try each address in the URL
+ until they successfully connect to the primary. In the second case the
+ resource manager will assign the virtual IP address to the primary broker,
+ so clients only need to re-try on a single address.
+ </para>
+ <para>
+ When the primary broker fails, clients re-try all known cluster addresses
+ until they connect to the new primary. The client re-sends any messages
+ that were previously sent but not acknowledged by the broker at the time
+ of the failure. Similarly messages that have been sent by the broker, but
+ not acknowledged by the client, are re-queued.
+ </para>
+ <para>
+ TCP can be slow to detect connection failures. A client can configure a
+ connection to use a <firstterm>heartbeat</firstterm> to detect connection
+ failure, and can specify a time interval for the heartbeat. If heartbeats
+ are in use, failures will be detected no later than twice the heartbeat
+ interval. The following sections explain how to enable heartbeat in each
+ client.
+ </para>
+ <para>
+ See &#34;Cluster Failover&#34; in <citetitle>Programming in Apache
+ Qpid</citetitle> for details on how to keep the client aware of cluster
+ membership.
+ </para>
+ <para>
+ Suppose your cluster has 3 nodes: <literal>node1</literal>, <literal>node2</literal>
+ and <literal>node3</literal> all using the default AMQP port. To connect a client you
+ need to specify the address(es) and set the <literal>reconnect</literal> property to
+ <literal>true</literal>. Here's how to connect each type of client:
+ </para>
+ <section>
+ <title>C++ clients</title>
+ <para>
+ With the C++ client, you specify multiple cluster addresses in a single URL
+ <footnote>
+ <para>
+ The full grammar for the URL is:
+ </para>
+ <programlisting>
+ url = ["amqp:"][ user ["/" password] "@" ] addr ("," addr)*
+ addr = tcp_addr / rmda_addr / ssl_addr / ...
+ tcp_addr = ["tcp:"] host [":" port]
+ rdma_addr = "rdma:" host [":" port]
+ ssl_addr = "ssl:" host [":" port]'
+ </programlisting>
+ </footnote>
+ You also need to specify the connection option
+ <literal>reconnect</literal> to be true. For example:
+ </para>
+ <programlisting>
+ qpid::messaging::Connection c("node1,node2,node3","{reconnect:true}");
+ </programlisting>
+ <para>
+ Heartbeats are disabled by default. You can enable them by specifying a
+ heartbeat interval (in seconds) for the connection via the
+ <literal>heartbeat</literal> option. For example:
+ <programlisting>
+ qpid::messaging::Connection c("node1,node2,node3","{reconnect:true,heartbeat:10}");
+ </programlisting>
+ </para>
+ </section>
+ <section>
+ <title>Python clients</title>
+ <para>
+ With the python client, you specify <literal>reconnect=True</literal>
+ and a list of <replaceable>host:port</replaceable> addresses as
+ <literal>reconnect_urls</literal> when calling
+ <literal>Connection.establish</literal> or
+ <literal>Connection.open</literal>
+ </para>
+ <programlisting>
+ connection = qpid.messaging.Connection.establish("node1", reconnect=True, reconnect_urls=["node1", "node2", "node3"])
+ </programlisting>
+ <para>
+ Heartbeats are disabled by default. You can
+ enable them by specifying a heartbeat interval (in seconds) for the
+ connection via the &#39;heartbeat&#39; option. For example:
+ </para>
+ <programlisting>
+ connection = qpid.messaging.Connection.establish("node1", reconnect=True, reconnect_urls=["node1", "node2", "node3"], heartbeat=10)
+ </programlisting>
+ </section>
+ <section>
+ <title>Java JMS Clients</title>
+ <para>
+ In Java JMS clients, client fail-over is handled automatically if it is
+ enabled in the connection. You can configure a connection to use
+ fail-over using the <command>failover</command> property:
+ </para>
+
+ <screen>
+ connectionfactory.qpidConnectionfactory = amqp://guest:guest@clientid/test?brokerlist=&#39;tcp://localhost:5672&#39;&amp;failover=&#39;failover_exchange&#39;
+ </screen>
+ <para>
+ This property can take three values:
+ </para>
+ <variablelist>
+ <title>Fail-over Modes</title>
+ <varlistentry>
+ <term>failover_exchange</term>
+ <listitem>
+ <para>
+ If the connection fails, fail over to any other broker in the cluster.
+ </para>
+
+ </listitem>
+
+ </varlistentry>
+ <varlistentry>
+ <term>roundrobin</term>
+ <listitem>
+ <para>
+ If the connection fails, fail over to one of the brokers specified in the <command>brokerlist</command>.
+ </para>
+
+ </listitem>
+
+ </varlistentry>
+ <varlistentry>
+ <term>singlebroker</term>
+ <listitem>
+ <para>
+ Fail-over is not supported; the connection is to a single broker only.
+ </para>
+
+ </listitem>
+
+ </varlistentry>
+
+ </variablelist>
+ <para>
+ In a Connection URL, heartbeat is set using the <command>idle_timeout</command> property, which is an integer corresponding to the heartbeat period in seconds. For instance, the following line from a JNDI properties file sets the heartbeat time out to 3 seconds:
+ </para>
+
+ <screen>
+ connectionfactory.qpidConnectionfactory = amqp://guest:guest@clientid/test?brokerlist=&#39;tcp://localhost:5672&#39;,idle_timeout=3
+ </screen>
+ </section>
+ </section>
+</section>
+
+<!-- LocalWords: scalability rgmanager multicast RGManager mailto LVQ qpidd IP dequeued Transactional username
+-->
diff --git a/doc/book/src/Cheat-Sheet-for-configuring-Exchange-Options.xml b/doc/book/src/cpp-broker/Cheat-Sheet-for-configuring-Exchange-Options.xml
index fccdae1b9a..fccdae1b9a 100644
--- a/doc/book/src/Cheat-Sheet-for-configuring-Exchange-Options.xml
+++ b/doc/book/src/cpp-broker/Cheat-Sheet-for-configuring-Exchange-Options.xml
diff --git a/doc/book/src/Cheat-Sheet-for-configuring-Queue-Options.xml b/doc/book/src/cpp-broker/Cheat-Sheet-for-configuring-Queue-Options.xml
index d50948e0cc..d50948e0cc 100644
--- a/doc/book/src/Cheat-Sheet-for-configuring-Queue-Options.xml
+++ b/doc/book/src/cpp-broker/Cheat-Sheet-for-configuring-Queue-Options.xml
diff --git a/doc/book/src/cpp-broker/HA-Queue-Replication.xml b/doc/book/src/cpp-broker/HA-Queue-Replication.xml
new file mode 100644
index 0000000000..b7c533e4cb
--- /dev/null
+++ b/doc/book/src/cpp-broker/HA-Queue-Replication.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+<section>
+ <title>Queue Replication with the HA module</title>
+ <para>
+ As well as support for an active-passive cluster, the <filename>ha</filename> module
+ also allows you to replicate individual queues. The <firstterm>original</firstterm>
+ queue is used as normal. The <firstterm>replica</firstterm> queue is updated
+ automatically as messages are added to or removed from the original queue.
+ </para>
+ <para>
+ To create a replica you need the HA module to be loaded on both the orignal and replica
+ brokers. Note that it is not safe to modify the replica queue other than via the
+ automatic updates from the original. Adding or removing messages on the replica queue
+ will make replication inconsistent and may cause message loss. The HA module does
+ <emphasis>not</emphasis> enforce restricted access to the replica queue (as it does in
+ the case of a cluster) so it is up to the application to ensure the replca is not used
+ until it has been disconnected from the original.
+ </para>
+ <para>
+ Suppose that <command>myqueue</command> is a queue on <command>node1</command> and
+ we want to create a replica of <command>myqueue</command> on <command>node2</command>
+ (where both brokers are using the default AMQP port.) This is accomplished by the command:
+ <programlisting>
+ qpid-config --broker=node2 add queue --start-replica node1 myqueue
+ </programlisting>
+ </para>
+ <para>
+ If <command>myqueue</command> already exists on the replica broker you can start replication from the original queue like this:
+ <programlisting>
+ qpid-ha replicate -b node2 node1 myqueue
+ </programlisting>
+ </para>
+</section>
diff --git a/doc/book/src/LVQ.xml b/doc/book/src/cpp-broker/LVQ.xml
index 4e818881ad..b57c6268be 100644
--- a/doc/book/src/LVQ.xml
+++ b/doc/book/src/cpp-broker/LVQ.xml
@@ -117,7 +117,7 @@
qpid-config utility:
</para>
<programlisting>
- $ qpid-config add queue prices --argument qpid.last_value_queue_key=ticker
+ $ qpid-config add queue prices --lvq-key ticker
</programlisting>
</section>
</section>
@@ -131,13 +131,13 @@
from qpid.messaging import Connection, Message
def send(sender, key, message):
- message.properties["key"] = key
+ message.properties["ticker"] = key
sender.send(message)
conn = Connection("localhost")
conn.open()
sess = conn.session()
- tx = sess.sender("topic;{create:always, node:{type:queue,x-declare:{arguments:{'qpid.last_value_queue_key':key}}}}")
+ tx = sess.sender("prices;{create:always, node:{type:queue,x-declare:{arguments:{'qpid.last_value_queue_key':ticker}}}}")
msg = Message("Content")
send(tx, "key1", msg);
@@ -155,12 +155,11 @@
<title>LVQ Browsing Receiver</title>
<programlisting>
from qpid.messaging import Connection, Message
- from time import sleep
conn = Connection("localhost")
conn.open()
sess = conn.session()
- rx = sess.receiver("topic;{mode:browse}")
+ rx = sess.receiver("prices;{mode:browse}")
while True:
msg = rx.fetch()
@@ -176,7 +175,7 @@
There are two legacy modes (still implemented as of Qpid 0.14)
controlled by the qpid.last_value_queue and
qpid.last_value_queue_no_browse argument values. These modes are
- intended to be deprecated and should not be used.
+ deprecated and should not be used.
</para>
</section>
</section>
diff --git a/doc/book/src/cpp-broker/Makefile b/doc/book/src/cpp-broker/Makefile
new file mode 100644
index 0000000000..0266a0f54d
--- /dev/null
+++ b/doc/book/src/cpp-broker/Makefile
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+include ../Makefile.inc
diff --git a/doc/book/src/Managing-CPP-Broker.xml b/doc/book/src/cpp-broker/Managing-CPP-Broker.xml
index 2cb4def764..d2abea4296 100644
--- a/doc/book/src/Managing-CPP-Broker.xml
+++ b/doc/book/src/cpp-broker/Managing-CPP-Broker.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
-
+
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
@@ -8,16 +8,16 @@
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.
-
+
-->
<section id="section-Managing-CPP-Broker">
@@ -38,6 +38,8 @@
</para></listitem>
<listitem><para>qpid-printevents - used to receive and print QMF events
</para></listitem>
+ <listitem><para>qpid-ha - used to interact with the High Availability module
+ </para></listitem>
</itemizedlist>
<section role="h3" id="MgmtC-2B-2B-Usingqpidconfig"><title>
@@ -119,10 +121,10 @@ Total Exchanges: 6
$ qpid-config queues
Queue Name Attributes
=================================================================
-pub_start
-pub_done
-sub_ready
-sub_done
+pub_start
+pub_done
+sub_ready
+sub_done
perftest0 --durable
reply-dhcp-100-18-254.bos.redhat.com.20713 auto-del excl
topic-dhcp-100-18-254.bos.redhat.com.20713 auto-del excl
@@ -459,4 +461,25 @@ Options:
You get the idea... have fun!
</para>
<!--h3--></section>
+<section>
+ <title>Using qpid-ha</title>
+ <para>This utility lets you monitor and control the activity of the clustering behavior provided by the HA module.
+ </para>
+ <programlisting>
+ <![CDATA[
+qpid-ha --help
+usage: qpid-ha <command> [<arguments>]
+
+Commands are:
+
+ ready Test if a backup broker is ready.
+ query Print HA configuration settings.
+ set Set HA configuration settings.
+ promote Promote broker from backup to primary.
+ replicate Set up replication from <queue> on <remote-broker> to <queue> on the current broker.
+
+For help with a command type: qpid-ha <command> --help
+]]>
+ </programlisting>
+</section>
</section>
diff --git a/doc/book/src/QMF-Python-Console-Tutorial.xml b/doc/book/src/cpp-broker/QMF-Python-Console-Tutorial.xml
index 2cb802671b..2cb802671b 100644
--- a/doc/book/src/QMF-Python-Console-Tutorial.xml
+++ b/doc/book/src/cpp-broker/QMF-Python-Console-Tutorial.xml
diff --git a/doc/book/src/Qpid-Interoperability-Documentation.xml b/doc/book/src/cpp-broker/Qpid-Interoperability-Documentation.xml
index 74546693df..74546693df 100644
--- a/doc/book/src/Qpid-Interoperability-Documentation.xml
+++ b/doc/book/src/cpp-broker/Qpid-Interoperability-Documentation.xml
diff --git a/doc/book/src/Qpid-Management-Framework.xml b/doc/book/src/cpp-broker/Qpid-Management-Framework.xml
index 89bfe9d95e..89bfe9d95e 100644
--- a/doc/book/src/Qpid-Management-Framework.xml
+++ b/doc/book/src/cpp-broker/Qpid-Management-Framework.xml
diff --git a/doc/book/src/Running-CPP-Broker.xml b/doc/book/src/cpp-broker/Running-CPP-Broker.xml
index 7dba5b41ce..7dba5b41ce 100644
--- a/doc/book/src/Running-CPP-Broker.xml
+++ b/doc/book/src/cpp-broker/Running-CPP-Broker.xml
diff --git a/doc/book/src/Security.xml b/doc/book/src/cpp-broker/Security.xml
index 49abfbebca..f28b72c71d 100644
--- a/doc/book/src/Security.xml
+++ b/doc/book/src/cpp-broker/Security.xml
@@ -336,55 +336,6 @@ acl deny all all
acl allow rajith@QPID all all
</programlisting>
<para>
- In deny mode, denying rights to an action is redundant and has no effect.
- </para>
-
-<programlisting>
-acl allow rajith@QPID all all
-acl deny jonathan@QPID all all # This rule is redundant, and has no effect
-acl deny all all
-</programlisting>
- <para>
- If the last line in an ACL file is <literal>acl allow all all</literal>, ACL uses <firstterm>allow mode</firstterm>, and all rights are granted except those that are explicitly denied. The following ACL file allows everyone else to perform any action, but denies <literal>jonathan@QPID</literal> all permissions.
- </para>
-
-<programlisting>
-acl deny jonathan@QPID all all
-acl allow all all
-</programlisting>
- <para>
- In allow mode, allowing rights to an action is redundant and has no effect.
- </para>
-
-<programlisting>
-acl allow rajith@QPID all all # This rule is redundant, and has no effect
-acl deny jonathan@QPID all all
-acl allow all all
-</programlisting>
- <important>
- <title>Important</title>
- <para>
- ACL processing ends when one of the following lines is encountered:
- </para>
-
-<programlisting>
-acl allow all all
-</programlisting>
-
-<programlisting>
-acl deny all all
-</programlisting>
- <para>
- Any lines that occur after one of these statements will be ignored:
- </para>
-
-<programlisting>
-acl allow all all
-acl deny jonathan@QPID all all # This line is ignored !!!
-</programlisting>
-
- </important>
- <para>
ACL syntax allows fine-grained access rights for specific actions:
</para>
@@ -408,8 +359,25 @@ acl deny all all
<title>ACL Syntax</title>
<para>
ACL rules must be on a single line and follow this syntax:
-<programlisting>acl permission {&#60;group-name&#62;|&#60;user-name&#62;|&#34;all&#34;} {action|&#34;all&#34;} [object|&#34;all&#34;] [property=&#60;property-value&#62;]
-</programlisting>
+<programlisting><![CDATA[
+user = username[/domain[@realm]]
+user-list = user1 user2 user3 ...
+group-name-list = group1 group2 group3 ...
+
+group <group-name> = [user-list] [group-name-list]
+
+permission = [allow|allow-log|deny|deny-log]
+action = [consume|publish|create|access|bind|unbind|delete|purge|update]
+object = [virtualhost|queue|exchange|broker|link|route|method]
+property = [name|durable|owner|routingkey|autodelete|exclusive|
+ type|alternate|queuename|schemapackage|schemaclass|
+ queuemaxsizelowerlimit|queuemaxsizeupperlimit|
+ queuemaxcountlowerlimit|queuemaxcountupperlimit]
+
+acl permission {<group-name>|<user-name>|"all"} {action|"all"} [object|"all"
+ [property=<property-value> ...]]
+]]></programlisting>
+
ACL rules can also include a single object name (or the keyword <parameter>all</parameter>) and one or more property name value pairs in the form <command>property=value</command>
</para>
<para>
@@ -665,142 +633,102 @@ acl deny all all
<para>
Wild cards can be used on properties that are a string. The following properties are supported: --> <table id="tabl-Messaging_User_Guide-ACL_Syntax-ACL_Rulesproperty">
<title>ACL Rules:property</title>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>
- <command>name</command>
- </entry>
- <entry>
- <para>
- String. Object name, such as a queue name or exchange name.
- </para>
-
- </entry>
-
- </row>
- <row>
- <entry>
- <command>durable</command>
- </entry>
- <entry>
- <para>
- Boolean. Indicates the object is durable
- </para>
-
- </entry>
-
- </row>
- <row>
- <entry>
- <command>routingkey</command>
- </entry>
- <entry>
- <para>
- Sring. Specifies routing key
- </para>
-
- </entry>
-
- </row>
- <row>
- <entry>
- <command>passive</command>
- </entry>
- <entry>
- <para>
- Boolean. Indicates the presence of a <parameter>passive</parameter> flag
- </para>
-
- </entry>
-
- </row>
- <row>
- <entry>
- <command>autodelete</command>
- </entry>
- <entry>
- <para>
- Boolean. Indicates whether or not the object gets deleted when the connection is closed
- </para>
-
- </entry>
-
- </row>
- <row>
- <entry>
- <command>exclusive</command>
- </entry>
- <entry>
- <para>
- Boolean. Indicates the presence of an <parameter>exclusive</parameter> flag
- </para>
-
- </entry>
-
- </row>
- <row>
- <entry>
- <command>type</command>
- </entry>
- <entry>
- <para>
- String. Type of object, such as topic, fanout, or xml
- </para>
-
- </entry>
-
- </row>
- <row>
- <entry>
- <command>alternate</command>
- </entry>
- <entry>
- <para>
- String. Name of the alternate exchange
- </para>
-
- </entry>
-
- </row>
- <row>
- <entry>
- <command>queuename</command>
- </entry>
- <entry>
- <para>
- String. Name of the queue (used only when the object is something other than <parameter>queue</parameter>
- </para>
-
- </entry>
-
- </row>
- <row>
- <entry>
- <command>schemapackage</command>
- </entry>
- <entry>
- <para>
- String. QMF schema package name
- </para>
-
- </entry>
-
- </row>
- <row>
- <entry>
- <command>schemaclass</command>
- </entry>
- <entry>
- <para>
- String. QMF schema class name
- </para>
-
- </entry>
-
- </row>
-
- </tbody>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Property</entry>
+ <entry>Type</entry>
+ <entry>Description</entry>
+ <entry>Usage</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry> <command>name</command> </entry>
+ <entry>String</entry>
+ <entry>Object name, such as a queue name or exchange name.</entry>
+ <entry>.</entry>
+ </row>
+ <row>
+ <entry> <command>durable</command> </entry>
+ <entry>Boolean</entry>
+ <entry>Indicates the object is durable</entry>
+ <entry>CREATE QUEUE, CREATE EXCHANGE</entry>
+ </row>
+ <row>
+ <entry> <command>routingkey</command> </entry>
+ <entry>String</entry>
+ <entry>Specifies routing key</entry>
+ <entry>BIND EXCHANGE, UNBIND EXCHANGE, ACCESS EXCHANGE</entry>
+ </row>
+ <row>
+ <entry> <command>autodelete</command> </entry>
+ <entry>Boolean</entry>
+ <entry>Indicates whether or not the object gets deleted when the connection is closed</entry>
+ <entry>CREATE QUEUE</entry>
+ </row>
+ <row>
+ <entry> <command>exclusive</command> </entry>
+ <entry>Boolean</entry>
+ <entry>Indicates the presence of an <parameter>exclusive</parameter> flag</entry>
+ <entry>CREATE QUEUE</entry>
+ </row>
+ <row>
+ <entry> <command>type</command> </entry>
+ <entry>String</entry>
+ <entry>Type of exchange, such as topic, fanout, or xml</entry>
+ <entry>CREATE EXCHANGE</entry>
+ </row>
+ <row>
+ <entry> <command>alternate</command> </entry>
+ <entry>String</entry>
+ <entry>Name of the alternate exchange</entry>
+ <entry>CREATE EXCHANGE, CREATE QUEUE</entry>
+ </row>
+ <row>
+ <entry> <command>queuename</command> </entry>
+ <entry>String</entry>
+ <entry>Name of the queue</entry>
+ <entry>ACCESS EXCHANGE</entry>
+ </row>
+ <row>
+ <entry> <command>schemapackage</command> </entry>
+ <entry>String</entry>
+ <entry>QMF schema package name</entry>
+ <entry>ACCESS METHOD</entry>
+ </row>
+ <row>
+ <entry> <command>schemaclass</command> </entry>
+ <entry>String</entry>
+ <entry>QMF schema class name</entry>
+ <entry>ACCESS METHOD</entry>
+ </row>
+ <row>
+ <entry> <command>queuemaxsizelowerlimit</command> </entry>
+ <entry>Integer</entry>
+ <entry>Minimum value for queue.max_size</entry>
+ <entry>CREATE QUEUE</entry>
+ </row>
+ <row>
+ <entry> <command>queuemaxsizeupperlimit</command> </entry>
+ <entry>Integer</entry>
+ <entry>Maximum value for queue.max_size</entry>
+ <entry>CREATE QUEUE</entry>
+ </row>
+ <row>
+ <entry> <command>queuemaxcountlowerlimit</command> </entry>
+ <entry>Integer</entry>
+ <entry>Minimum value for queue.max_count</entry>
+ <entry>CREATE QUEUE</entry>
+ </row>
+ <row>
+ <entry> <command>queuemaxcountupperlimit</command> </entry>
+ <entry>Integer</entry>
+ <entry>Maximum value for queue.max_count</entry>
+ <entry>CREATE QUEUE</entry>
+ </row>
+
+ </tbody>
</tgroup>
@@ -821,19 +749,19 @@ acl deny all all
</listitem>
<listitem>
<para>
- Empty lines and lines that contain only whitespace are ignored
+ Empty lines and lines that contain only whitespace (' ', '\f', '\n', '\r', '\t', '\v') are ignored.
</para>
</listitem>
<listitem>
<para>
- All tokens are case sensitive. <parameter>name1</parameter> is not the same as <parameter>Name1</parameter> and <parameter>create</parameter> is not the same as <parameter>CREATE</parameter>
+ All tokens are case sensitive. <parameter>name1</parameter> is not the same as <parameter>Name1</parameter> and <parameter>create</parameter> is not the same as <parameter>CREATE</parameter>.
</para>
</listitem>
<listitem>
<para>
- Group lists can be extended to the following line by terminating the line with the <command>\</command> character
+ Group lists can be extended to the following line by terminating the line with the <command>\</command> character.
</para>
</listitem>
@@ -845,31 +773,37 @@ acl deny all all
</listitem>
<listitem>
<para>
- All ACL rules are limited to a single line
+ All ACL rules are limited to a single line of at most 1024 characters.
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ Rules are interpreted from the top of the file down until a matching rule is obtained. The matching rule then controls the allow or deny decision.
</para>
</listitem>
<listitem>
<para>
- Rules are interpreted from the top of the file down until the name match is obtained; at which point processing stops.
+ The keyword <parameter>all</parameter> is reserved and may be used in ACL rules to match all individuals and groups, all actions, or all objects.
</para>
</listitem>
<listitem>
<para>
- The keyword <parameter>all</parameter> matches all individuals, groups and actions
+ By default ACL files are in 'Deny Mode' and deny all actions by all users. That is, there is an implicit <parameter>acl deny all all</parameter> rule appended to the ACL rule list.
</para>
</listitem>
<listitem>
<para>
- The last line of the file - whether present or not - will be assumed to be <command>acl deny all all</command>. If present in the file, all lines below it are ignored.
+ Group names may contain only <parameter>a-z</parameter>, <parameter>A-Z</parameter>, <parameter>0-9</parameter>, <parameter>- hyphen</parameter> and <parameter>_ underscore</parameter>.
</para>
</listitem>
<listitem>
<para>
- Names and group names may contain only <parameter>a-z</parameter>, <parameter>A-Z</parameter>, <parameter>0-9</parameter>, <parameter>-</parameter> and <parameter>_</parameter>
+ Individual user names may contain only <parameter>a-z</parameter>, <parameter>A-Z</parameter>, <parameter>0-9</parameter>, <parameter>- hyphen</parameter>, <parameter>_ underscore</parameter>, <parameter>. period</parameter>, <parameter>@ ampersand</parameter>, and <parameter>/ slash</parameter>.
</para>
</listitem>
@@ -886,6 +820,75 @@ acl deny all all
</section>
+ <section id="sect-Messaging_User_Guide-Authorization-ACL_Rule_Matching">
+ <title>ACL Rule Matching</title>
+ <para>
+ The minimum matching criteria for ACL rules are:
+ <itemizedlist>
+ <listitem>An actor (individually named or group member)</listitem>
+ <listitem>An action</listitem>
+ <listitem>An object</listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ If a rule does not match the minimum criteria then that rule does not control the ACL allow or deny decision.
+ </para>
+ <para>
+ ACL rules optionally specify object names and property name=value pairs. If an ACL rule specifies an object name or property values than all of them must match to cause the rule to match.
+ </para>
+ <para>
+ The following illustration shows how ACL rules are processed to find matching rules.
+<programlisting><![CDATA[
+# Example of rule matching
+#
+# Using this ACL file content:
+
+(1) acl deny bob create exchange name=test durable=true passive=true
+(2) acl deny bob create exchange name=myEx type=direct
+(3) acl allow all all
+
+#
+# Lookup 1. id:bob action:create objectType:exchange name=test
+# {durable=false passive=false type=direct alternate=}
+#
+# ACL Match Processing:
+# 1. Rule 1 passes minimum criteria with user bob, action create,
+# and object exchange.
+# 2. Rule 1 matches name=test.
+# 3. Rule 1 does not match the rule's durable=true with the requested
+# lookup of durable=false.
+# 4. Rule 1 does not control the decision and processing continues
+# to Rule 2.
+# 5. Rule 2 passes minimum criteria with user bob, action create,
+# and object exchange.
+# 6. Rule 2 does not match the rule's name=myEx with the requested
+# lookup of name=test.
+# 7. Rule 2 does not control the decision and processing continues
+# to Rule 3.
+# 8. Rule 3 matches everything and the decision is 'allow'.
+#
+# Lookup 2. id:bob action:create objectType:exchange name=myEx
+# {durable=true passive=true type=direct alternate=}
+#
+# ACL Match Processing:
+# 1. Rule 1 passes minimum criteria with user bob, action create,
+# and object exchange.
+# 6. Rule 1 does not match the rule's name=test with the requested
+# lookup of name=myEx.
+# 4. Rule 1 does not control the decision and processing continues
+# to Rule 2.
+# 5. Rule 2 passes minimum criteria with user bob, action create,
+# and object exchange.
+# 2. Rule 2 matches name=myEx.
+# 3. Rule 2 matches the rule's type=direct with the requested
+# lookup of type=direct.
+# 8. Rule 2 is the matching rule and the decision is 'deny'.
+#
+]]></programlisting>
+ </para>
+
+ </section>
+
<section id="sect-Messaging_User_Guide-Authorization-Specifying_ACL_Permissions">
<title>Specifying ACL Permissions</title>
<para>
@@ -925,6 +928,20 @@ acl deny all all
<para>
In the previous example, the last line, <literal>acl deny all all</literal>, denies all authorizations that have not been specifically granted. This is the default, but it is useful to include it explicitly on the last line for the sake of clarity. If you want to grant all rights by default, you can specify <literal>acl allow all all</literal> in the last line.
</para>
+ <para>
+ ACL allows specification of conflicting rules. Be sure to specify the most specific rules first followed by more general rules. Here is an example:
+ </para>
+ <para>
+<programlisting>
+group users alice@QPID bob@QPID charlie@QPID
+acl deny charlie@QPID create queue
+acl allow users create queue
+acl deny all all
+</programlisting>
+ </para>
+ <para>
+ In this example users alice and bob would be able to create queues due to their membership in the users group. However, user charlie is denied from creating a queue despite his membership in the users group because a deny rule for him is stated before the allow rule for the users group.
+ </para>
<para>
Do not allow <parameter>guest</parameter> to access and log QMF management methods that could cause security breaches:
</para>
@@ -940,6 +957,30 @@ acl allow all all
</section>
+ <section id="sect-Messaging_User_Guide-Authorization-Specifying_ACL_Connection_Limits">
+ <title>Specifying ACL Connection Limits</title>
+ <para>
+ The ACL module creates two broker command line switches that set limits on the number of connections allowed per user or per client host address. These settings are not specified in the ACL file.
+ </para>
+ <para>
+<programlisting>
+--acl-max-connect-per-user N_USER
+--acl-max-connect-per-ip N_IP
+</programlisting>
+ </para>
+ <para>
+ If either of these switches is not specified or the value specified is zero then the corresponding connection limit is not enforced.
+ </para>
+ <para>
+ If a limit is set for user connections then all users are limited to that number of connections regardless of the client IP address the users are coming from.
+ </para>
+ <para>
+ If a limit is set for IP connections then connections for a given IP address are limited regardless of the user credentials presented with the connection.
+ </para>
+ <para>
+ Note that addresses using different transports are counted separately even though the host is actually the same physical machine. In the setting illustrated above a host would allow N_IP connections from [::1] IPv6 transport localhost and another N_IP connections from [127.0.0.1] IPv4 transport localhost.
+ </para>
+ </section>
</section>
diff --git a/doc/book/src/Using-Broker-Federation.xml b/doc/book/src/cpp-broker/Using-Broker-Federation.xml
index f5fedf814c..f5fedf814c 100644
--- a/doc/book/src/Using-Broker-Federation.xml
+++ b/doc/book/src/cpp-broker/Using-Broker-Federation.xml
diff --git a/doc/book/src/Using-message-groups.xml b/doc/book/src/cpp-broker/Using-message-groups.xml
index 9b904d9f18..9b904d9f18 100644
--- a/doc/book/src/Using-message-groups.xml
+++ b/doc/book/src/cpp-broker/Using-message-groups.xml
diff --git a/doc/book/src/producer-flow-control.xml b/doc/book/src/cpp-broker/producer-flow-control.xml
index fd44f51e81..fd44f51e81 100644
--- a/doc/book/src/producer-flow-control.xml
+++ b/doc/book/src/cpp-broker/producer-flow-control.xml
diff --git a/doc/book/src/queue-state-replication.xml b/doc/book/src/cpp-broker/queue-state-replication.xml
index 3ffac805eb..3ffac805eb 100644
--- a/doc/book/src/queue-state-replication.xml
+++ b/doc/book/src/cpp-broker/queue-state-replication.xml
diff --git a/doc/book/src/css/style.css b/doc/book/src/css/style.css
deleted file mode 100644
index 2a1bee8623..0000000000
--- a/doc/book/src/css/style.css
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- *
- * 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.
- *
- */
-ul {
- list-style-type:square;
-}
-
-th {
- font-weight: bold;
-}
-
-.navfooter td {
- font-size:10pt;
-}
-
-.navheader td {
- font-size:10pt;
-}
-
-body {
- width:950px;
- margin-left:100px;
- margin-top:40px;
-
- background:#FFFFFF;
- font-family:"Verdana", sans-serif;
- font-size:10pt;
-}
-
-body a {
- color:#000000;
-}
-
-
-div.book {
- margin-left:10pt;
- margin-right:10pt;
-}
-
-div.preface {
- margin-left:10pt;
- margin-right:10pt;
-}
-
-div.chapter {
- margin-left:10pt;
- margin-right:10pt;
-}
-
-div.section {
- margin-left:10pt;
- margin-right:10pt;
-}
-
-div.titlepage {
- margin-left:-10pt;
- margin-right:-10pt;
-}
-
-.calloutlist td {
- font-size:10pt;
-}
-
-.table-contents table {
- border-spacing: 0px;
-}
-
-.table-contents td {
- font-size:10pt;
- padding-left:6px;
- padding-right:6px;
-}
-
-.chapter h2.title {
- font-size:20pt;
- color:#0c3b82;
-}
-
-.chapter .section h2.title {
- font-size:18pt;
- color:#0c3b82;
-}
-
-.section h2.title {
- font-size:16pt;
- color:#0c3b82;
-}
-
-.section h3.title {
- font-size:14pt;
- color:#0c3b82;
-}
-
-.section h4.title {
- font-size:12pt;
- color:#0c3b82;
-}
-
-.section h5.title {
- font-size:12pt;
- color:#0c3b82;
-}
-
-.section h6.title {
- font-size:12pt;
- color:#0c3b82;
-}
-
-.toc a {
- font-size:9pt;
-}
-
diff --git a/doc/book/src/AMQP-Messaging-Broker-Java-Book.xml b/doc/book/src/java-broker/AMQP-Messaging-Broker-Java-Book.xml
index 0bb40052cd..0bb40052cd 100644
--- a/doc/book/src/AMQP-Messaging-Broker-Java-Book.xml
+++ b/doc/book/src/java-broker/AMQP-Messaging-Broker-Java-Book.xml
diff --git a/doc/book/src/Add-New-Users.xml b/doc/book/src/java-broker/Add-New-Users.xml
index dc34bcc5c9..dc34bcc5c9 100644
--- a/doc/book/src/Add-New-Users.xml
+++ b/doc/book/src/java-broker/Add-New-Users.xml
diff --git a/doc/book/src/Broker-Configuration-Guide.xml b/doc/book/src/java-broker/Broker-Configuration-Guide.xml
index 63d2748eee..28a2e9f2d3 100644
--- a/doc/book/src/Broker-Configuration-Guide.xml
+++ b/doc/book/src/java-broker/Broker-Configuration-Guide.xml
@@ -24,5 +24,5 @@
<title>Broker Configuration Guide </title>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
- href="java/broker/configuration/Topic-Configuration.xml"/>
+ href="Topic-Configuration.xml"/>
</section>
diff --git a/doc/book/src/Configure-ACLs.xml b/doc/book/src/java-broker/Configure-ACLs.xml
index e82f2a86d0..e82f2a86d0 100644
--- a/doc/book/src/Configure-ACLs.xml
+++ b/doc/book/src/java-broker/Configure-ACLs.xml
diff --git a/doc/book/src/Configure-Java-Qpid-to-use-a-SSL-connection.xml b/doc/book/src/java-broker/Configure-Java-Qpid-to-use-a-SSL-connection.xml
index 838b899337..838b899337 100644
--- a/doc/book/src/Configure-Java-Qpid-to-use-a-SSL-connection.xml
+++ b/doc/book/src/java-broker/Configure-Java-Qpid-to-use-a-SSL-connection.xml
diff --git a/doc/book/src/Configure-Log4j-CompositeRolling-Appender.xml b/doc/book/src/java-broker/Configure-Log4j-CompositeRolling-Appender.xml
index f52bc55399..f52bc55399 100644
--- a/doc/book/src/Configure-Log4j-CompositeRolling-Appender.xml
+++ b/doc/book/src/java-broker/Configure-Log4j-CompositeRolling-Appender.xml
diff --git a/doc/book/src/Configure-the-Broker-via-config.xml.xml b/doc/book/src/java-broker/Configure-the-Broker-via-config.xml.xml
index 6a7729acd8..6a7729acd8 100644
--- a/doc/book/src/Configure-the-Broker-via-config.xml.xml
+++ b/doc/book/src/java-broker/Configure-the-Broker-via-config.xml.xml
diff --git a/doc/book/src/Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml b/doc/book/src/java-broker/Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml
index 804970b923..804970b923 100644
--- a/doc/book/src/Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml
+++ b/doc/book/src/java-broker/Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml
diff --git a/doc/book/src/Configuring-Management-Users.xml b/doc/book/src/java-broker/Configuring-Management-Users.xml
index a2a8d46d88..a2a8d46d88 100644
--- a/doc/book/src/Configuring-Management-Users.xml
+++ b/doc/book/src/java-broker/Configuring-Management-Users.xml
diff --git a/doc/book/src/Configuring-Qpid-JMX-Management-Console.xml b/doc/book/src/java-broker/Configuring-Qpid-JMX-Management-Console.xml
index 72e4ba8969..72e4ba8969 100644
--- a/doc/book/src/Configuring-Qpid-JMX-Management-Console.xml
+++ b/doc/book/src/java-broker/Configuring-Qpid-JMX-Management-Console.xml
diff --git a/doc/book/src/Debug-using-log4j.xml b/doc/book/src/java-broker/Debug-using-log4j.xml
index 615fd9e560..615fd9e560 100644
--- a/doc/book/src/Debug-using-log4j.xml
+++ b/doc/book/src/java-broker/Debug-using-log4j.xml
diff --git a/doc/book/src/How-to-Tune-M3-Java-Broker-Performance.xml b/doc/book/src/java-broker/How-to-Tune-M3-Java-Broker-Performance.xml
index f7fffbaceb..f7fffbaceb 100644
--- a/doc/book/src/How-to-Tune-M3-Java-Broker-Performance.xml
+++ b/doc/book/src/java-broker/How-to-Tune-M3-Java-Broker-Performance.xml
diff --git a/doc/book/src/How-to-Use-SlowConsumerDisconnect.xml b/doc/book/src/java-broker/How-to-Use-SlowConsumerDisconnect.xml
index 4e0ce0f7e0..4e0ce0f7e0 100644
--- a/doc/book/src/How-to-Use-SlowConsumerDisconnect.xml
+++ b/doc/book/src/java-broker/How-to-Use-SlowConsumerDisconnect.xml
diff --git a/doc/book/src/Java-Broker-Feature-Guide.xml b/doc/book/src/java-broker/Java-Broker-Feature-Guide.xml
index bbc2a1aaf0..bbc2a1aaf0 100644
--- a/doc/book/src/Java-Broker-Feature-Guide.xml
+++ b/doc/book/src/java-broker/Java-Broker-Feature-Guide.xml
diff --git a/doc/book/src/Java-Environment-Variables.xml b/doc/book/src/java-broker/Java-Environment-Variables.xml
index 12703190f2..12703190f2 100644
--- a/doc/book/src/Java-Environment-Variables.xml
+++ b/doc/book/src/java-broker/Java-Environment-Variables.xml
diff --git a/doc/book/src/java-broker/Makefile b/doc/book/src/java-broker/Makefile
new file mode 100644
index 0000000000..0266a0f54d
--- /dev/null
+++ b/doc/book/src/java-broker/Makefile
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+include ../Makefile.inc
diff --git a/doc/book/src/Management-Console-Security.xml b/doc/book/src/java-broker/Management-Console-Security.xml
index aa7bebb09e..31f63c70da 100644
--- a/doc/book/src/Management-Console-Security.xml
+++ b/doc/book/src/java-broker/Management-Console-Security.xml
@@ -57,8 +57,7 @@
The broker configuration must be updated before the broker will
start. This can be done either by disabling the SSL support,
utilizing a purchased SSL certificate to create a keystore of
- your own, or using the example 'create-example-ssl-stores' script
- in the brokers bin/ directory to generate a self-signed keystore.
+ your own, or generating a self-signed keystore.
</para><para>
The broker must be configured with a keystore containing the
private and public keys associated with its SSL certificate. This
@@ -76,7 +75,7 @@
&lt;ssl&gt;
&lt;enabled&gt;true&lt;/enabled&gt;
&lt;!-- Update below path to your keystore location, eg ${conf}/qpid.keystore --&gt;
- &lt;keyStorePath&gt;${prefix}/../test_resources/ssl/keystore.jks&lt;/keyStorePath&gt;
+ &lt;keyStorePath&gt;${conf}/qpid.keystore&lt;/keyStorePath&gt;
&lt;keyStorePassword&gt;password&lt;/keyStorePassword&gt;
&lt;/ssl&gt;
&lt;/management&gt;
diff --git a/doc/book/src/MessageStore-Tool.xml b/doc/book/src/java-broker/MessageStore-Tool.xml
index fdcb3cd560..fdcb3cd560 100644
--- a/doc/book/src/MessageStore-Tool.xml
+++ b/doc/book/src/java-broker/MessageStore-Tool.xml
diff --git a/doc/book/src/Qpid-JMX-Management-Console-FAQ.xml b/doc/book/src/java-broker/Qpid-JMX-Management-Console-FAQ.xml
index 1806ab01b1..1806ab01b1 100644
--- a/doc/book/src/Qpid-JMX-Management-Console-FAQ.xml
+++ b/doc/book/src/java-broker/Qpid-JMX-Management-Console-FAQ.xml
diff --git a/doc/book/src/Qpid-JMX-Management-Console-User-Guide.xml b/doc/book/src/java-broker/Qpid-JMX-Management-Console-User-Guide.xml
index 55e1f8e829..35bb5dfbe8 100644
--- a/doc/book/src/Qpid-JMX-Management-Console-User-Guide.xml
+++ b/doc/book/src/java-broker/Qpid-JMX-Management-Console-User-Guide.xml
@@ -178,7 +178,7 @@
connection tree, disconnecting the selected server connection,
and removing the server from the connection tree.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113098.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113098.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
Beside these buttons is a combo for selecting the refresh
@@ -202,7 +202,7 @@
hostname, management port, and a username and password. An
example is shown below:
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113099.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113099.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
Once all the required details are entered, pressing Connect will
@@ -214,7 +214,7 @@
VirtualHosts present on the server, as can be seen in the figure
below.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113100.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113100.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
If the server supports a newer management API than the console in
@@ -284,7 +284,7 @@
the left side of the application. To open a particular MBean from
the tree for viewing, simply select it in the tree and it will be
opened in the main view.
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113101.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113101.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
As there may be vast numbers of Queues, Connections, and
Exchanges on the server these MBeans are not automatically added
@@ -302,7 +302,7 @@
from the tree by right clicking on them to expose a context menu
allowing deletion.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113102.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113102.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
As an alternative way to open a particular MBean for viewing,
without first adding it to the tree, you can simply double click
@@ -334,7 +334,7 @@
without a restart, and can be performed by clicking the Execute
button and confirming the prompt which follows.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113103.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113103.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para>
<!--h1--></section>
@@ -362,7 +362,7 @@
<para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113104.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113104.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
The Runtime Options tab allows manipulation of the logging
settings without affecting the configuration files (this means
@@ -395,7 +395,7 @@
parent by setting it to an INHERITED level that removes any
previously set Level of its own.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113105.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113105.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
In order to set one of more Loggers to a new Level, they should
be selected in the table (or double click an individual Logger to
@@ -436,7 +436,7 @@
Loggers and use the button to load the dialog to set the new
Level.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113106.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113106.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
One issue to note of when reloading the configuration file
settings, either automatically using LogWatch or manually, is
@@ -469,7 +469,7 @@
<para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113107.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113107.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
The ServerInformation MBean currently only conveys various pieces
of version information to allow precise identification of the
@@ -490,13 +490,13 @@
allows manipulation of existing user accounts and creation of new
user accounts.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113108.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113108.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
To add a new user, press the <emphasis>Add New User</emphasis> button, which
will load the dialog shown below.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113109.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113109.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
Here you may enter the new users Username, Password, and select
their JMX Management Rights. This controls whether or not they
@@ -561,7 +561,7 @@
The console will prompt for confirmation before undertaking the
operation.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113110.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113110.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
Clicking the <emphasis>Create</emphasis> button in the Exchange section will
open a dialog allowing specification of the Name, Type, and
@@ -602,7 +602,7 @@
MBeans in that VirtualHost. An example of this can be seen in the
figure below.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113111.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113111.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
All received Notifications will be displayed until such time as
the user removes them, either in this aggregated view, or in the
@@ -638,7 +638,7 @@
Attributes</emphasis> button at the bottom right corner of the
table)<emphasis>.</emphasis>
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113112.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113112.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
Upon opening a Queue MBean, the Attributes tab is displayed, as
shown below. This allows viewing the value all attributes,
@@ -647,7 +647,7 @@
their purpose, and graphing certain numerical attribute values as
they change over time.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113113.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113113.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
The next tab contains the operations that can be performed on the
queue. The main table serves as a means of viewing the messages
@@ -664,7 +664,7 @@
information to show this (unless only a single message position
is requested).
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113114.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113114.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
Upon selecting a message in the table, its header properties and
redelivery status are updated in the area below the table. Double
@@ -700,7 +700,7 @@
fashion as described for Queues, again showing an Attributes tab
initially, with the Operations tab next:
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113115.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113115.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
Of the four default Exchange Types <emphasis>(direct, fanout, headers,
and topic)</emphasis> all but <emphasis>headers</emphasis> have their bindings
@@ -711,12 +711,12 @@
button opens a dialog allowing association of an existing queue
with the entered Binding.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113116.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113116.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
The <emphasis>headers</emphasis> Exchange type (default instantiation
<emphasis>amq.match or amq.headers</emphasis>) is presented as below:
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113117.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113117.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
In the previous figure, the left table indicates the binding
number, and the Queue associated with the binding. Selecting one
@@ -724,7 +724,7 @@
the header values that control when the binding matches an
incoming message.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113118.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113118.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
</para><para>
Pressing the <emphasis>Create</emphasis> button when managing a
<emphasis>headers</emphasis> Exchange opens a dialog allowing creation of a
@@ -760,7 +760,7 @@
Notifications. The Operations tab can be seen in the figure
below.
</para><para>
- <mediaobject><imageobject><imagedata fileref="images/jmx_console/3113119.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
+ <mediaobject><imageobject><imagedata fileref="images/3113119.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject>
The main table shows the properties of all the Channels that are
present on the Connection, including whether they are
<emphasis>Transactional</emphasis>, the <emphasis>Number of Unacked Messages</emphasis>
diff --git a/doc/book/src/Qpid-JMX-Management-Console.xml b/doc/book/src/java-broker/Qpid-JMX-Management-Console.xml
index fb46f4a01a..fb46f4a01a 100644
--- a/doc/book/src/Qpid-JMX-Management-Console.xml
+++ b/doc/book/src/java-broker/Qpid-JMX-Management-Console.xml
diff --git a/doc/book/src/Qpid-Java-Broker-Management-CLI.xml b/doc/book/src/java-broker/Qpid-Java-Broker-Management-CLI.xml
index 84c4b7b7a4..84c4b7b7a4 100644
--- a/doc/book/src/Qpid-Java-Broker-Management-CLI.xml
+++ b/doc/book/src/java-broker/Qpid-Java-Broker-Management-CLI.xml
diff --git a/doc/book/src/Qpid-Java-Build-How-To.xml b/doc/book/src/java-broker/Qpid-Java-Build-How-To.xml
index 9f3625760a..9f3625760a 100644
--- a/doc/book/src/Qpid-Java-Build-How-To.xml
+++ b/doc/book/src/java-broker/Qpid-Java-Build-How-To.xml
diff --git a/doc/book/src/Qpid-Java-FAQ.xml b/doc/book/src/java-broker/Qpid-Java-FAQ.xml
index 845c343350..845c343350 100644
--- a/doc/book/src/Qpid-Java-FAQ.xml
+++ b/doc/book/src/java-broker/Qpid-Java-FAQ.xml
diff --git a/doc/book/src/Qpid-Management-Features.xml b/doc/book/src/java-broker/Qpid-Management-Features.xml
index c90d7e97c6..c90d7e97c6 100644
--- a/doc/book/src/Qpid-Management-Features.xml
+++ b/doc/book/src/java-broker/Qpid-Management-Features.xml
diff --git a/doc/book/src/Qpid-Troubleshooting-Guide.xml b/doc/book/src/java-broker/Qpid-Troubleshooting-Guide.xml
index 0920f18798..0920f18798 100644
--- a/doc/book/src/Qpid-Troubleshooting-Guide.xml
+++ b/doc/book/src/java-broker/Qpid-Troubleshooting-Guide.xml
diff --git a/doc/book/src/java/broker/configuration/Topic-Configuration.xml b/doc/book/src/java-broker/Topic-Configuration.xml
index 1f73bbd7a4..1f73bbd7a4 100644
--- a/doc/book/src/java/broker/configuration/Topic-Configuration.xml
+++ b/doc/book/src/java-broker/Topic-Configuration.xml
diff --git a/doc/book/src/Use-Priority-Queues.xml b/doc/book/src/java-broker/Use-Priority-Queues.xml
index 466d958d43..466d958d43 100644
--- a/doc/book/src/Use-Priority-Queues.xml
+++ b/doc/book/src/java-broker/Use-Priority-Queues.xml
diff --git a/doc/book/src/images/jmx_console/3113098.png b/doc/book/src/java-broker/images/3113098.png
index 7de85030c6..7de85030c6 100644
--- a/doc/book/src/images/jmx_console/3113098.png
+++ b/doc/book/src/java-broker/images/3113098.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113099.png b/doc/book/src/java-broker/images/3113099.png
index fb6fc65d73..fb6fc65d73 100644
--- a/doc/book/src/images/jmx_console/3113099.png
+++ b/doc/book/src/java-broker/images/3113099.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113100.png b/doc/book/src/java-broker/images/3113100.png
index a7d727b854..a7d727b854 100644
--- a/doc/book/src/images/jmx_console/3113100.png
+++ b/doc/book/src/java-broker/images/3113100.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113101.png b/doc/book/src/java-broker/images/3113101.png
index 30731277c2..30731277c2 100644
--- a/doc/book/src/images/jmx_console/3113101.png
+++ b/doc/book/src/java-broker/images/3113101.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113102.png b/doc/book/src/java-broker/images/3113102.png
index f150a21b10..f150a21b10 100644
--- a/doc/book/src/images/jmx_console/3113102.png
+++ b/doc/book/src/java-broker/images/3113102.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113103.png b/doc/book/src/java-broker/images/3113103.png
index a91efb4306..a91efb4306 100644
--- a/doc/book/src/images/jmx_console/3113103.png
+++ b/doc/book/src/java-broker/images/3113103.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113104.png b/doc/book/src/java-broker/images/3113104.png
index c5ef12d8b1..c5ef12d8b1 100644
--- a/doc/book/src/images/jmx_console/3113104.png
+++ b/doc/book/src/java-broker/images/3113104.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113105.png b/doc/book/src/java-broker/images/3113105.png
index b155f9d9a1..b155f9d9a1 100644
--- a/doc/book/src/images/jmx_console/3113105.png
+++ b/doc/book/src/java-broker/images/3113105.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113106.png b/doc/book/src/java-broker/images/3113106.png
index 22bcdd084e..22bcdd084e 100644
--- a/doc/book/src/images/jmx_console/3113106.png
+++ b/doc/book/src/java-broker/images/3113106.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113107.png b/doc/book/src/java-broker/images/3113107.png
index cf5dd97e89..cf5dd97e89 100644
--- a/doc/book/src/images/jmx_console/3113107.png
+++ b/doc/book/src/java-broker/images/3113107.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113108.png b/doc/book/src/java-broker/images/3113108.png
index c0e5eafde2..c0e5eafde2 100644
--- a/doc/book/src/images/jmx_console/3113108.png
+++ b/doc/book/src/java-broker/images/3113108.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113109.png b/doc/book/src/java-broker/images/3113109.png
index 139d81d849..139d81d849 100644
--- a/doc/book/src/images/jmx_console/3113109.png
+++ b/doc/book/src/java-broker/images/3113109.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113110.png b/doc/book/src/java-broker/images/3113110.png
index 2207f15cd7..2207f15cd7 100644
--- a/doc/book/src/images/jmx_console/3113110.png
+++ b/doc/book/src/java-broker/images/3113110.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113111.png b/doc/book/src/java-broker/images/3113111.png
index 5737f41caf..5737f41caf 100644
--- a/doc/book/src/images/jmx_console/3113111.png
+++ b/doc/book/src/java-broker/images/3113111.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113112.png b/doc/book/src/java-broker/images/3113112.png
index d9ee094ab4..d9ee094ab4 100644
--- a/doc/book/src/images/jmx_console/3113112.png
+++ b/doc/book/src/java-broker/images/3113112.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113113.png b/doc/book/src/java-broker/images/3113113.png
index e80812f83c..e80812f83c 100644
--- a/doc/book/src/images/jmx_console/3113113.png
+++ b/doc/book/src/java-broker/images/3113113.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113114.png b/doc/book/src/java-broker/images/3113114.png
index b237181150..b237181150 100644
--- a/doc/book/src/images/jmx_console/3113114.png
+++ b/doc/book/src/java-broker/images/3113114.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113115.png b/doc/book/src/java-broker/images/3113115.png
index 84ad42b567..84ad42b567 100644
--- a/doc/book/src/images/jmx_console/3113115.png
+++ b/doc/book/src/java-broker/images/3113115.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113116.png b/doc/book/src/java-broker/images/3113116.png
index 18b979792f..18b979792f 100644
--- a/doc/book/src/images/jmx_console/3113116.png
+++ b/doc/book/src/java-broker/images/3113116.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113117.png b/doc/book/src/java-broker/images/3113117.png
index 3b33ef67ac..3b33ef67ac 100644
--- a/doc/book/src/images/jmx_console/3113117.png
+++ b/doc/book/src/java-broker/images/3113117.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113118.png b/doc/book/src/java-broker/images/3113118.png
index 60451f88cf..60451f88cf 100644
--- a/doc/book/src/images/jmx_console/3113118.png
+++ b/doc/book/src/java-broker/images/3113118.png
Binary files differ
diff --git a/doc/book/src/images/jmx_console/3113119.png b/doc/book/src/java-broker/images/3113119.png
index 16ded074bd..16ded074bd 100644
--- a/doc/book/src/images/jmx_console/3113119.png
+++ b/doc/book/src/java-broker/images/3113119.png
Binary files differ
diff --git a/doc/book/src/ACL.xml b/doc/book/src/old/ACL.xml
index ceb7cecb23..ceb7cecb23 100644
--- a/doc/book/src/ACL.xml
+++ b/doc/book/src/old/ACL.xml
diff --git a/doc/book/src/AMQP-.NET-Messaging-Client.xml b/doc/book/src/old/AMQP-.NET-Messaging-Client.xml
index 1d4001942b..1d4001942b 100644
--- a/doc/book/src/AMQP-.NET-Messaging-Client.xml
+++ b/doc/book/src/old/AMQP-.NET-Messaging-Client.xml
diff --git a/doc/book/src/AMQP-C++-Messaging-Client.xml b/doc/book/src/old/AMQP-C++-Messaging-Client.xml
index 73a2cd6c0b..73a2cd6c0b 100644
--- a/doc/book/src/AMQP-C++-Messaging-Client.xml
+++ b/doc/book/src/old/AMQP-C++-Messaging-Client.xml
diff --git a/doc/book/src/AMQP-Java-JMS-Messaging-Client.xml b/doc/book/src/old/AMQP-Java-JMS-Messaging-Client.xml
index 8c14d67e14..8c14d67e14 100644
--- a/doc/book/src/AMQP-Java-JMS-Messaging-Client.xml
+++ b/doc/book/src/old/AMQP-Java-JMS-Messaging-Client.xml
diff --git a/doc/book/src/AMQP-Messaging-Broker-CPP.xml b/doc/book/src/old/AMQP-Messaging-Broker-CPP.xml
index 92b474b0c0..b4e0deb13d 100644
--- a/doc/book/src/AMQP-Messaging-Broker-CPP.xml
+++ b/doc/book/src/old/AMQP-Messaging-Broker-CPP.xml
@@ -49,7 +49,7 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="SSL.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="LVQ.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="queue-state-replication.xml"/>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Starting-a-cluster.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Active-Active-Cluster.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ACL.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="producer-flow-control.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Using-message-groups.xml"/>
diff --git a/doc/book/src/AMQP-Python-Messaging-Client.xml b/doc/book/src/old/AMQP-Python-Messaging-Client.xml
index 15baf214ec..15baf214ec 100644
--- a/doc/book/src/AMQP-Python-Messaging-Client.xml
+++ b/doc/book/src/old/AMQP-Python-Messaging-Client.xml
diff --git a/doc/book/src/AMQP-Ruby-Messaging-Client.xml b/doc/book/src/old/AMQP-Ruby-Messaging-Client.xml
index 45318c0beb..45318c0beb 100644
--- a/doc/book/src/AMQP-Ruby-Messaging-Client.xml
+++ b/doc/book/src/old/AMQP-Ruby-Messaging-Client.xml
diff --git a/doc/book/src/AMQP.xml b/doc/book/src/old/AMQP.xml
index 1a609649bb..1a609649bb 100644
--- a/doc/book/src/AMQP.xml
+++ b/doc/book/src/old/AMQP.xml
diff --git a/doc/book/src/Binding-URL-Format.xml b/doc/book/src/old/Binding-URL-Format.xml
index 3d938b740a..3d938b740a 100644
--- a/doc/book/src/Binding-URL-Format.xml
+++ b/doc/book/src/old/Binding-URL-Format.xml
diff --git a/doc/book/src/Book-Info.xml b/doc/book/src/old/Book-Info.xml
index 2e02fbe8ea..2e02fbe8ea 100644
--- a/doc/book/src/Book-Info.xml
+++ b/doc/book/src/old/Book-Info.xml
diff --git a/doc/book/src/Book.xml b/doc/book/src/old/Book.xml
index ee69532152..ee69532152 100644
--- a/doc/book/src/Book.xml
+++ b/doc/book/src/old/Book.xml
diff --git a/doc/book/src/Broker-CPP.xml b/doc/book/src/old/Broker-CPP.xml
index 99584be23d..99584be23d 100644
--- a/doc/book/src/Broker-CPP.xml
+++ b/doc/book/src/old/Broker-CPP.xml
diff --git a/doc/book/src/Broker-Java.xml b/doc/book/src/old/Broker-Java.xml
index f8ce89b185..f8ce89b185 100644
--- a/doc/book/src/Broker-Java.xml
+++ b/doc/book/src/old/Broker-Java.xml
diff --git a/doc/book/src/Clients.xml b/doc/book/src/old/Clients.xml
index 3dc2d38e86..3dc2d38e86 100644
--- a/doc/book/src/Clients.xml
+++ b/doc/book/src/old/Clients.xml
diff --git a/doc/book/src/Connection-URL-Format.xml b/doc/book/src/old/Connection-URL-Format.xml
index cb772487cd..cb772487cd 100644
--- a/doc/book/src/Connection-URL-Format.xml
+++ b/doc/book/src/old/Connection-URL-Format.xml
diff --git a/doc/book/src/Download.xml b/doc/book/src/old/Download.xml
index 7bc08143ac..7bc08143ac 100644
--- a/doc/book/src/Download.xml
+++ b/doc/book/src/old/Download.xml
diff --git a/doc/book/src/Excel-AddIn.xml b/doc/book/src/old/Excel-AddIn.xml
index e38f620bd8..e38f620bd8 100644
--- a/doc/book/src/Excel-AddIn.xml
+++ b/doc/book/src/old/Excel-AddIn.xml
diff --git a/doc/book/src/FAQ.xml b/doc/book/src/old/FAQ.xml
index 5647f18f69..5647f18f69 100644
--- a/doc/book/src/FAQ.xml
+++ b/doc/book/src/old/FAQ.xml
diff --git a/doc/book/src/Getting-Started.xml b/doc/book/src/old/Getting-Started.xml
index 216a52170e..216a52170e 100644
--- a/doc/book/src/Getting-Started.xml
+++ b/doc/book/src/old/Getting-Started.xml
diff --git a/doc/book/src/How-to-Use-JNDI.xml b/doc/book/src/old/How-to-Use-JNDI.xml
index 74506dde0f..0d6315c2a3 100644
--- a/doc/book/src/How-to-Use-JNDI.xml
+++ b/doc/book/src/old/How-to-Use-JNDI.xml
@@ -167,7 +167,7 @@ ctx.close();
<section>
<title>Using Qpid with Other JNDI Providers</title>
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Using Qpid with other JNDI Providers.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Using-Qpid-with-other-JNDI-Providers.xml"/>
</section>
<!--h2-->
</section>
diff --git a/doc/book/src/InfoPlugin.xml b/doc/book/src/old/InfoPlugin.xml
index aebcd08c02..aebcd08c02 100644
--- a/doc/book/src/InfoPlugin.xml
+++ b/doc/book/src/old/InfoPlugin.xml
diff --git a/doc/book/src/Introduction.xml b/doc/book/src/old/Introduction.xml
index 8f92c207cf..8f92c207cf 100644
--- a/doc/book/src/Introduction.xml
+++ b/doc/book/src/old/Introduction.xml
diff --git a/doc/book/src/Java-Broker-StatusLogMessages.xml b/doc/book/src/old/Java-Broker-StatusLogMessages.xml
index 98f876e532..98f876e532 100644
--- a/doc/book/src/Java-Broker-StatusLogMessages.xml
+++ b/doc/book/src/old/Java-Broker-StatusLogMessages.xml
diff --git a/doc/book/src/Java-JMS-Selector-Syntax.xml b/doc/book/src/old/Java-JMS-Selector-Syntax.xml
index 870e277b66..870e277b66 100644
--- a/doc/book/src/Java-JMS-Selector-Syntax.xml
+++ b/doc/book/src/old/Java-JMS-Selector-Syntax.xml
diff --git a/doc/book/src/Management-Design-notes.xml b/doc/book/src/old/Management-Design-notes.xml
index 76f0dac926..76f0dac926 100644
--- a/doc/book/src/Management-Design-notes.xml
+++ b/doc/book/src/old/Management-Design-notes.xml
diff --git a/doc/book/src/NET-User-Guide.xml b/doc/book/src/old/NET-User-Guide.xml
index 7bfa20b8c8..7bfa20b8c8 100644
--- a/doc/book/src/NET-User-Guide.xml
+++ b/doc/book/src/old/NET-User-Guide.xml
diff --git a/doc/book/src/PythonBrokerTest.xml b/doc/book/src/old/PythonBrokerTest.xml
index ae7edade40..ae7edade40 100644
--- a/doc/book/src/PythonBrokerTest.xml
+++ b/doc/book/src/old/PythonBrokerTest.xml
diff --git a/doc/book/src/QMan-Qpid-Management-bridge.xml b/doc/book/src/old/QMan-Qpid-Management-bridge.xml
index f2c366dcbb..f2c366dcbb 100644
--- a/doc/book/src/QMan-Qpid-Management-bridge.xml
+++ b/doc/book/src/old/QMan-Qpid-Management-bridge.xml
diff --git a/doc/book/src/Qpid-ACLs.xml b/doc/book/src/old/Qpid-ACLs.xml
index a2b64061c3..a2b64061c3 100644
--- a/doc/book/src/Qpid-ACLs.xml
+++ b/doc/book/src/old/Qpid-ACLs.xml
diff --git a/doc/book/src/Qpid-Book.xml b/doc/book/src/old/Qpid-Book.xml
index ee69532152..ee69532152 100644
--- a/doc/book/src/Qpid-Book.xml
+++ b/doc/book/src/old/Qpid-Book.xml
diff --git a/doc/book/src/Qpid-Compatibility-And-Interoperability-Book.xml b/doc/book/src/old/Qpid-Compatibility-And-Interoperability-Book.xml
index f382f390c7..f382f390c7 100644
--- a/doc/book/src/Qpid-Compatibility-And-Interoperability-Book.xml
+++ b/doc/book/src/old/Qpid-Compatibility-And-Interoperability-Book.xml
diff --git a/doc/book/src/SASL-Compatibility.xml b/doc/book/src/old/SASL-Compatibility.xml
index ad223792b5..ad223792b5 100644
--- a/doc/book/src/SASL-Compatibility.xml
+++ b/doc/book/src/old/SASL-Compatibility.xml
diff --git a/doc/book/src/SSL.xml b/doc/book/src/old/SSL.xml
index a9a5cb953a..a9a5cb953a 100644
--- a/doc/book/src/SSL.xml
+++ b/doc/book/src/old/SSL.xml
diff --git a/doc/book/src/Security-Plugins.xml b/doc/book/src/old/Security-Plugins.xml
index bf5cb726b3..bf5cb726b3 100644
--- a/doc/book/src/Security-Plugins.xml
+++ b/doc/book/src/old/Security-Plugins.xml
diff --git a/doc/book/src/System-Properties.xml b/doc/book/src/old/System-Properties.xml
index 40b823185f..40b823185f 100644
--- a/doc/book/src/System-Properties.xml
+++ b/doc/book/src/old/System-Properties.xml
diff --git a/doc/book/src/Using-Qpid-with-other-JNDI-Providers.xml b/doc/book/src/old/Using-Qpid-with-other-JNDI-Providers.xml
index 2bd7d761ef..2bd7d761ef 100644
--- a/doc/book/src/Using-Qpid-with-other-JNDI-Providers.xml
+++ b/doc/book/src/old/Using-Qpid-with-other-JNDI-Providers.xml
diff --git a/doc/book/src/WCF.xml b/doc/book/src/old/WCF.xml
index aaf54463db..aaf54463db 100644
--- a/doc/book/src/WCF.xml
+++ b/doc/book/src/old/WCF.xml
diff --git a/doc/book/src/old/schemas.xml b/doc/book/src/old/schemas.xml
new file mode 100644
index 0000000000..6102e65f07
--- /dev/null
+++ b/doc/book/src/old/schemas.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!--
+
+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.
+
+-->
+
+<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
+ <uri resource="foo.xml" typeId="DocBook"/>
+ <uri resource="foo.xml" typeId="DocBook"/>
+ <uri resource="Programming-In-Apache-Qpid.xml" typeId="DocBook"/>
+ <uri resource="queue-state-replication.xml" typeId="DocBook"/>
+ <uri resource="AMQP-Messaging-Broker-Java-Book.xml" typeId="DocBook"/>
+ <uri resource="AMQP-Messaging-Broker-CPP-Book.xml" typeId="DocBook"/>
+ <uri resource="High-Level-API.xml" typeId="DocBook"/>
+ <uri resource="High-Level-API.xml" typeId="DocBook"/>
+ <uri resource="Java-JMS-Selector-Syntax.xml" typeId="DocBook"/>
+ <uri resource="ACL.xml" typeId="DocBook"/>
+ <uri resource="Add-New-Users.xml" typeId="DocBook"/>
+ <uri resource="AMQP-C++-Messaging-Client.xml" typeId="DocBook"/>
+ <uri resource="AMQP-Compatibility.xml" typeId="DocBook"/>
+ <uri resource="AMQP-Java-JMS-Messaging-Client.xml" typeId="DocBook"/>
+ <uri resource="AMQP-Messaging-Broker-CPP.xml" typeId="DocBook"/>
+ <uri resource="AMQP-Messaging-Broker-Java.xml" typeId="DocBook"/>
+ <uri resource="AMQP-.NET-Messaging-Client.xml" typeId="DocBook"/>
+ <uri resource="AMQP-Python-Messaging-Client.xml" typeId="DocBook"/>
+ <uri resource="AMQP-Ruby-Messaging-Client.xml" typeId="DocBook"/>
+ <uri resource="AMQP.xml" typeId="DocBook"/>
+ <uri resource="Binding-URL-Format.xml" typeId="DocBook"/>
+ <uri resource="Book-Info.xml" typeId="DocBook"/>
+ <uri resource="Book.xml" typeId="DocBook"/>
+ <uri resource="Broker-CPP.xml" typeId="DocBook"/>
+ <uri resource="Broker-Java.xml" typeId="DocBook"/>
+ <uri resource="Cheat-Sheet-for-configuring-Exchange-Options.xml" typeId="DocBook"/>
+ <uri resource="Cheat-Sheet-for-configuring-Queue-Options.xml" typeId="DocBook"/>
+ <uri resource="Clients.xml" typeId="DocBook"/>
+ <uri resource="Configure-ACLs.xml" typeId="DocBook"/>
+ <uri resource="Configure-Java-Qpid-to-use-a-SSL-connection.xml" typeId="DocBook"/>
+ <uri resource="Configure-Log4j-CompositeRolling-Appender.xml" typeId="DocBook"/>
+ <uri resource="Configure-the-Broker-via-config.xml.xml" typeId="DocBook"/>
+ <uri resource="Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml" typeId="DocBook"/>
+ <uri resource="Configuring-Management-Users.xml" typeId="DocBook"/>
+ <uri resource="Configuring-Qpid-JMX-Management-Console.xml" typeId="DocBook"/>
+ <uri resource="Connection-URL-Format.xml" typeId="DocBook"/>
+ <uri resource="Debug-using-log4j.xml" typeId="DocBook"/>
+ <uri resource="Download.xml" typeId="DocBook"/>
+ <uri resource="Excel-AddIn.xml" typeId="DocBook"/>
+ <uri resource="FAQ.xml" typeId="DocBook"/>
+ <uri resource="foo.xml" typeId="DocBook"/>
+ <uri resource="f.xml" typeId="DocBook"/>
+ <uri resource="Getting-Started.xml" typeId="DocBook"/>
+ <uri resource="How-to-Tune-M3-Java-Broker-Performance.xml" typeId="DocBook"/>
+ <uri resource="How-to-Use-JNDI.xml" typeId="DocBook"/>
+ <uri resource="Introduction.xml" typeId="DocBook"/>
+ <uri resource="Java-Broker-Feature-Guide.xml" typeId="DocBook"/>
+ <uri resource="Java-Environment-Variables.xml" typeId="DocBook"/>
+ <uri resource="LVQ.xml" typeId="DocBook"/>
+ <uri resource="Management-Console-Security.xml" typeId="DocBook"/>
+ <uri resource="Management-Design-notes.xml" typeId="DocBook"/>
+ <uri resource="Managing-CPP-Broker.xml" typeId="DocBook"/>
+ <uri resource="MessageStore-Tool.xml" typeId="DocBook"/>
+ <uri resource="NET-User-Guide.xml" typeId="DocBook"/>
+ <uri resource="PythonBrokerTest.xml" typeId="DocBook"/>
+ <uri resource="QMan-Qpid-Management-bridge.xml" typeId="DocBook"/>
+ <uri resource="QMF-Python-Console-Tutorial.xml" typeId="DocBook"/>
+ <uri resource="Qpid-ACLs.xml" typeId="DocBook"/>
+ <uri resource="Qpid-Interoperability-Documentation.xml" typeId="DocBook"/>
+ <uri resource="Qpid-Java-Broker-Management-CLI.xml" typeId="DocBook"/>
+ <uri resource="Qpid-Java-Build-How-To.xml" typeId="DocBook"/>
+ <uri resource="Qpid-Java-FAQ.xml" typeId="DocBook"/>
+ <uri resource="Qpid-JMX-Management-Console-FAQ.xml" typeId="DocBook"/>
+ <uri resource="Qpid-JMX-Management-Console-User-Guide.xml" typeId="DocBook"/>
+ <uri resource="Qpid-JMX-Management-Console.xml" typeId="DocBook"/>
+ <uri resource="Qpid-Management-Features.xml" typeId="DocBook"/>
+ <uri resource="Qpid-Management-Framework.xml" typeId="DocBook"/>
+ <uri resource="Qpid-Troubleshooting-Guide.xml" typeId="DocBook"/>
+ <uri resource="queue-state-replication.xml" typeId="DocBook"/>
+ <uri resource="Running-CPP-Broker.xml" typeId="DocBook"/>
+ <uri resource="SASL-Compatibility.xml" typeId="DocBook"/>
+ <uri resource="SSL.xml" typeId="DocBook"/>
+ <uri resource="Active-Active-Cluster.xml" typeId="DocBook"/>
+ <uri resource="System-Properties.xml" typeId="DocBook"/>
+ <uri resource="Use-Priority-Queues.xml" typeId="DocBook"/>
+ <uri resource="Using-Broker-Federation.xml" typeId="DocBook"/>
+ <uri resource="Using-Qpid-with-other-JNDI-Providers.xml" typeId="DocBook"/>
+ <uri resource="WCF.xml" typeId="DocBook"/>
+</locatingRules>
diff --git a/doc/book/src/programming/Makefile b/doc/book/src/programming/Makefile
new file mode 100644
index 0000000000..0266a0f54d
--- /dev/null
+++ b/doc/book/src/programming/Makefile
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+include ../Makefile.inc
diff --git a/doc/book/src/Message-Groups-Guide.xml b/doc/book/src/programming/Message-Groups-Guide.xml
index 3e5c549ff9..3e5c549ff9 100644
--- a/doc/book/src/Message-Groups-Guide.xml
+++ b/doc/book/src/programming/Message-Groups-Guide.xml
diff --git a/doc/book/src/Programming-In-Apache-Qpid.xml b/doc/book/src/programming/Programming-In-Apache-Qpid-Book.xml
index adcac6aab3..3052e2acc1 100644
--- a/doc/book/src/Programming-In-Apache-Qpid.xml
+++ b/doc/book/src/programming/Programming-In-Apache-Qpid-Book.xml
@@ -3,24 +3,24 @@
<!--
- 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.
+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.
- -->
+-->
<book id="client-api-tutorial">
<title>Programming in Apache Qpid</title>
@@ -30,8 +30,8 @@
<title>Introduction</title>
<para>Apache Qpid is a reliable, asynchronous messaging system that
- supports the AMQP messaging protocol in several common programming
- languages. Qpid is supported on most common platforms.
+ supports the AMQP messaging protocol in several common programming
+ languages. Qpid is supported on most common platforms.
</para>
<itemizedlist>
@@ -67,7 +67,7 @@
<title>Using the Qpid Messaging API</title>
<para>The Qpid Messaging API is quite simple, consisting of only a
- handful of core classes.
+ handful of core classes.
</para>
<itemizedlist>
@@ -126,29 +126,29 @@
<title>A Simple Messaging Program in C++</title>
<para>The following C++ program shows how to create a connection,
- create a session, send messages using a sender, and receive
- messages using a receiver.</para>
+ create a session, send messages using a sender, and receive
+ messages using a receiver.</para>
- <example>
- <title>"Hello world!" in C++</title>
- <programlisting lang="c++"><![CDATA[
-#include <qpid/messaging/Connection.h>
-#include <qpid/messaging/Message.h>
-#include <qpid/messaging/Receiver.h>
-#include <qpid/messaging/Sender.h>
-#include <qpid/messaging/Session.h>
+ <example>
+ <title>"Hello world!" in C++</title>
+ <programlisting lang="c++"><![CDATA[
+ #include <qpid/messaging/Connection.h>
+ #include <qpid/messaging/Message.h>
+ #include <qpid/messaging/Receiver.h>
+ #include <qpid/messaging/Sender.h>
+ #include <qpid/messaging/Session.h>
-#include <iostream>]]>
+ #include <iostream>]]>
-using namespace qpid::messaging;
+ using namespace qpid::messaging;
-int main(int argc, char** argv) {
- std::string broker = argc > 1 ? argv[1] : "localhost:5672";
- std::string address = argc > 2 ? argv[2] : "amq.topic";
- std::string connectionOptions = argc > 3 ? argv[3] : "";
+ int main(int argc, char** argv) {
+ std::string broker = argc > 1 ? argv[1] : "localhost:5672";
+ std::string address = argc > 2 ? argv[2] : "amq.topic";
+ std::string connectionOptions = argc > 3 ? argv[3] : "";
- Connection connection(broker, connectionOptions);
- try {
+ Connection connection(broker, connectionOptions);
+ try {
connection.open(); <co id="hello-cpp-open" linkends="callout-cpp-open"/>
Session session = connection.createSession(); <co id="hello-cpp-session" linkends="callout-cpp-session"/>
@@ -163,38 +163,38 @@ int main(int argc, char** argv) {
connection.close(); <co id="hello-cpp-close" linkends="callout-cpp-close"/>
return 0;
- } catch(const std::exception&amp; error) {
+ } catch(const std::exception&amp; error) {
<![CDATA[std::cerr << error.what() << std::endl;]]>
connection.close();
return 1;
- }
-}</programlisting>
-
- <calloutlist>
- <callout id="callout-cpp-open" arearefs="hello-cpp-open">
- <para>Establishes the connection with the messaging broker.</para>
- </callout>
- <callout id="callout-cpp-session" arearefs="hello-cpp-session">
- <para>Creates a session object on which messages will be sent and received.</para>
- </callout>
- <callout id="callout-cpp-receiver" arearefs="hello-cpp-receiver">
- <para>Creates a receiver that receives messages from the given address.</para>
- </callout>
- <callout id="callout-cpp-sender" arearefs="hello-cpp-sender">
- <para>Creates a sender that sends to the given address.</para>
- </callout>
- <callout id="callout-cpp-fetch" arearefs="hello-cpp-fetch">
- <para>Receives the next message. The duration is optional, if omitted, will wait indefinitely for the next message.</para>
- </callout>
- <callout id="callout-cpp-acknowledge" arearefs="hello-cpp-acknowledge">
- <para>Acknowledges receipt of all fetched messages on the
- session. This informs the broker that the messages were
- transferred and processed by the client successfully.</para>
- </callout>
- <callout id="callout-cpp-close" arearefs="hello-cpp-close">
- <para>Closes the connection, all sessions managed by the connection, and all senders and receivers managed by each session.</para>
- </callout>
- </calloutlist>
+ }
+ }</programlisting>
+
+ <calloutlist>
+ <callout id="callout-cpp-open" arearefs="hello-cpp-open">
+ <para>Establishes the connection with the messaging broker.</para>
+ </callout>
+ <callout id="callout-cpp-session" arearefs="hello-cpp-session">
+ <para>Creates a session object on which messages will be sent and received.</para>
+ </callout>
+ <callout id="callout-cpp-receiver" arearefs="hello-cpp-receiver">
+ <para>Creates a receiver that receives messages from the given address.</para>
+ </callout>
+ <callout id="callout-cpp-sender" arearefs="hello-cpp-sender">
+ <para>Creates a sender that sends to the given address.</para>
+ </callout>
+ <callout id="callout-cpp-fetch" arearefs="hello-cpp-fetch">
+ <para>Receives the next message. The duration is optional, if omitted, will wait indefinitely for the next message.</para>
+ </callout>
+ <callout id="callout-cpp-acknowledge" arearefs="hello-cpp-acknowledge">
+ <para>Acknowledges receipt of all fetched messages on the
+ session. This informs the broker that the messages were
+ transferred and processed by the client successfully.</para>
+ </callout>
+ <callout id="callout-cpp-close" arearefs="hello-cpp-close">
+ <para>Closes the connection, all sessions managed by the connection, and all senders and receivers managed by each session.</para>
+ </callout>
+ </calloutlist>
</example>
@@ -204,66 +204,66 @@ int main(int argc, char** argv) {
<title>A Simple Messaging Program in Python</title>
<para>The following Python program shows how to create a
- connection, create a session, send messages using a sender, and
- receive messages using a receiver.</para>
+ connection, create a session, send messages using a sender, and
+ receive messages using a receiver.</para>
- <example>
- <title>"Hello world!" in Python</title>
- <programlisting lang="python"><![CDATA[
-import sys
-from qpid.messaging import *
-
-broker = "localhost:5672" if len(sys.argv)<2 else sys.argv[1]
-address = "amq.topic" if len(sys.argv)<3 else sys.argv[2]]]>
-
-connection = Connection(broker)
-
-try:
- connection.open() <co id="hello-python-open" linkends="callout-python-open"/>
- session = connection.session() <co id="hello-python-session" linkends="callout-python-session"/>
-
- sender = session.sender(address) <co id="hello-python-sender" linkends="callout-python-sender"/>
- receiver = session.receiver(address) <co id="hello-python-receiver" linkends="callout-python-receiver"/>
-
- sender.send(Message("Hello world!"));
-
- message = receiver.fetch(timeout=1) <co id="hello-python-fetch" linkends="callout-python-fetch"/>
- print message.content
- session.acknowledge() <co id="hello-python-acknowledge" linkends="callout-python-acknowledge"/>
-
-except MessagingError,m:
- print m
-finally:
- connection.close() <co id="hello-python-close" linkends="callout-python-close"/>
-</programlisting>
-
- <calloutlist>
- <callout id="callout-python-open" arearefs="hello-python-open">
- <para>Establishes the connection with the messaging broker.</para>
- </callout>
- <callout id="callout-python-session" arearefs="hello-python-session">
- <para>Creates a session object on which messages will be sent and received.</para>
- </callout>
- <callout id="callout-python-receiver" arearefs="hello-python-receiver">
- <para>Creates a receiver that receives messages from the given address.</para>
- </callout>
- <callout id="callout-python-sender" arearefs="hello-python-sender">
- <para>Creates a sender that sends to the given address.</para>
- </callout>
- <callout id="callout-python-fetch" arearefs="hello-python-fetch">
- <para>Receives the next message. The duration is optional, if omitted, will wait indefinitely for the next message.</para>
- </callout>
- <callout id="callout-python-acknowledge" arearefs="hello-python-acknowledge">
- <para>Acknowledges receipt of all fetched messages on
- the session. This informs the broker that the messages were
- transfered and processed by the client successfully.</para>
- </callout>
- <callout id="callout-python-close" arearefs="hello-python-close">
- <para>Closes the connection, all sessions managed by the connection, and all senders and receivers managed by each session.</para>
- </callout>
- </calloutlist>
+ <example>
+ <title>"Hello world!" in Python</title>
+ <programlisting lang="python"><![CDATA[
+ import sys
+ from qpid.messaging import *
- </example>
+ broker = "localhost:5672" if len(sys.argv)<2 else sys.argv[1]
+ address = "amq.topic" if len(sys.argv)<3 else sys.argv[2]]]>
+
+ connection = Connection(broker)
+
+ try:
+ connection.open() <co id="hello-python-open" linkends="callout-python-open"/>
+ session = connection.session() <co id="hello-python-session" linkends="callout-python-session"/>
+
+ sender = session.sender(address) <co id="hello-python-sender" linkends="callout-python-sender"/>
+ receiver = session.receiver(address) <co id="hello-python-receiver" linkends="callout-python-receiver"/>
+
+ sender.send(Message("Hello world!"));
+
+ message = receiver.fetch(timeout=1) <co id="hello-python-fetch" linkends="callout-python-fetch"/>
+ print message.content
+ session.acknowledge() <co id="hello-python-acknowledge" linkends="callout-python-acknowledge"/>
+
+ except MessagingError,m:
+ print m
+ finally:
+ connection.close() <co id="hello-python-close" linkends="callout-python-close"/>
+ </programlisting>
+
+ <calloutlist>
+ <callout id="callout-python-open" arearefs="hello-python-open">
+ <para>Establishes the connection with the messaging broker.</para>
+ </callout>
+ <callout id="callout-python-session" arearefs="hello-python-session">
+ <para>Creates a session object on which messages will be sent and received.</para>
+ </callout>
+ <callout id="callout-python-receiver" arearefs="hello-python-receiver">
+ <para>Creates a receiver that receives messages from the given address.</para>
+ </callout>
+ <callout id="callout-python-sender" arearefs="hello-python-sender">
+ <para>Creates a sender that sends to the given address.</para>
+ </callout>
+ <callout id="callout-python-fetch" arearefs="hello-python-fetch">
+ <para>Receives the next message. The duration is optional, if omitted, will wait indefinitely for the next message.</para>
+ </callout>
+ <callout id="callout-python-acknowledge" arearefs="hello-python-acknowledge">
+ <para>Acknowledges receipt of all fetched messages on
+ the session. This informs the broker that the messages were
+ transfered and processed by the client successfully.</para>
+ </callout>
+ <callout id="callout-python-close" arearefs="hello-python-close">
+ <para>Closes the connection, all sessions managed by the connection, and all senders and receivers managed by each session.</para>
+ </callout>
+ </calloutlist>
+
+ </example>
</section>
@@ -274,86 +274,86 @@ finally:
<title>A Simple Messaging Program in .NET C#</title>
<para>The following .NET C#
- <footnote>
- <para>
- The .NET binding for the Qpid C++ Messaging API
- applies to all .NET Framework managed code languages. C# was chosen
- for illustration purposes only.
- </para>
- </footnote>
- program shows how to create a connection,
- create a session, send messages using a sender, and receive
- messages using a receiver.
+ <footnote>
+ <para>
+ The .NET binding for the Qpid C++ Messaging API
+ applies to all .NET Framework managed code languages. C# was chosen
+ for illustration purposes only.
+ </para>
+ </footnote>
+ program shows how to create a connection,
+ create a session, send messages using a sender, and receive
+ messages using a receiver.
</para>
- <example>
- <title>"Hello world!" in .NET C#</title>
- <programlisting lang="c++">
-using System;
-using Org.Apache.Qpid.Messaging; <co id="hello-csharp-using" linkends="callout-csharp-using"/>
-
-namespace Org.Apache.Qpid.Messaging {
- class Program {
- static void Main(string[] args) {
- String broker = args.Length > 0 ? args[0] : "localhost:5672";
- String address = args.Length > 1 ? args[1] : "amq.topic";
-
- Connection connection = null;
- try {
- connection = new Connection(broker);
- connection.Open(); <co id="hello-csharp-open" linkends="callout-csharp-open"/>
- Session session = connection.CreateSession(); <co id="hello-csharp-session" linkends="callout-csharp-session"/>
-
- Receiver receiver = session.CreateReceiver(address); <co id="hello-csharp-receiver" linkends="callout-csharp-receiver"/>
- Sender sender = session.CreateSender(address); <co id="hello-csharp-sender" linkends="callout-csharp-sender"/>
-
- sender.Send(new Message("Hello world!"));
-
- Message message = new Message();
- message = receiver.Fetch(DurationConstants.SECOND * 1); <co id="hello-csharp-fetch" linkends="callout-csharp-fetch"/>
- Console.WriteLine("{0}", message.GetContent());
- session.Acknowledge(); <co id="hello-csharp-acknowledge" linkends="callout-csharp-acknowledge"/>
-
- connection.Close(); <co id="hello-csharp-close" linkends="callout-csharp-close"/>
- } catch (Exception e) {
- Console.WriteLine("Exception {0}.", e);
- if (null != connection)
- connection.Close();
- }
- }
- }
-}
+ <example>
+ <title>"Hello world!" in .NET C#</title>
+ <programlisting lang="c++">
+ using System;
+ using Org.Apache.Qpid.Messaging; <co id="hello-csharp-using" linkends="callout-csharp-using"/>
+
+ namespace Org.Apache.Qpid.Messaging {
+ class Program {
+ static void Main(string[] args) {
+ String broker = args.Length > 0 ? args[0] : "localhost:5672";
+ String address = args.Length > 1 ? args[1] : "amq.topic";
+
+ Connection connection = null;
+ try {
+ connection = new Connection(broker);
+ connection.Open(); <co id="hello-csharp-open" linkends="callout-csharp-open"/>
+ Session session = connection.CreateSession(); <co id="hello-csharp-session" linkends="callout-csharp-session"/>
+
+ Receiver receiver = session.CreateReceiver(address); <co id="hello-csharp-receiver" linkends="callout-csharp-receiver"/>
+ Sender sender = session.CreateSender(address); <co id="hello-csharp-sender" linkends="callout-csharp-sender"/>
+
+ sender.Send(new Message("Hello world!"));
+
+ Message message = new Message();
+ message = receiver.Fetch(DurationConstants.SECOND * 1); <co id="hello-csharp-fetch" linkends="callout-csharp-fetch"/>
+ Console.WriteLine("{0}", message.GetContent());
+ session.Acknowledge(); <co id="hello-csharp-acknowledge" linkends="callout-csharp-acknowledge"/>
+
+ connection.Close(); <co id="hello-csharp-close" linkends="callout-csharp-close"/>
+ } catch (Exception e) {
+ Console.WriteLine("Exception {0}.", e);
+ if (null != connection)
+ connection.Close();
+ }
+ }
+ }
+ }
-</programlisting>
+ </programlisting>
- <calloutlist>
- <callout id="callout-csharp-using" arearefs="hello-csharp-using">
- <para> Permits use of Org.Apache.Qpid.Messaging types and methods without explicit namespace qualification. Any .NET project must have a project reference to the assembly file <literal>Org.Apache.Qpid.Messaging.dll</literal> in order to obtain the definitions of the .NET Binding for Qpid Messaging namespace.</para>
- </callout>
- <callout id="callout-csharp-open" arearefs="hello-csharp-open">
- <para>Establishes the connection with the messaging broker.</para>
- </callout>
- <callout id="callout-csharp-session" arearefs="hello-csharp-session">
- <para>Creates a session object on which messages will be sent and received.</para>
- </callout>
- <callout id="callout-csharp-receiver" arearefs="hello-csharp-receiver">
- <para>Creates a receiver that receives messages from the given address.</para>
- </callout>
- <callout id="callout-csharp-sender" arearefs="hello-csharp-sender">
- <para>Creates a sender that sends to the given address.</para>
- </callout>
- <callout id="callout-csharp-fetch" arearefs="hello-csharp-fetch">
- <para>Receives the next message. The duration is optional, if omitted, will wait indefinitely for the next message.</para>
- </callout>
- <callout id="callout-csharp-acknowledge" arearefs="hello-csharp-acknowledge">
- <para>Acknowledges receipt of all fetched messages on the
- session. This informs the broker that the messages were
- transfered and processed by the client successfully.</para>
- </callout>
- <callout id="callout-csharp-close" arearefs="hello-csharp-close">
- <para>Closes the connection, all sessions managed by the connection, and all senders and receivers managed by each session.</para>
- </callout>
- </calloutlist>
+ <calloutlist>
+ <callout id="callout-csharp-using" arearefs="hello-csharp-using">
+ <para> Permits use of Org.Apache.Qpid.Messaging types and methods without explicit namespace qualification. Any .NET project must have a project reference to the assembly file <literal>Org.Apache.Qpid.Messaging.dll</literal> in order to obtain the definitions of the .NET Binding for Qpid Messaging namespace.</para>
+ </callout>
+ <callout id="callout-csharp-open" arearefs="hello-csharp-open">
+ <para>Establishes the connection with the messaging broker.</para>
+ </callout>
+ <callout id="callout-csharp-session" arearefs="hello-csharp-session">
+ <para>Creates a session object on which messages will be sent and received.</para>
+ </callout>
+ <callout id="callout-csharp-receiver" arearefs="hello-csharp-receiver">
+ <para>Creates a receiver that receives messages from the given address.</para>
+ </callout>
+ <callout id="callout-csharp-sender" arearefs="hello-csharp-sender">
+ <para>Creates a sender that sends to the given address.</para>
+ </callout>
+ <callout id="callout-csharp-fetch" arearefs="hello-csharp-fetch">
+ <para>Receives the next message. The duration is optional, if omitted, will wait indefinitely for the next message.</para>
+ </callout>
+ <callout id="callout-csharp-acknowledge" arearefs="hello-csharp-acknowledge">
+ <para>Acknowledges receipt of all fetched messages on the
+ session. This informs the broker that the messages were
+ transfered and processed by the client successfully.</para>
+ </callout>
+ <callout id="callout-csharp-close" arearefs="hello-csharp-close">
+ <para>Closes the connection, all sessions managed by the connection, and all senders and receivers managed by each session.</para>
+ </callout>
+ </calloutlist>
</example>
@@ -386,43 +386,43 @@ namespace Org.Apache.Qpid.Messaging {
Qpid Messaging API recognises two kinds of nodes,
<firstterm>queues</firstterm> and <firstterm>topics</firstterm>
- <footnote><para>The terms <emphasis>queue</emphasis> and
- <emphasis>topic</emphasis> here were chosen to align with
- their meaning in JMS. These two addressing 'patterns',
- queue and topic, are sometimes refered as point-to-point
- and publish-subscribe. AMQP 0-10 has an exchange type
- called a <emphasis>topic exchange</emphasis>. When the term
- <emphasis>topic</emphasis> occurs alone, it refers to a
- Messaging API topic, not the topic
- exchange.</para></footnote>.
+ <footnote><para>The terms <emphasis>queue</emphasis> and
+ <emphasis>topic</emphasis> here were chosen to align with
+ their meaning in JMS. These two addressing 'patterns',
+ queue and topic, are sometimes refered as point-to-point
+ and publish-subscribe. AMQP 0-10 has an exchange type
+ called a <emphasis>topic exchange</emphasis>. When the term
+ <emphasis>topic</emphasis> occurs alone, it refers to a
+ Messaging API topic, not the topic
+ exchange.</para></footnote>.
A queue stores each message until it has been received and
acknowledged, and only one receiver can receive a given message
- <footnote><para>There are exceptions to this rule; for instance,
- a receiver can use <literal>browse</literal> mode, which leaves
- messages on the queue for other receivers to
- read.</para></footnote>.
+ <footnote><para>There are exceptions to this rule; for instance,
+ a receiver can use <literal>browse</literal> mode, which leaves
+ messages on the queue for other receivers to
+ read.</para></footnote>.
A topic immediately delivers a message to all eligible
receivers; if there are no eligible receivers, it discards the
message. In the AMQP 0-10 implementation of the API,
- <footnote><para>The AMQP 0-10 implementation is the only one
- that currently exists.</para></footnote>
+ <footnote><para>The AMQP 0-10 implementation is the only one
+ that currently exists.</para></footnote>
queues map to AMQP queues, and topics map to AMQP exchanges.
- <footnote><para>In AMQP 0-10, messages are sent to
- exchanges, and read from queues. The Messaging API also
- allows a sender to send messages to a queue; internally,
- Qpid implements this by sending the message to the default
- exchange, with the name of the queue as the routing key. The
- Messaging API also allows a receiver to receive messages
- from a topic; internally, Qpid implements this by setting up
- a private subscription queue for the receiver and binding
- the subscription queue to the exchange that corresponds to
- the topic.</para></footnote>
+ <footnote><para>In AMQP 0-10, messages are sent to
+ exchanges, and read from queues. The Messaging API also
+ allows a sender to send messages to a queue; internally,
+ Qpid implements this by sending the message to the default
+ exchange, with the name of the queue as the routing key. The
+ Messaging API also allows a receiver to receive messages
+ from a topic; internally, Qpid implements this by setting up
+ a private subscription queue for the receiver and binding
+ the subscription queue to the exchange that corresponds to
+ the topic.</para></footnote>
</para>
<para>In the rest of this tutorial, we present many examples
@@ -430,7 +430,7 @@ namespace Org.Apache.Qpid.Messaging {
parameter. <command>spout</command> sends messages to the
target address, <command>drain</command> receives messages from
the source address. The source code is available in C++, Python, and
- .NET C# and can be found in the examples directory for each
+ .NET C# and can be found in the examples directory for each
language. These programs can use any address string as a source
or a destination, and have many command line options to
configure behavior&mdash;use the <command>-h</command> option
@@ -454,14 +454,14 @@ namespace Org.Apache.Qpid.Messaging {
<title>Queues</title>
<para>Create a queue with <command>qpid-config</command>, send a message using
- <command>spout</command>, and read it using <command>drain</command>:</para>
+ <command>spout</command>, and read it using <command>drain</command>:</para>
<screen>
-$ qpid-config add queue hello-world
-$ ./spout hello-world
-$ ./drain hello-world
+ $ qpid-config add queue hello-world
+ $ ./spout hello-world
+ $ ./drain hello-world
-Message(properties={spout-id:c877e622-d57b-4df2-bf3e-6014c68da0ea:0}, content='')
+ Message(properties={spout-id:c877e622-d57b-4df2-bf3e-6014c68da0ea:0}, content='')
</screen>
<para>The queue stored the message sent by <command>spout</command> and delivered
@@ -472,8 +472,8 @@ Message(properties={spout-id:c877e622-d57b-4df2-bf3e-6014c68da0ea:0}, content=''
<command>drain</command> one more time, no messages will be retrieved.</para>
<screen>
-$ ./drain hello-world
-$
+ $ ./drain hello-world
+ $
</screen>
</example>
@@ -488,16 +488,16 @@ $
and create an exchange with the same name:</para>
<screen>
-$ qpid-config del queue hello-world
-$ qpid-config add exchange topic hello-world
+ $ qpid-config del queue hello-world
+ $ qpid-config add exchange topic hello-world
</screen>
<para>Now run <command>drain</command> and <command>spout</command> the same way we did in the previous example:</para>
<screen>
-$ ./spout hello-world
-$ ./drain hello-world
-$
+ $ ./spout hello-world
+ $ ./drain hello-world
+ $
</screen>
<para>Topics deliver messages immediately to any interested
@@ -515,27 +515,27 @@ $
<para><emphasis>First Window:</emphasis></para>
<screen>
-$ ./drain -t 30 hello-word
+ $ ./drain -t 30 hello-word
</screen>
<para><emphasis>Second Window:</emphasis></para>
<screen>
-$ ./spout hello-word
+ $ ./spout hello-word
</screen>
<para>Once <command>spout</command> has sent a message, return
- to the first window to see the output from
- <command>drain</command>:</para>
+ to the first window to see the output from
+ <command>drain</command>:</para>
<screen>
-Message(properties={spout-id:7da2d27d-93e6-4803-8a61-536d87b8d93f:0}, content='')
+ Message(properties={spout-id:7da2d27d-93e6-4803-8a61-536d87b8d93f:0}, content='')
</screen>
<para>You can run <command>drain</command> in several separate
- windows; each creates a subscription for the exchange, and
- each receives all messages sent to the exchange.</para>
+ windows; each creates a subscription for the exchange, and
+ each receives all messages sent to the exchange.</para>
</example>
@@ -551,9 +551,9 @@ Message(properties={spout-id:7da2d27d-93e6-4803-8a61-536d87b8d93f:0}, content=''
<para>The syntax for an address string is:</para>
<programlisting><![CDATA[
-address_string ::= <address> [ / <subject> ] [ ; <options> ]
-options ::= { <key> : <value>, ... }
-]]></programlisting>
+ address_string ::= <address> [ / <subject> ] [ ; <options> ]
+ options ::= { <key> : <value>, ... }
+ ]]></programlisting>
<para>Addresses, subjects, and keys are strings. Values can
be numbers, strings (with optional single or double quotes),
@@ -582,62 +582,62 @@ options ::= { <key> : <value>, ... }
If a receiver's address contains a subject, it is used to
select only messages that match the subject&mdash;the matching
algorithm depends on the message source.
- </para>
-
- <para>
- In AMQP 0-10, each exchange type has its own matching
- algorithm. This is discussed in
- <xref linkend="section-amqp0-10-mapping"/>.
- </para>
+ </para>
- <note>
<para>
- Currently, a receiver bound to a queue ignores subjects,
- receiving messages from the queue without filtering. Support
- for subject filtering on queues will be implemented soon.
+ In AMQP 0-10, each exchange type has its own matching
+ algorithm. This is discussed in
+ <xref linkend="section-amqp0-10-mapping"/>.
</para>
- </note>
+ <note>
+ <para>
+ Currently, a receiver bound to a queue ignores subjects,
+ receiving messages from the queue without filtering. Support
+ for subject filtering on queues will be implemented soon.
+ </para>
+ </note>
- <example>
- <title>Using subjects</title>
- <para>In this example we show how subjects affect message
- flow.</para>
+ <example>
+ <title>Using subjects</title>
- <para>First, let's use <command>qpid-config</command> to create a topic exchange.</para>
+ <para>In this example we show how subjects affect message
+ flow.</para>
- <screen>
-$ qpid-config add exchange topic news-service
- </screen>
+ <para>First, let's use <command>qpid-config</command> to create a topic exchange.</para>
- <para>Now we use drain to receive messages from <literal>news-service</literal> that match the subject <literal>sports</literal>.</para>
- <para><emphasis>First Window:</emphasis></para>
- <screen>
-$ ./drain -t 30 news-service/sports
- </screen>
+ <screen>
+ $ qpid-config add exchange topic news-service
+ </screen>
- <para>In a second window, let's send messages to <literal>news-service</literal> using two different subjects:</para>
+ <para>Now we use drain to receive messages from <literal>news-service</literal> that match the subject <literal>sports</literal>.</para>
+ <para><emphasis>First Window:</emphasis></para>
+ <screen>
+ $ ./drain -t 30 news-service/sports
+ </screen>
- <para><emphasis>Second Window:</emphasis></para>
- <screen>
-$ ./spout news-service/sports
-$ ./spout news-service/news
- </screen>
+ <para>In a second window, let's send messages to <literal>news-service</literal> using two different subjects:</para>
- <para>Now look at the first window, the message with the
- subject <literal>sports</literal> has been received, but not
- the message with the subject <literal>news</literal>:</para>
+ <para><emphasis>Second Window:</emphasis></para>
+ <screen>
+ $ ./spout news-service/sports
+ $ ./spout news-service/news
+ </screen>
- <screen>
-Message(properties={qpid.subject:sports, spout-id:9441674e-a157-4780-a78e-f7ccea998291:0}, content='')
- </screen>
+ <para>Now look at the first window, the message with the
+ subject <literal>sports</literal> has been received, but not
+ the message with the subject <literal>news</literal>:</para>
+
+ <screen>
+ Message(properties={qpid.subject:sports, spout-id:9441674e-a157-4780-a78e-f7ccea998291:0}, content='')
+ </screen>
- <para>If you run <command>drain</command> in multiple
+ <para>If you run <command>drain</command> in multiple
windows using the same subject, all instances of
<command>drain</command> receive the messages for that
subject.</para>
- </example>
+ </example>
<para>The AMQP exchange type we are using here,
@@ -663,1207 +663,1207 @@ Message(properties={qpid.subject:sports, spout-id:9441674e-a157-4780-a78e-f7ccea
like <literal>europe.news</literal> or
<literal>europe.pseudo.news</literal>.</para>
- <example>
- <title>Subjects with multi-word keys</title>
+ <example>
+ <title>Subjects with multi-word keys</title>
- <para>This example uses drain and spout to demonstrate the
- use of subjects with two-word keys.</para>
+ <para>This example uses drain and spout to demonstrate the
+ use of subjects with two-word keys.</para>
- <para>Let's use <command>drain</command> with the subject
- <literal>*.news</literal> to listen for messages in which
- the second word of the key is
- <literal>news</literal>.</para>
+ <para>Let's use <command>drain</command> with the subject
+ <literal>*.news</literal> to listen for messages in which
+ the second word of the key is
+ <literal>news</literal>.</para>
+
+ <para><emphasis>First Window:</emphasis></para>
+
+ <screen>
+ $ ./drain -t 30 news-service/*.news
+ </screen>
+
+ <para>Now let's send messages using several different
+ two-word keys:</para>
+
+ <para><emphasis>Second Window:</emphasis></para>
+
+ <screen>
+ $ ./spout news-service/usa.news
+ $ ./spout news-service/usa.sports
+ $ ./spout news-service/europe.sports
+ $ ./spout news-service/europe.news
+ </screen>
+
+ <para>In the first window, the messages with
+ <literal>news</literal> in the second word of the key have
+ been received:</para>
+
+ <screen>
+ Message(properties={qpid.subject:usa.news, spout-id:73fc8058-5af6-407c-9166-b49a9076097a:0}, content='')
+ Message(properties={qpid.subject:europe.news, spout-id:f72815aa-7be4-4944-99fd-c64c9747a876:0}, content='')
+ </screen>
+
+
+ <para>Next, let's use <command>drain</command> with the
+ subject <literal>#.news</literal> to match any sequence of
+ words that ends with <literal>news</literal>.</para>
+
+ <para><emphasis>First Window:</emphasis></para>
+
+ <screen>
+ $ ./drain -t 30 news-service/#.news
+ </screen>
+
+ <para>In the second window, let's send messages using a
+ variety of different multi-word keys:</para>
+
+ <para><emphasis>Second Window:</emphasis></para>
+
+ <screen>
+ $ ./spout news-service/news
+ $ ./spout news-service/sports
+ $ ./spout news-service/usa.news
+ $ ./spout news-service/usa.sports
+ $ ./spout news-service/usa.faux.news
+ $ ./spout news-service/usa.faux.sports
+ </screen>
+
+ <para>In the first window, messages with
+ <literal>news</literal> in the last word of the key have been
+ received:</para>
+
+ <screen>
+ Message(properties={qpid.subject:news, spout-id:cbd42b0f-c87b-4088-8206-26d7627c9640:0}, content='')
+ Message(properties={qpid.subject:usa.news, spout-id:234a78d7-daeb-4826-90e1-1c6540781eac:0}, content='')
+ Message(properties={qpid.subject:usa.faux.news, spout-id:6029430a-cfcb-4700-8e9b-cbe4a81fca5f:0}, content='')
+ </screen>
+ </example>
+
+ </section>
+
+ <section>
+ <title>Address String Options</title>
+
+ <para>
+ The options in an address string can contain additional
+ information for the senders or receivers created for it,
+ including:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Policies for assertions about the node to which an address
+ refers.
+ </para>
+ <para>
+ For instance, in the address string <literal>my-queue;
+ {assert: always, node:{ type: queue }}</literal>, the node
+ named <literal>my-queue</literal> must be a queue; if not,
+ the address does not resolve to a node, and an exception
+ is raised.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Policies for automatically creating or deleting the node to which an address refers.
+ </para>
+ <para>
+ For instance, in the address string <literal>xoxox ; {create: always}</literal>,
+ the queue <literal>xoxox</literal> is created, if it does
+ not exist, before the address is resolved.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Extension points that can be used for sender/receiver configuration.
+ </para>
+ <para>
+ For instance, if the address for a receiver is
+ <literal>my-queue; {mode: browse}</literal>, the receiver
+ works in <literal>browse</literal> mode, leaving messages
+ on the queue so other receivers can receive them.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Extension points providing more direct control over the underlying protocol.
+ </para>
+ <para>
+ For instance, the <literal>x-bindings</literal> property
+ allows greater control over the AMQP 0-10 binding process
+ when an address is resolved.
+ </para>
+ </listitem>
+ </itemizedlist>
- <para><emphasis>First Window:</emphasis></para>
+
+ <para>
+ Let's use some examples to show how these different kinds of
+ address string options affect the behavior of senders and
+ receives.
+ </para>
+
+ <section>
+ <title>assert</title>
+ <para>
+ In this section, we use the <literal>assert</literal> option
+ to ensure that the address resolves to a node of the required
+ type.
+ </para>
+
+
+ <example>
+ <title>Assertions on Nodes</title>
+
+ <para>Let's use <command>qpid-config</command> to create a
+ queue and a topic.</para>
<screen>
-$ ./drain -t 30 news-service/*.news
+ $ qpid-config add queue my-queue
+ $ qpid-config add exchange topic my-topic
</screen>
- <para>Now let's send messages using several different
- two-word keys:</para>
-
- <para><emphasis>Second Window:</emphasis></para>
+ <para>
+ We can now use the address specified to drain to assert that it is
+ of a particular type:
+ </para>
<screen>
-$ ./spout news-service/usa.news
-$ ./spout news-service/usa.sports
-$ ./spout news-service/europe.sports
-$ ./spout news-service/europe.news
+ $ ./drain 'my-queue; {assert: always, node:{ type: queue }}'
+ $ ./drain 'my-queue; {assert: always, node:{ type: topic }}'
+ 2010-04-20 17:30:46 warning Exception received from broker: not-found: not-found: Exchange not found: my-queue (../../src/qpid/broker/ExchangeRegistry.cpp:92) [caused by 2 \x07:\x01]
+ Exchange my-queue does not exist
</screen>
- <para>In the first window, the messages with
- <literal>news</literal> in the second word of the key have
- been received:</para>
+ <para>
+ The first attempt passed without error as my-queue is indeed a
+ queue. The second attempt however failed; my-queue is not a
+ topic.
+ </para>
+
+ <para>
+ We can do the same thing for my-topic:
+ </para>
<screen>
-Message(properties={qpid.subject:usa.news, spout-id:73fc8058-5af6-407c-9166-b49a9076097a:0}, content='')
-Message(properties={qpid.subject:europe.news, spout-id:f72815aa-7be4-4944-99fd-c64c9747a876:0}, content='')
+ $ ./drain 'my-topic; {assert: always, node:{ type: topic }}'
+ $ ./drain 'my-topic; {assert: always, node:{ type: queue }}'
+ 2010-04-20 17:31:01 warning Exception received from broker: not-found: not-found: Queue not found: my-topic (../../src/qpid/broker/SessionAdapter.cpp:754) [caused by 1 \x08:\x01]
+ Queue my-topic does not exist
</screen>
+ </example>
+
+ <para>Now let's use the <literal>create</literal> option to
+ create the queue <literal>xoxox</literal> if it does not already
+ exist:</para>
+ </section>
- <para>Next, let's use <command>drain</command> with the
- subject <literal>#.news</literal> to match any sequence of
- words that ends with <literal>news</literal>.</para>
+ <section>
+ <title>create</title>
+
+ <para>In previous examples, we created the queue before
+ listening for messages on it. Using <literal>create:
+ always</literal>, the queue is automatically created if it
+ does not exist.</para>
+
+ <example>
+ <title>Creating a Queue Automatically</title>
<para><emphasis>First Window:</emphasis></para>
+ <screen>$ ./drain -t 30 "xoxox ; {create: always}"</screen>
- <screen>
-$ ./drain -t 30 news-service/#.news
- </screen>
- <para>In the second window, let's send messages using a
- variety of different multi-word keys:</para>
+ <para>Now we can send messages to this queue:</para>
<para><emphasis>Second Window:</emphasis></para>
+ <screen>$ ./spout "xoxox ; {create: always}"</screen>
+
+ <para>Returning to the first window, we see that <command>drain</command> has received this message:</para>
+
+ <screen>Message(properties={spout-id:1a1a3842-1a8b-4f88-8940-b4096e615a7d:0}, content='')</screen>
+ </example>
+ <para>The details of the node thus created can be controlled by further options within the node. See <xref linkend="table-node-properties"/> for details.</para>
+ </section>
+ <section>
+ <title>browse</title>
+ <para>Some options specify message transfer semantics; for
+ instance, they may state whether messages should be consumed or
+ read in browsing mode, or specify reliability
+ characteristics. The following example uses the
+ <literal>browse</literal> option to receive messages without
+ removing them from a queue.</para>
+
+ <example>
+ <title>Browsing a Queue</title>
+ <para>
+ Let's use the browse mode to receive messages without
+ removing them from the queue. First we send three messages to the
+ queue:
+ </para>
<screen>
-$ ./spout news-service/news
-$ ./spout news-service/sports
-$ ./spout news-service/usa.news
-$ ./spout news-service/usa.sports
-$ ./spout news-service/usa.faux.news
-$ ./spout news-service/usa.faux.sports
+ $ ./spout my-queue --content one
+ $ ./spout my-queue --content two
+ $ ./spout my-queue --content three
</screen>
- <para>In the first window, messages with
- <literal>news</literal> in the last word of the key have been
- received:</para>
+ <para>Now we use drain to get those messages, using the browse option:</para>
+ <screen>
+ $ ./drain 'my-queue; {mode: browse}'
+ Message(properties={spout-id:fbb93f30-0e82-4b6d-8c1d-be60eb132530:0}, content='one')
+ Message(properties={spout-id:ab9e7c31-19b0-4455-8976-34abe83edc5f:0}, content='two')
+ Message(properties={spout-id:ea75d64d-ea37-47f9-96a9-d38e01c97925:0}, content='three')
+ </screen>
- <screen>
-Message(properties={qpid.subject:news, spout-id:cbd42b0f-c87b-4088-8206-26d7627c9640:0}, content='')
-Message(properties={qpid.subject:usa.news, spout-id:234a78d7-daeb-4826-90e1-1c6540781eac:0}, content='')
-Message(properties={qpid.subject:usa.faux.news, spout-id:6029430a-cfcb-4700-8e9b-cbe4a81fca5f:0}, content='')
- </screen>
- </example>
+ <para>We can confirm the messages are still on the queue by repeating the drain:</para>
+ <screen>
+ $ ./drain 'my-queue; {mode: browse}'
+ Message(properties={spout-id:fbb93f30-0e82-4b6d-8c1d-be60eb132530:0}, content='one')
+ Message(properties={spout-id:ab9e7c31-19b0-4455-8976-34abe83edc5f:0}, content='two')
+ Message(properties={spout-id:ea75d64d-ea37-47f9-96a9-d38e01c97925:0}, content='three')
+ </screen>
+ </example>
+ </section>
- </section>
+ <section>
+ <title>x-bindings</title>
+
+ <para>Greater control over the AMQP 0-10 binding process can
+ be achieved by including an <literal>x-bindings</literal>
+ option in an address string.
+
+ For instance, the XML Exchange is an AMQP 0-10 custom exchange
+ provided by the Apache Qpid C++ broker. It allows messages to
+ be filtered using XQuery; queries can address either message
+ properties or XML content in the body of the message. The
+ xquery is specified in the arguments field of the AMQP 0-10
+ command. When using the messaging API an xquery can be
+ specified in and address that resolves to an XML exchange by
+ using the x-bindings property.</para>
+
+
+ <para>An instance of the XML Exchange must be added before it
+ can be used:</para>
+
+ <programlisting>
+ $ qpid-config add exchange xml xml
+ </programlisting>
+
+ <para>When using the XML Exchange, a receiver provides an
+ XQuery as an x-binding argument. If the query contains a
+ context item (a path starting with <quote>.</quote>), then it
+ is applied to the content of the message, which must be
+ well-formed XML. For instance, <literal>./weather</literal> is
+ a valid XQuery, which matches any message in which the root
+ element is named <literal>weather</literal>. Here is an
+ address string that contains this query:</para>
- <section>
- <title>Address String Options</title>
+ <programlisting><![CDATA[
+ xml; {
+ link: {
+ x-bindings: [{exchange:xml, key:weather, arguments:{xquery:"./weather"} }]
+ }
+ }
+ ]]></programlisting>
+
+ <para>When using longer queries with <command>drain</command>,
+ it is often useful to place the query in a file, and use
+ <command>cat</command> in the command line. We do this in the
+ following example.</para>
- <para>
- The options in an address string can contain additional
- information for the senders or receivers created for it,
- including:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Policies for assertions about the node to which an address
- refers.
- </para>
- <para>
- For instance, in the address string <literal>my-queue;
- {assert: always, node:{ type: queue }}</literal>, the node
- named <literal>my-queue</literal> must be a queue; if not,
- the address does not resolve to a node, and an exception
- is raised.
- </para>
- </listitem>
- <listitem>
- <para>
- Policies for automatically creating or deleting the node to which an address refers.
- </para>
- <para>
- For instance, in the address string <literal>xoxox ; {create: always}</literal>,
- the queue <literal>xoxox</literal> is created, if it does
- not exist, before the address is resolved.
- </para>
- </listitem>
- <listitem>
- <para>
- Extension points that can be used for sender/receiver configuration.
- </para>
- <para>
- For instance, if the address for a receiver is
- <literal>my-queue; {mode: browse}</literal>, the receiver
- works in <literal>browse</literal> mode, leaving messages
- on the queue so other receivers can receive them.
- </para>
- </listitem>
- <listitem>
- <para>
- Extension points providing more direct control over the underlying protocol.
- </para>
- <para>
- For instance, the <literal>x-bindings</literal> property
- allows greater control over the AMQP 0-10 binding process
- when an address is resolved.
- </para>
- </listitem>
- </itemizedlist>
+ <example>
+ <title>Using the XML Exchange</title>
+ <para>This example uses an x-binding that contains queries, which filter based on the content of XML messages. Here is an XQuery that we will use in this example:</para>
- <para>
- Let's use some examples to show how these different kinds of
- address string options affect the behavior of senders and
- receives.
- </para>
+ <programlisting>
+ <![CDATA[
+ let $w := ./weather
+ return $w/station = 'Raleigh-Durham International Airport (KRDU)'
+ and $w/temperature_f > 50
+ and $w/temperature_f - $w/dewpoint > 5
+ and $w/wind_speed_mph > 7
+ and $w/wind_speed_mph < 20 ]]>
+ </programlisting>
- <section>
- <title>assert</title>
- <para>
- In this section, we use the <literal>assert</literal> option
- to ensure that the address resolves to a node of the required
- type.
- </para>
+ <para>We can specify this query in an x-binding to listen to messages that meet the criteria specified by the query:</para>
+ <para><emphasis>First Window:</emphasis></para>
- <example>
- <title>Assertions on Nodes</title>
+ <screen>
+ $ ./drain -f "xml; {link:{x-bindings:[{key:'weather',
+ arguments:{xquery:\"$(cat rdu.xquery )\"}}]}}"
+ </screen>
- <para>Let's use <command>qpid-config</command> to create a
- queue and a topic.</para>
+ <para>In another window, let's create an XML message that meets the criteria in the query, and place it in the file <filename>rdu.xml</filename>:</para>
+
+ <programlisting>
+ <![CDATA[
+ <weather>
+ <station>Raleigh-Durham International Airport (KRDU)</station>
+ <wind_speed_mph>16</wind_speed_mph>
+ <temperature_f>70</temperature_f>
+ <dewpoint>35</dewpoint>
+ </weather>
+ ]]></programlisting>
+
+ <para>Now let's use <command>spout</command> to send this message to the XML exchange:</para>
+
+ <para><emphasis>Second Window:</emphasis></para>
+ <screen>
+ spout --content "$(cat rdu.xml)" xml/weather
+ </screen>
+
+ <para>Returning to the first window, we see that the message has been received:</para>
+
+ <screen><![CDATA[$ ./drain -f "xml; {link:{x-bindings:[{exchange:'xml', key:'weather', arguments:{xquery:\"$(cat rdu.xquery )\"}}]}}"
+ Message(properties={qpid.subject:weather, spout-id:31c431de-593f-4bec-a3dd-29717bd945d3:0},
+ content='<weather>
+ <station>Raleigh-Durham International Airport (KRDU)</station>
+ <wind_speed_mph>16</wind_speed_mph>
+ <temperature_f>40</temperature_f>
+ <dewpoint>35</dewpoint>
+ </weather>') ]]>
+ </screen>
+ </example>
+ </section>
- <screen>
-$ qpid-config add queue my-queue
-$ qpid-config add exchange topic my-topic
- </screen>
+ <!--
+ <para>When sending data using <command>cat</command> to provide arguments to <command>spout</command>, you can use <command>sed</command> to change the values that are sent:</para>
- <para>
- We can now use the address specified to drain to assert that it is
- of a particular type:
- </para>
+<screen>
+spout - -content "$(cat rdu.xml | sed -e 's/70/45/')" xml/weather
+</screen>
+ -->
- <screen>
-$ ./drain 'my-queue; {assert: always, node:{ type: queue }}'
-$ ./drain 'my-queue; {assert: always, node:{ type: topic }}'
-2010-04-20 17:30:46 warning Exception received from broker: not-found: not-found: Exchange not found: my-queue (../../src/qpid/broker/ExchangeRegistry.cpp:92) [caused by 2 \x07:\x01]
-Exchange my-queue does not exist
- </screen>
+ <!--
+ TODO: Add some reliability option examples
+ -->
- <para>
- The first attempt passed without error as my-queue is indeed a
- queue. The second attempt however failed; my-queue is not a
- topic.
- </para>
+ <section>
+ <title>Address String Options - Reference</title>
+
+ <table pgwide="1">
+ <title>Address String Options</title>
+ <tgroup cols="3">
+ <thead>
+ <colspec colnum="1" colwidth="1*"/>
+ <colspec colnum="2" colwidth="3*"/>
+ <colspec colnum="3" colwidth="3*"/>
+ <row>
+ <entry>option</entry>
+ <entry>value</entry>
+ <entry>semantics</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ assert
+ </entry>
+ <entry>
+ one of: always, never, sender or receiver
+ </entry>
+ <entry>
+ Asserts that the properties specified in the node option
+ match whatever the address resolves to. If they do not,
+ resolution fails and an exception is raised. <!-- ###
+ Which exception -->
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ create
+ </entry>
+ <entry>
+ one of: always, never, sender or receiver
+ </entry>
+ <entry>
+ Creates the node to which an address refers if it does
+ not exist. No error is raised if the node does
+ exist. The details of the node may be specified in the
+ node option.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ delete
+ </entry>
+ <entry>
+ one of: always, never, sender or receiver
+ </entry>
+ <entry>
+ Delete the node when the sender or receiver is closed.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ node
+ </entry>
+ <entry>
+ A nested map containing the entries shown in <xref linkend="table-node-properties"/>.
+ </entry>
+ <entry>
+ Specifies properties of the node to which the address
+ refers. These are used in conjunction with the assert or
+ create options.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ link
+ </entry>
+ <entry>
+ A nested map containing the entries shown in <xref linkend="table-link-properties"/>.
+ </entry>
+ <entry>
+ Used to control the establishment of a conceptual link
+ from the client application to or from the target/source
+ address.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ mode
+ </entry>
+ <entry>
+ one of: browse, consume
+ </entry>
+ <entry>
+ This option is only of relevance for source addresses
+ that resolve to a queue. If browse is specified the
+ messages delivered to the receiver are left on the queue
+ rather than being removed. If consume is specified the
+ normal behaviour applies; messages are removed from the
+ queue once the client acknowledges their receipt.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ <table id="table-node-properties" pgwide="1">
+ <title>Node Properties</title>
+ <tgroup cols="3">
+ <thead>
+ <colspec colnum="1" colwidth="1*"/>
+ <colspec colnum="2" colwidth="3*"/>
+ <colspec colnum="3" colwidth="3*"/>
+ <row>
+ <entry>property</entry>
+ <entry>value</entry>
+ <entry>semantics</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ type
+ </entry>
+ <entry>
+ topic, queue
+ </entry>
+ <entry>
+ Indicates the type of the node.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ durable
+ </entry>
+ <entry>
+ True, False
+ </entry>
+ <entry>
+ Indicates whether the node survives a loss of
+ volatile storage e.g. if the broker is restarted.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ x-declare
+ </entry>
+ <entry>
+ A nested map whose values correspond to the valid fields
+ on an AMQP 0-10 queue-declare or exchange-declare
+ command.
+ </entry>
+ <entry>
+ These values are used to fine tune the creation or
+ assertion process. Note however that they are protocol
+ specific.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ x-bindings
+ </entry>
+ <entry>
+ A nested list in which each binding is represented by
+ a map. The entries of the map for a binding contain
+ the fields that describe an AMQP 0-10 binding. Here is
+ the format for x-bindings:
+
+ <programlisting><![CDATA[
+ [
+ {
+ exchange: <exchange>,
+ queue: <queue>,
+ key: <key>,
+ arguments: {
+ <key_1>: <value_1>,
+ ...,
+ <key_n>: <value_n> }
+ },
+ ...
+ ]
+ ]]></programlisting>
+ </entry>
+ <entry>
+ In conjunction with the create option, each of these
+ bindings is established as the address is resolved. In
+ conjunction with the assert option, the existence of
+ each of these bindings is verified during
+ resolution. Again, these are protocol specific.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table id="table-link-properties" pgwide="1">
+ <title>Link Properties</title>
+ <tgroup cols="3">
+ <thead>
+ <colspec colnum="1" colwidth="1*"/>
+ <colspec colnum="2" colwidth="3*"/>
+ <colspec colnum="3" colwidth="3*"/>
+ <row>
+ <entry>option</entry>
+ <entry>value</entry>
+ <entry>semantics</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ reliability
+ </entry>
+ <entry>
+ one of: unreliable, at-least-once, at-most-once, exactly-once
+ </entry>
+ <entry>
+ Reliability indicates the level of reliability that
+ the sender or receiver. <literal>unreliable</literal>
+ and <literal>at-most-once</literal> are currently
+ treated as synonyms, and allow messages to be lost if
+ a broker crashes or the connection to a broker is
+ lost. <literal>at-least-once</literal> guarantees that
+ a message is not lost, but duplicates may be
+ received. <literal>exactly-once</literal> guarantees
+ that a message is not lost, and is delivered precisely
+ once. Currently only <literal>unreliable</literal>
+ and <literal>at-least-once</literal> are supported.
+ <footnote><para>If at-most-once is requested,
+ unreliable will be used and for durable messages on
+ durable queues there is the possibility that messages
+ will be redelivered; if exactly-once is requested,
+ at-most-once will be used and the application needs to
+ be able to deal with duplicates.</para></footnote>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ durable
+ </entry>
+ <entry>
+ True, False
+ </entry>
+ <entry>
+ Indicates whether the link survives a loss of
+ volatile storage e.g. if the broker is restarted.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ x-declare
+ </entry>
+ <entry>
+ A nested map whose values correspond to the valid fields
+ of an AMQP 0-10 queue-declare command.
+ </entry>
+ <entry>
+ These values can be used to customise the subscription
+ queue in the case of receiving from an exchange. Note
+ however that they are protocol specific.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ x-subscribe
+ </entry>
+ <entry>
+ A nested map whose values correspond to the valid fields
+ of an AMQP 0-10 message-subscribe command.
+ </entry>
+ <entry>
+ These values can be used to customise the subscription.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ x-bindings
+ </entry>
+ <entry>
+ A nested list each of whose entries is a map that may
+ contain fields (queue, exchange, key and arguments)
+ describing an AMQP 0-10 binding.
+ </entry>
+ <entry>
+ These bindings are established during resolution
+ independent of the create option. They are considered
+ logically part of the linking process rather than of
+ node creation.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
- <para>
- We can do the same thing for my-topic:
- </para>
+ </section>
+ </section>
- <screen>
-$ ./drain 'my-topic; {assert: always, node:{ type: topic }}'
-$ ./drain 'my-topic; {assert: always, node:{ type: queue }}'
-2010-04-20 17:31:01 warning Exception received from broker: not-found: not-found: Queue not found: my-topic (../../src/qpid/broker/SessionAdapter.cpp:754) [caused by 1 \x08:\x01]
-Queue my-topic does not exist
- </screen>
- </example>
+ <section id="section-address-string-bnf">
+ <title>Address String Grammar</title>
- <para>Now let's use the <literal>create</literal> option to
- create the queue <literal>xoxox</literal> if it does not already
- exist:</para>
+ <para>This section provides a formal grammar for address strings.</para>
+ <formalpara>
+ <title>Tokens</title>
+ <para>The following regular expressions define the tokens used
+ to parse address strings:</para></formalpara>
+ <programlisting><![CDATA[
+ LBRACE: \\{
+ RBRACE: \\}
+ LBRACK: \\[
+ RBRACK: \\]
+ COLON: :
+ SEMI: ;
+ SLASH: /
+ COMMA: ,
+ NUMBER: [+-]?[0-9]*\\.?[0-9]+
+ ID: [a-zA-Z_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?
+ STRING: "(?:[^\\\\"]|\\\\.)*"|\'(?:[^\\\\\']|\\\\.)*\'
+ ESC: \\\\[^ux]|\\\\x[0-9a-fA-F][0-9a-fA-F]|\\\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]
+ SYM: [.#*%@$^!+-]
+ WSPACE: [ \\n\\r\\t]+
+ ]]></programlisting>
+
+ <formalpara>
+ <title>Grammar</title>
+ <para>The formal grammar for addresses is given below:</para>
+ </formalpara>
+
+ <programlisting><![CDATA[
+ address := name [ SLASH subject ] [ ";" options ]
+ name := ( part | quoted )+
+ subject := ( part | quoted | SLASH )*
+ quoted := STRING / ESC
+ part := LBRACE / RBRACE / COLON / COMMA / NUMBER / ID / SYM
+ options := map
+ map := "{" ( keyval ( "," keyval )* )? "}"
+ keyval "= ID ":" value
+ value := NUMBER / STRING / ID / map / list
+ list := "[" ( value ( "," value )* )? "]"
+ ]]></programlisting>
+
+
+ <formalpara>
+ <title>Address String Options</title>
+ <para>The address string options map supports the following parameters:</para>
+ </formalpara>
+
+ <programlisting><![CDATA[
+ <name> [ / <subject> ] ; {
+ create: always | sender | receiver | never,
+ delete: always | sender | receiver | never,
+ assert: always | sender | receiver | never,
+ mode: browse | consume,
+ node: {
+ type: queue | topic,
+ durable: True | False,
+ x-declare: { ... <declare-overrides> ... },
+ x-bindings: [<binding_1>, ... <binding_n>]
+ },
+ link: {
+ name: <link-name>,
+ durable: True | False,
+ reliability: unreliable | at-most-once | at-least-once | exactly-once,
+ x-declare: { ... <declare-overrides> ... },
+ x-bindings: [<binding_1>, ... <binding_n>],
+ x-subscribe: { ... <subscribe-overrides> ... }
+ }
+ }
+ ]]></programlisting>
+
+
+ <itemizedlist>
+ <title>Create, Delete, and Assert Policies</title>
+ <para>The create, delete, and assert policies specify who should
+ perfom the associated action:</para>
+ <listitem><para><emphasis>always</emphasis>: the action is performed by any messaging client</para></listitem>
+ <listitem><para><emphasis>sender</emphasis>: the action is only performed by a sender</para></listitem>
+ <listitem><para><emphasis>receiver</emphasis>: the action is only performed by a receiver</para></listitem>
+ <listitem><para><emphasis>never</emphasis>: the action is never performed (this is the default)</para></listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <title>Node-Type</title>
+ <para>The node-type is one of:</para>
+ <listitem><para><emphasis>topic</emphasis>: in the AMQP 0-10
+ mapping, a topic node defaults to the topic exchange, x-declare
+ may be used to specify other exchange types</para></listitem>
+ <listitem><para><emphasis>queue</emphasis>: this is the default node-type</para></listitem>
+ </itemizedlist>
</section>
- <section>
- <title>create</title>
- <para>In previous examples, we created the queue before
- listening for messages on it. Using <literal>create:
- always</literal>, the queue is automatically created if it
- does not exist.</para>
+ </section>
- <example>
- <title>Creating a Queue Automatically</title>
+ <section id="replay">
+ <title>Sender Capacity and Replay</title>
+
+ <para>The send method of a sender has an optional second parameter
+ that controls whether the send call is synchronous or not. A
+ synchronous send call will block until the broker has confirmed
+ receipt of the message. An asynchronous send call will return
+ before the broker confirms receipt of the message, allowing for
+ example further send calls to be made without waiting for a
+ roundtrip to the broker for each message. This is desirable where
+ increased throughput is important.</para>
+
+ <para>The sender maintains a list of sent messages whose receipt
+ has yet to be confirmed by the broker. The maximum number of such
+ messages that it will hold is defined by the capacity of the
+ sender, which can be set by the application. If an application
+ tries to send with a sender whose capacity is already fully used
+ up, the send call will block waiting for capacity regardless of
+ the value of the sync flag.</para>
+
+ <para>The sender can be queried for the available space (i.e. the
+ unused capacity), and for the current count of unsettled messages
+ (i.e. those held in the replay list pending confirmation by the
+ server). When the unsettled count is zero, all messages on that
+ sender have been successfully sent.</para>
+
+ <para>If the connection fails and is transparently reconnected
+ (see <xref linkend="connection-options"/> for details on how to control
+ this feature), the unsettled messages for each sender over that
+ connection will be re-transmitted. This provides a transparent
+ level of reliability. This feature can be controlled through the
+ link's reliability as defined in the address (see
+ <xref linkend="table-link-properties"/>). At present only
+ at-least-once guarantees are offered. </para>
+ </section>
- <para><emphasis>First Window:</emphasis></para>
- <screen>$ ./drain -t 30 "xoxox ; {create: always}"</screen>
+ <section id="prefetch">
+ <title>Receiver Capacity (Prefetch)</title>
+ <para>By default, a receiver requests the next message from the
+ server in response to each fetch call, resulting in messages being
+ sent to the receiver one at a time. As in the case of sending, it
+ is often desirable to avoid this roundtrip for each message. This
+ can be achieved by allowing the receiver
+ to <firstterm>prefetch</firstterm> messages in anticipation of
+ fetch calls being made. The receiver needs to be able to store
+ these prefetched messages, the number it can hold is controlled by
+ the receivers capacity.</para>
- <para>Now we can send messages to this queue:</para>
+ </section>
- <para><emphasis>Second Window:</emphasis></para>
- <screen>$ ./spout "xoxox ; {create: always}"</screen>
+ <section id="acknowledgements">
+ <title>Acknowledging Received Messages</title>
+
+ <para>Applications that receive messages should acknowledge their
+ receipt by calling the session's acknowledge method. As in the
+ case of sending messages, acknowledged transfer of messages to
+ receivers provides at-least-once reliability, which means that the
+ loss of the connection or a client crash does not result in lost
+ messages; durable messages are not lost even if the broker is
+ restarted.
+
+ Some cases may not require this however and the reliability can be
+ controlled through a link property in the address options (see
+ <xref linkend="table-link-properties"/>).</para>
+
+ <para>The acknowledge call acknowledges all messages received on
+ the session (i.e. all message that have been returned from a fetch
+ call on a receiver created on that session).</para>
+
+ <para>The acknowledge call also support an optional parameter
+ controlling whether the call is synchronous or not. A synchronous
+ acknowledge will block until the server has confirmed that it has
+ received the acknowledgement. In the asynchronous case, when the
+ call returns there is not yet any guarantee that the server has
+ received and processed the acknowledgement. The session may be
+ queried for the number of unsettled acknowledgements; when that
+ count is zero all acknowledgements made for received messages have
+ been successful.</para>
- <para>Returning to the first window, we see that <command>drain</command> has received this message:</para>
+ </section>
- <screen>Message(properties={spout-id:1a1a3842-1a8b-4f88-8940-b4096e615a7d:0}, content='')</screen>
- </example>
- <para>The details of the node thus created can be controlled by further options within the node. See <xref linkend="table-node-properties"/> for details.</para>
- </section>
- <section>
- <title>browse</title>
- <para>Some options specify message transfer semantics; for
- instance, they may state whether messages should be consumed or
- read in browsing mode, or specify reliability
- characteristics. The following example uses the
- <literal>browse</literal> option to receive messages without
- removing them from a queue.</para>
+ <section>
+ <title>Receiving Messages from Multiple Sources</title>
+
+ <para>A receiver can only read from one source, but many
+ programs need to be able to read messages from many sources. In
+ the Qpid Messaging API, a program can ask a session for
+ the <quote>next receiver</quote>; that is, the receiver that is
+ responsible for the next available message. The following
+ examples show how this is done in C++, Python, and .NET C#.
+ </para>
+
+ <para>Note that to use this pattern you must enable prefetching
+ for each receiver of interest so that the broker will send
+ messages before a fetch call is made. See
+ <xref linkend="prefetch"/> for more on this.</para>
<example>
- <title>Browsing a Queue</title>
- <para>
- Let's use the browse mode to receive messages without
- removing them from the queue. First we send three messages to the
- queue:
- </para>
- <screen>
-$ ./spout my-queue --content one
-$ ./spout my-queue --content two
-$ ./spout my-queue --content three
- </screen>
+ <title>Receiving Messages from Multiple Sources</title>
- <para>Now we use drain to get those messages, using the browse option:</para>
- <screen>
-$ ./drain 'my-queue; {mode: browse}'
-Message(properties={spout-id:fbb93f30-0e82-4b6d-8c1d-be60eb132530:0}, content='one')
-Message(properties={spout-id:ab9e7c31-19b0-4455-8976-34abe83edc5f:0}, content='two')
-Message(properties={spout-id:ea75d64d-ea37-47f9-96a9-d38e01c97925:0}, content='three')
- </screen>
+ <para>C++:</para>
- <para>We can confirm the messages are still on the queue by repeating the drain:</para>
- <screen>
-$ ./drain 'my-queue; {mode: browse}'
-Message(properties={spout-id:fbb93f30-0e82-4b6d-8c1d-be60eb132530:0}, content='one')
-Message(properties={spout-id:ab9e7c31-19b0-4455-8976-34abe83edc5f:0}, content='two')
-Message(properties={spout-id:ea75d64d-ea37-47f9-96a9-d38e01c97925:0}, content='three')
- </screen>
- </example>
- </section>
+ <programlisting><![CDATA[
+ Receiver receiver1 = session.createReceiver(address1);
+ receiver1.setCapacity(10);
+ Receiver receiver2 = session.createReceiver(address2);
+ receiver2.setCapacity(10);
- <section>
- <title>x-bindings</title>
+ Message message = session.nextReceiver().fetch();
+ std::cout << message.getContent() << std::endl;
+ session.acknowledge(); // acknowledge message receipt
+ ]]> </programlisting>
- <para>Greater control over the AMQP 0-10 binding process can
- be achieved by including an <literal>x-bindings</literal>
- option in an address string.
+ <para>Python:</para>
+ <programlisting><![CDATA[
+ receiver1 = session.receiver(address1)
+ receiver1.capacity = 10
+ receiver2 = session.receiver(address)
+ receiver2.capacity = 10
+ message = session.next_receiver().fetch()
+ print message.content
+ session.acknowledge()
+ ]]> </programlisting>
- For instance, the XML Exchange is an AMQP 0-10 custom exchange
- provided by the Apache Qpid C++ broker. It allows messages to
- be filtered using XQuery; queries can address either message
- properties or XML content in the body of the message. The
- xquery is specified in the arguments field of the AMQP 0-10
- command. When using the messaging API an xquery can be
- specified in and address that resolves to an XML exchange by
- using the x-bindings property.</para>
+ <para>.NET C#:</para>
+ <programlisting><![CDATA[
+ Receiver receiver1 = session.CreateReceiver(address1);
+ receiver1.Capacity = 10;
+ Receiver receiver2 = session.CreateReceiver(address2);
+ receiver2.Capacity = 10;
+ Message message = new Message();
+ message = session.NextReceiver().Fetch();
+ Console.WriteLine("{0}", message.GetContent());
+ session.Acknowledge();
+ ]]> </programlisting>
- <para>An instance of the XML Exchange must be added before it
- can be used:</para>
+ </example>
+ </section>
- <programlisting>
-$ qpid-config add exchange xml xml
- </programlisting>
+ <section>
+ <title>Transactions</title>
- <para>When using the XML Exchange, a receiver provides an
- XQuery as an x-binding argument. If the query contains a
- context item (a path starting with <quote>.</quote>), then it
- is applied to the content of the message, which must be
- well-formed XML. For instance, <literal>./weather</literal> is
- a valid XQuery, which matches any message in which the root
- element is named <literal>weather</literal>. Here is an
- address string that contains this query:</para>
+ <para>Sometimes it is useful to be able to group messages
+ transfers - sent and/or received - on a session into atomic
+ grouping. This can be done be creating the session as
+ transactional. On a transactional session sent messages only
+ become available at the target address on commit. Likewise any
+ received and acknowledged messages are only discarded at their
+ source on commit
- <programlisting><![CDATA[
-xml; {
- link: {
- x-bindings: [{exchange:xml, key:weather, arguments:{xquery:"./weather"} }]
- }
-}
- ]]></programlisting>
+ <footnote><para>Note that this currently is only true for
+ messages received using a reliable mode
+ e.g. at-least-once. Messages sent by a broker to a receiver in
+ unreliable receiver will be discarded immediately regardless of
+ transctionality.</para></footnote>
- <para>When using longer queries with <command>drain</command>,
- it is often useful to place the query in a file, and use
- <command>cat</command> in the command line. We do this in the
- following example.</para>
+ .</para>
<example>
- <title>Using the XML Exchange</title>
-
- <para>This example uses an x-binding that contains queries, which filter based on the content of XML messages. Here is an XQuery that we will use in this example:</para>
+ <title>Transactions</title>
+ <para>C++:</para>
+ <programlisting><![CDATA[
+ Connection connection(broker);
+ Session session = connection.createTransactionalSession();
+ ...
+ if (smellsOk())
+ session.commit();
+ else
+ session.rollback();
+ ]]></programlisting>
+ <para>
+ .NET C#:
+ </para>
<programlisting>
- <![CDATA[
-let $w := ./weather
-return $w/station = 'Raleigh-Durham International Airport (KRDU)'
- and $w/temperature_f > 50
- and $w/temperature_f - $w/dewpoint > 5
- and $w/wind_speed_mph > 7
- and $w/wind_speed_mph < 20 ]]>
+ Connection connection = new Connection(broker);
+ Session session = connection.CreateTransactionalSession();
+ ...
+ if (smellsOk())
+ session.Commit();
+ else
+ session.Rollback();
</programlisting>
+ <!--
+ <para>Python</para>
+ <programlisting><![CDATA[
+ ### TODO
+ ]]></programlisting>
+ -->
+ </example>
- <para>We can specify this query in an x-binding to listen to messages that meet the criteria specified by the query:</para>
+ </section>
- <para><emphasis>First Window:</emphasis></para>
+ <section id="connection-options">
+ <title>Connection Options</title>
- <screen>
-$ ./drain -f "xml; {link:{x-bindings:[{key:'weather',
-arguments:{xquery:\"$(cat rdu.xquery )\"}}]}}"
- </screen>
+ <para>
+ Aspects of the connections behaviour can be controlled through
+ specifying connection options. For example, connections can be
+ configured to automatically reconnect if the connection to a
+ broker is lost.
+ </para>
+
+ <example>
+ <title>Specifying Connection Options in C++, Python, and .NET</title>
- <para>In another window, let's create an XML message that meets the criteria in the query, and place it in the file <filename>rdu.xml</filename>:</para>
+ <para>In C++, these options can be set using <function>Connection::setOption()</function> or by passing in a set of options to the constructor. The options can be passed in as a map or in string form:</para>
- <programlisting>
-<![CDATA[
-<weather>
- <station>Raleigh-Durham International Airport (KRDU)</station>
- <wind_speed_mph>16</wind_speed_mph>
- <temperature_f>70</temperature_f>
- <dewpoint>35</dewpoint>
-</weather>
+ <programlisting><![CDATA[
+ Connection connection("localhost:5672", "{reconnect: true}");
+ try {
+ connection.open();
+ !!! SNIP !!!
]]></programlisting>
- <para>Now let's use <command>spout</command> to send this message to the XML exchange:</para>
+ <para>or</para>
- <para><emphasis>Second Window:</emphasis></para>
- <screen>
-spout --content "$(cat rdu.xml)" xml/weather
- </screen>
+ <programlisting><![CDATA[
+ Connection connection("localhost:5672");
+ connection.setOption("reconnect", true);
+ try {
+ connection.open();
+ !!! SNIP !!!
+ ]]></programlisting>
- <para>Returning to the first window, we see that the message has been received:</para>
+ <para>In Python, these options can be set as attributes of the connection or using named arguments in
+ the <function>Connection</function> constructor:</para>
- <screen><![CDATA[$ ./drain -f "xml; {link:{x-bindings:[{exchange:'xml', key:'weather', arguments:{xquery:\"$(cat rdu.xquery )\"}}]}}"
-Message(properties={qpid.subject:weather, spout-id:31c431de-593f-4bec-a3dd-29717bd945d3:0},
-content='<weather>
- <station>Raleigh-Durham International Airport (KRDU)</station>
- <wind_speed_mph>16</wind_speed_mph>
- <temperature_f>40</temperature_f>
- <dewpoint>35</dewpoint>
-</weather>') ]]>
- </screen>
- </example>
- </section>
+ <programlisting><![CDATA[
+ connection = Connection("localhost:5672", reconnect=True)
+ try:
+ connection.open()
+ !!! SNIP !!!
+ ]]></programlisting>
-<!--
- <para>When sending data using <command>cat</command> to provide arguments to <command>spout</command>, you can use <command>sed</command> to change the values that are sent:</para>
+ <para>or</para>
- <screen>
-spout - -content "$(cat rdu.xml | sed -e 's/70/45/')" xml/weather
- </screen>
--->
+ <programlisting><![CDATA[
+ connection = Connection("localhost:5672")
+ connection.reconnect = True
+ try:
+ connection.open()
+ !!! SNIP !!!
+ ]]></programlisting>
+ <para>
+ In .NET, these options can be set using <function>Connection.SetOption()</function> or by passing in a set of options to the constructor. The options can be passed in as a map or in string form:
+ </para>
- <!--
- TODO: Add some reliability option examples
- -->
+ <programlisting>
+ Connection connection= new Connection(&#34;localhost:5672&#34;, &#34;{reconnect: true}&#34;);
+ try {
+ connection.Open();
+ !!! SNIP !!!
+ </programlisting>
+ <para>
+ or
+ </para>
- <section>
- <title>Address String Options - Reference</title>
+ <programlisting>
+ Connection connection = new Connection(&#34;localhost:5672&#34;);
+ connection.SetOption(&#34;reconnect&#34;, true);
+ try {
+ connection.Open();
+ !!! SNIP !!!
+ </programlisting>
+
+ <para>See the reference documentation for details in each language.</para>
+ </example>
+
+ <para>The following table lists the supported connection options.</para>
<table pgwide="1">
- <title>Address String Options</title>
- <tgroup cols="3">
- <thead>
+ <title>Connection Options</title>
+ <tgroup cols="3">
+ <thead>
<colspec colnum="1" colwidth="1*"/>
- <colspec colnum="2" colwidth="3*"/>
+ <colspec colnum="2" colwidth="1*"/>
<colspec colnum="3" colwidth="3*"/>
<row>
- <entry>option</entry>
- <entry>value</entry>
+ <entry>option name</entry>
+ <entry>value type</entry>
<entry>semantics</entry>
</row>
- </thead>
- <tbody>
- <row>
- <entry>
- assert
- </entry>
- <entry>
- one of: always, never, sender or receiver
- </entry>
- <entry>
- Asserts that the properties specified in the node option
- match whatever the address resolves to. If they do not,
- resolution fails and an exception is raised. <!-- ###
- Which exception -->
- </entry>
- </row>
+ </thead>
+ <tbody>
<row>
<entry>
- create
+ <literal>username</literal>
</entry>
<entry>
- one of: always, never, sender or receiver
+ string
</entry>
<entry>
- Creates the node to which an address refers if it does
- not exist. No error is raised if the node does
- exist. The details of the node may be specified in the
- node option.
+ The username to use when authenticating to the broker.
</entry>
</row>
<row>
<entry>
- delete
+ <literal>password</literal>
</entry>
<entry>
- one of: always, never, sender or receiver
+ string
</entry>
<entry>
- Delete the node when the sender or receiver is closed.
+ The password to use when authenticating to the broker.
</entry>
</row>
<row>
<entry>
- node
+ <literal>sasl_mechanisms</literal>
</entry>
<entry>
- A nested map containing the entries shown in <xref linkend="table-node-properties"/>.
+ string
</entry>
<entry>
- Specifies properties of the node to which the address
- refers. These are used in conjunction with the assert or
- create options.
+ The specific SASL mechanisms to use with the python
+ client when authenticating to the broker. The value
+ is a space separated list.
</entry>
</row>
- <row>
- <entry>
- link
- </entry>
- <entry>
- A nested map containing the entries shown in <xref linkend="table-link-properties"/>.
- </entry>
- <entry>
- Used to control the establishment of a conceptual link
- from the client application to or from the target/source
- address.
- </entry>
- </row>
- <row>
- <entry>
- mode
- </entry>
- <entry>
- one of: browse, consume
- </entry>
- <entry>
- This option is only of relevance for source addresses
- that resolve to a queue. If browse is specified the
- messages delivered to the receiver are left on the queue
- rather than being removed. If consume is specified the
- normal behaviour applies; messages are removed from the
- queue once the client acknowledges their receipt.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table id="table-node-properties" pgwide="1">
- <title>Node Properties</title>
- <tgroup cols="3">
- <thead>
- <colspec colnum="1" colwidth="1*"/>
- <colspec colnum="2" colwidth="3*"/>
- <colspec colnum="3" colwidth="3*"/>
- <row>
- <entry>property</entry>
- <entry>value</entry>
- <entry>semantics</entry>
- </row>
- </thead>
- <tbody>
<row>
<entry>
- type
+ <literal>reconnect</literal>
</entry>
<entry>
- topic, queue
+ boolean
</entry>
<entry>
- Indicates the type of the node.
+ Transparently reconnect if the connection is lost.
</entry>
</row>
<row>
<entry>
- durable
+ <literal>reconnect_timeout</literal>
</entry>
<entry>
- True, False
+ integer
</entry>
<entry>
- Indicates whether the node survives a loss of
- volatile storage e.g. if the broker is restarted.
+ Total number of seconds to continue reconnection attempts before giving up and raising an exception.
</entry>
</row>
<row>
<entry>
- x-declare
+ <literal>reconnect_limit</literal>
</entry>
<entry>
- A nested map whose values correspond to the valid fields
- on an AMQP 0-10 queue-declare or exchange-declare
- command.
+ integer
</entry>
<entry>
- These values are used to fine tune the creation or
- assertion process. Note however that they are protocol
- specific.
+ Maximum number of reconnection attempts before giving up and raising an exception.
</entry>
</row>
<row>
<entry>
- x-bindings
+ <literal>reconnect_interval_min</literal>
</entry>
<entry>
- A nested list in which each binding is represented by
- a map. The entries of the map for a binding contain
- the fields that describe an AMQP 0-10 binding. Here is
- the format for x-bindings:
-
-<programlisting><![CDATA[
-[
- {
- exchange: <exchange>,
- queue: <queue>,
- key: <key>,
- arguments: {
- <key_1>: <value_1>,
- ...,
- <key_n>: <value_n> }
- },
- ...
-]
-]]></programlisting>
+ integer representing time in seconds
</entry>
<entry>
- In conjunction with the create option, each of these
- bindings is established as the address is resolved. In
- conjunction with the assert option, the existence of
- each of these bindings is verified during
- resolution. Again, these are protocol specific.
+ Minimum number of seconds between reconnection attempts. The first reconnection attempt is made immediately; if that fails, the first reconnection delay is set to the value of <literal>reconnect_interval_min</literal>; if that attempt fails, the reconnect interval increases exponentially until a reconnection attempt succeeds or <literal>reconnect_interval_max</literal> is reached.
</entry>
</row>
- </tbody>
- </tgroup>
- </table>
-
- <table id="table-link-properties" pgwide="1">
- <title>Link Properties</title>
- <tgroup cols="3">
- <thead>
- <colspec colnum="1" colwidth="1*"/>
- <colspec colnum="2" colwidth="3*"/>
- <colspec colnum="3" colwidth="3*"/>
- <row>
- <entry>option</entry>
- <entry>value</entry>
- <entry>semantics</entry>
- </row>
- </thead>
- <tbody>
<row>
<entry>
- reliability
+ <literal>reconnect_interval_max</literal>
</entry>
<entry>
- one of: unreliable, at-least-once, at-most-once, exactly-once
+ integer representing time in seconds
</entry>
<entry>
- Reliability indicates the level of reliability that
- the sender or receiver. <literal>unreliable</literal>
- and <literal>at-most-once</literal> are currently
- treated as synonyms, and allow messages to be lost if
- a broker crashes or the connection to a broker is
- lost. <literal>at-least-once</literal> guarantees that
- a message is not lost, but duplicates may be
- received. <literal>exactly-once</literal> guarantees
- that a message is not lost, and is delivered precisely
- once. Currently only <literal>unreliable</literal>
- and <literal>at-least-once</literal> are supported.
- <footnote><para>If at-most-once is requested,
- unreliable will be used and for durable messages on
- durable queues there is the possibility that messages
- will be redelivered; if exactly-once is requested,
- at-most-once will be used and the application needs to
- be able to deal with duplicates.</para></footnote>
+ Maximum reconnect interval.
</entry>
</row>
<row>
<entry>
- durable
+ <literal>reconnect_interval</literal>
</entry>
<entry>
- True, False
+ integer representing time in seconds
</entry>
<entry>
- Indicates whether the link survives a loss of
- volatile storage e.g. if the broker is restarted.
+ Sets both <literal>reconnection_interval_min</literal> and <literal>reconnection_interval_max</literal> to the same value.
</entry>
</row>
+
<row>
<entry>
- x-declare
+ <literal>heartbeat</literal>
</entry>
<entry>
- A nested map whose values correspond to the valid fields
- of an AMQP 0-10 queue-declare command.
+ integer representing time in seconds
</entry>
<entry>
- These values can be used to customise the subscription
- queue in the case of receiving from an exchange. Note
- however that they are protocol specific.
+ Requests that heartbeats be sent every N seconds. If two
+ successive heartbeats are missed the connection is
+ considered to be lost.
</entry>
</row>
<row>
<entry>
- x-subscribe
+ <literal>protocol</literal>
</entry>
<entry>
- A nested map whose values correspond to the valid fields
- of an AMQP 0-10 message-subscribe command.
+ string
</entry>
<entry>
- These values can be used to customise the subscription.
+ Sets the underlying protocol used. The default option is 'tcp'. To enable ssl, set to 'ssl'. The C++ client additionally supports 'rdma'.
</entry>
</row>
<row>
<entry>
- x-bindings
+ <literal>tcp-nodelay</literal>
</entry>
<entry>
- A nested list each of whose entries is a map that may
- contain fields (queue, exchange, key and arguments)
- describing an AMQP 0-10 binding.
+ boolean
</entry>
<entry>
- These bindings are established during resolution
- independent of the create option. They are considered
- logically part of the linking process rather than of
- node creation.
+ Set tcp no-delay, i.e. disable Nagle algorithm. [C++ only]
</entry>
</row>
- </tbody>
- </tgroup>
+ </tbody>
+ </tgroup>
</table>
</section>
- </section>
-
- <section id="section-address-string-bnf">
- <title>Address String Grammar</title>
-
- <para>This section provides a formal grammar for address strings.</para>
-
- <formalpara>
- <title>Tokens</title>
- <para>The following regular expressions define the tokens used
- to parse address strings:</para></formalpara>
-<programlisting><![CDATA[
-LBRACE: \\{
-RBRACE: \\}
-LBRACK: \\[
-RBRACK: \\]
-COLON: :
-SEMI: ;
-SLASH: /
-COMMA: ,
-NUMBER: [+-]?[0-9]*\\.?[0-9]+
-ID: [a-zA-Z_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?
-STRING: "(?:[^\\\\"]|\\\\.)*"|\'(?:[^\\\\\']|\\\\.)*\'
-ESC: \\\\[^ux]|\\\\x[0-9a-fA-F][0-9a-fA-F]|\\\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]
-SYM: [.#*%@$^!+-]
-WSPACE: [ \\n\\r\\t]+
-]]></programlisting>
-
- <formalpara>
- <title>Grammar</title>
- <para>The formal grammar for addresses is given below:</para>
- </formalpara>
-
- <programlisting><![CDATA[
-address := name [ SLASH subject ] [ ";" options ]
- name := ( part | quoted )+
-subject := ( part | quoted | SLASH )*
- quoted := STRING / ESC
- part := LBRACE / RBRACE / COLON / COMMA / NUMBER / ID / SYM
-options := map
- map := "{" ( keyval ( "," keyval )* )? "}"
- keyval "= ID ":" value
- value := NUMBER / STRING / ID / map / list
- list := "[" ( value ( "," value )* )? "]"
- ]]></programlisting>
-
-
- <formalpara>
- <title>Address String Options</title>
- <para>The address string options map supports the following parameters:</para>
- </formalpara>
-
- <programlisting><![CDATA[
-<name> [ / <subject> ] ; {
- create: always | sender | receiver | never,
- delete: always | sender | receiver | never,
- assert: always | sender | receiver | never,
- mode: browse | consume,
- node: {
- type: queue | topic,
- durable: True | False,
- x-declare: { ... <declare-overrides> ... },
- x-bindings: [<binding_1>, ... <binding_n>]
- },
- link: {
- name: <link-name>,
- durable: True | False,
- reliability: unreliable | at-most-once | at-least-once | exactly-once,
- x-declare: { ... <declare-overrides> ... },
- x-bindings: [<binding_1>, ... <binding_n>],
- x-subscribe: { ... <subscribe-overrides> ... }
- }
-}
-]]></programlisting>
-
-
- <itemizedlist>
- <title>Create, Delete, and Assert Policies</title>
- <para>The create, delete, and assert policies specify who should
- perfom the associated action:</para>
- <listitem><para><emphasis>always</emphasis>: the action is performed by any messaging client</para></listitem>
- <listitem><para><emphasis>sender</emphasis>: the action is only performed by a sender</para></listitem>
- <listitem><para><emphasis>receiver</emphasis>: the action is only performed by a receiver</para></listitem>
- <listitem><para><emphasis>never</emphasis>: the action is never performed (this is the default)</para></listitem>
- </itemizedlist>
-
- <itemizedlist>
- <title>Node-Type</title>
- <para>The node-type is one of:</para>
- <listitem><para><emphasis>topic</emphasis>: in the AMQP 0-10
- mapping, a topic node defaults to the topic exchange, x-declare
- may be used to specify other exchange types</para></listitem>
- <listitem><para><emphasis>queue</emphasis>: this is the default node-type</para></listitem>
- </itemizedlist>
- </section>
-
-
-</section>
-
-<section id="replay">
- <title>Sender Capacity and Replay</title>
-
- <para>The send method of a sender has an optional second parameter
- that controls whether the send call is synchronous or not. A
- synchronous send call will block until the broker has confirmed
- receipt of the message. An asynchronous send call will return
- before the broker confirms receipt of the message, allowing for
- example further send calls to be made without waiting for a
- roundtrip to the broker for each message. This is desirable where
- increased throughput is important.</para>
-
- <para>The sender maintains a list of sent messages whose receipt
- has yet to be confirmed by the broker. The maximum number of such
- messages that it will hold is defined by the capacity of the
- sender, which can be set by the application. If an application
- tries to send with a sender whose capacity is already fully used
- up, the send call will block waiting for capacity regardless of
- the value of the sync flag.</para>
-
- <para>The sender can be queried for the available space (i.e. the
- unused capacity), and for the current count of unsettled messages
- (i.e. those held in the replay list pending confirmation by the
- server). When the unsettled count is zero, all messages on that
- sender have been successfully sent.</para>
-
- <para>If the connection fails and is transparently reconnected
- (see <xref linkend="connection-options"/> for details on how to control
- this feature), the unsettled messages for each sender over that
- connection will be re-transmitted. This provides a transparent
- level of reliability. This feature can be controlled through the
- link's reliability as defined in the address (see
- <xref linkend="table-link-properties"/>). At present only
- at-least-once guarantees are offered. </para>
-</section>
-
-<section id="prefetch">
- <title>Receiver Capacity (Prefetch)</title>
-
- <para>By default, a receiver requests the next message from the
- server in response to each fetch call, resulting in messages being
- sent to the receiver one at a time. As in the case of sending, it
- is often desirable to avoid this roundtrip for each message. This
- can be achieved by allowing the receiver
- to <firstterm>prefetch</firstterm> messages in anticipation of
- fetch calls being made. The receiver needs to be able to store
- these prefetched messages, the number it can hold is controlled by
- the receivers capacity.</para>
-
-</section>
-
-<section id="acknowledgements">
- <title>Acknowledging Received Messages</title>
-
- <para>Applications that receive messages should acknowledge their
- receipt by calling the session's acknowledge method. As in the
- case of sending messages, acknowledged transfer of messages to
- receivers provides at-least-once reliability, which means that the
- loss of the connection or a client crash does not result in lost
- messages; durable messages are not lost even if the broker is
- restarted.
-
- Some cases may not require this however and the reliability can be
- controlled through a link property in the address options (see
- <xref linkend="table-link-properties"/>).</para>
-
- <para>The acknowledge call acknowledges all messages received on
- the session (i.e. all message that have been returned from a fetch
- call on a receiver created on that session).</para>
-
- <para>The acknowledge call also support an optional parameter
- controlling whether the call is synchronous or not. A synchronous
- acknowledge will block until the server has confirmed that it has
- received the acknowledgement. In the asynchronous case, when the
- call returns there is not yet any guarantee that the server has
- received and processed the acknowledgement. The session may be
- queried for the number of unsettled acknowledgements; when that
- count is zero all acknowledgements made for received messages have
- been successful.</para>
-
-</section>
-
-
- <section>
- <title>Receiving Messages from Multiple Sources</title>
-
- <para>A receiver can only read from one source, but many
- programs need to be able to read messages from many sources. In
- the Qpid Messaging API, a program can ask a session for
- the <quote>next receiver</quote>; that is, the receiver that is
- responsible for the next available message. The following
- examples show how this is done in C++, Python, and .NET C#.
- </para>
-
- <para>Note that to use this pattern you must enable prefetching
- for each receiver of interest so that the broker will send
- messages before a fetch call is made. See
- <xref linkend="prefetch"/> for more on this.</para>
-
- <example>
- <title>Receiving Messages from Multiple Sources</title>
-
- <para>C++:</para>
-
- <programlisting><![CDATA[
-Receiver receiver1 = session.createReceiver(address1);
-receiver1.setCapacity(10);
-Receiver receiver2 = session.createReceiver(address2);
-receiver2.setCapacity(10);
-
-Message message = session.nextReceiver().fetch();
-std::cout << message.getContent() << std::endl;
-session.acknowledge(); // acknowledge message receipt
-]]> </programlisting>
-
- <para>Python:</para>
- <programlisting><![CDATA[
-receiver1 = session.receiver(address1)
-receiver1.capacity = 10
-receiver2 = session.receiver(address)
-receiver2.capacity = 10
-message = session.next_receiver().fetch()
-print message.content
-session.acknowledge()
-]]> </programlisting>
-
- <para>.NET C#:</para>
- <programlisting><![CDATA[
-Receiver receiver1 = session.CreateReceiver(address1);
-receiver1.Capacity = 10;
-Receiver receiver2 = session.CreateReceiver(address2);
-receiver2.Capacity = 10;
-
-Message message = new Message();
-message = session.NextReceiver().Fetch();
-Console.WriteLine("{0}", message.GetContent());
-session.Acknowledge();
-]]> </programlisting>
-
- </example>
- </section>
-
- <section>
- <title>Transactions</title>
-
- <para>Sometimes it is useful to be able to group messages
- transfers - sent and/or received - on a session into atomic
- grouping. This can be done be creating the session as
- transactional. On a transactional session sent messages only
- become available at the target address on commit. Likewise any
- received and acknowledged messages are only discarded at their
- source on commit
-
- <footnote><para>Note that this currently is only true for
- messages received using a reliable mode
- e.g. at-least-once. Messages sent by a broker to a receiver in
- unreliable receiver will be discarded immediately regardless of
- transctionality.</para></footnote>
-
- .</para>
-
- <example>
- <title>Transactions</title>
- <para>C++:</para>
- <programlisting><![CDATA[
-Connection connection(broker);
-Session session = connection.createTransactionalSession();
-...
-if (smellsOk())
- session.commit();
-else
- session.rollback();
- ]]></programlisting>
- <para>
- .NET C#:
- </para>
-
-<programlisting>
-Connection connection = new Connection(broker);
-Session session = connection.CreateTransactionalSession();
-...
-if (smellsOk())
- session.Commit();
-else
- session.Rollback();
-</programlisting>
-<!--
- <para>Python</para>
- <programlisting><![CDATA[
-### TODO
- ]]></programlisting>
--->
- </example>
-
- </section>
-
- <section id="connection-options">
- <title>Connection Options</title>
-
- <para>
- Aspects of the connections behaviour can be controlled through
- specifying connection options. For example, connections can be
- configured to automatically reconnect if the connection to a
- broker is lost.
- </para>
-
- <example>
- <title>Specifying Connection Options in C++, Python, and .NET</title>
-
- <para>In C++, these options can be set using <function>Connection::setOption()</function> or by passing in a set of options to the constructor. The options can be passed in as a map or in string form:</para>
-
- <programlisting><![CDATA[
-Connection connection("localhost:5672", "{reconnect: true}");
-try {
- connection.open();
- !!! SNIP !!!
- ]]></programlisting>
-
-<para>or</para>
-
- <programlisting><![CDATA[
-Connection connection("localhost:5672");
-connection.setOption("reconnect", true);
-try {
- connection.open();
- !!! SNIP !!!
- ]]></programlisting>
-
- <para>In Python, these options can be set as attributes of the connection or using named arguments in
- the <function>Connection</function> constructor:</para>
-
- <programlisting><![CDATA[
-connection = Connection("localhost:5672", reconnect=True)
-try:
- connection.open()
- !!! SNIP !!!
- ]]></programlisting>
-
-<para>or</para>
-
- <programlisting><![CDATA[
-connection = Connection("localhost:5672")
-connection.reconnect = True
-try:
- connection.open()
- !!! SNIP !!!
- ]]></programlisting>
- <para>
- In .NET, these options can be set using <function>Connection.SetOption()</function> or by passing in a set of options to the constructor. The options can be passed in as a map or in string form:
- </para>
-
-<programlisting>
-Connection connection= new Connection(&#34;localhost:5672&#34;, &#34;{reconnect: true}&#34;);
-try {
- connection.Open();
- !!! SNIP !!!
-</programlisting>
- <para>
- or
- </para>
-
-<programlisting>
-Connection connection = new Connection(&#34;localhost:5672&#34;);
-connection.SetOption(&#34;reconnect&#34;, true);
-try {
- connection.Open();
- !!! SNIP !!!
-</programlisting>
-
- <para>See the reference documentation for details in each language.</para>
- </example>
-
- <para>The following table lists the supported connection options.</para>
-
- <table pgwide="1">
- <title>Connection Options</title>
- <tgroup cols="3">
- <thead>
- <colspec colnum="1" colwidth="1*"/>
- <colspec colnum="2" colwidth="1*"/>
- <colspec colnum="3" colwidth="3*"/>
- <row>
- <entry>option name</entry>
- <entry>value type</entry>
- <entry>semantics</entry>
- </row>
- </thead>
- <tbody>
-
- <row>
- <entry>
- <literal>username</literal>
- </entry>
- <entry>
- string
- </entry>
- <entry>
- The username to use when authenticating to the broker.
- </entry>
- </row>
- <row>
- <entry>
- <literal>password</literal>
- </entry>
- <entry>
- string
- </entry>
- <entry>
- The password to use when authenticating to the broker.
- </entry>
- </row>
- <row>
- <entry>
- <literal>sasl_mechanisms</literal>
- </entry>
- <entry>
- string
- </entry>
- <entry>
- The specific SASL mechanisms to use with the python
- client when authenticating to the broker. The value
- is a space separated list.
- </entry>
- </row>
-
-
- <row>
- <entry>
- <literal>reconnect</literal>
- </entry>
- <entry>
- boolean
- </entry>
- <entry>
- Transparently reconnect if the connection is lost.
- </entry>
- </row>
- <row>
- <entry>
- <literal>reconnect_timeout</literal>
- </entry>
- <entry>
- integer
- </entry>
- <entry>
- Total number of seconds to continue reconnection attempts before giving up and raising an exception.
- </entry>
- </row>
- <row>
- <entry>
- <literal>reconnect_limit</literal>
- </entry>
- <entry>
- integer
- </entry>
- <entry>
- Maximum number of reconnection attempts before giving up and raising an exception.
- </entry>
- </row>
- <row>
- <entry>
- <literal>reconnect_interval_min</literal>
- </entry>
- <entry>
- integer representing time in seconds
- </entry>
- <entry>
- Minimum number of seconds between reconnection attempts. The first reconnection attempt is made immediately; if that fails, the first reconnection delay is set to the value of <literal>reconnect_interval_min</literal>; if that attempt fails, the reconnect interval increases exponentially until a reconnection attempt succeeds or <literal>reconnect_interval_max</literal> is reached.
- </entry>
- </row>
- <row>
- <entry>
- <literal>reconnect_interval_max</literal>
- </entry>
- <entry>
- integer representing time in seconds
- </entry>
- <entry>
- Maximum reconnect interval.
- </entry>
- </row>
- <row>
- <entry>
- <literal>reconnect_interval</literal>
- </entry>
- <entry>
- integer representing time in seconds
- </entry>
- <entry>
- Sets both <literal>reconnection_interval_min</literal> and <literal>reconnection_interval_max</literal> to the same value.
- </entry>
- </row>
-
- <row>
- <entry>
- <literal>heartbeat</literal>
- </entry>
- <entry>
- integer representing time in seconds
- </entry>
- <entry>
- Requests that heartbeats be sent every N seconds. If two
- successive heartbeats are missed the connection is
- considered to be lost.
- </entry>
- </row>
- <row>
- <entry>
- <literal>protocol</literal>
- </entry>
- <entry>
- string
- </entry>
- <entry>
- Sets the underlying protocol used. The default option is 'tcp'. To enable ssl, set to 'ssl'. The C++ client additionally supports 'rdma'.
- </entry>
- </row>
- <row>
- <entry>
- <literal>tcp-nodelay</literal>
- </entry>
- <entry>
- boolean
- </entry>
- <entry>
- Set tcp no-delay, i.e. disable Nagle algorithm. [C++ only]
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- </section>
<section id="section-Maps">
<title>Maps and Lists in Message Content</title>
@@ -1877,57 +1877,57 @@ try {
<footnote><para>Unlike JMS, there is not a specific message type for
map messages.</para></footnote>
- <footnote>
- <para>
- Note that the Qpid JMS client supports MapMessages whose values can be nested maps or lists. This is not standard JMS behaviour.
- </para>
- </footnote>
- Specific language support for <classname>map</classname> and <classname>list</classname> objects are shown in the following table.
- </para>
- <table id="tabl-Programming_in_Apache_Qpid-Qpid_Maps_in_Message_Content">
- <title>Map and List Representation in Supported Languages</title>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>Language</entry>
- <entry>map</entry>
- <entry>list</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>Python</entry>
- <entry><classname>dict</classname></entry>
- <entry><classname>list</classname></entry>
- </row>
- <row>
- <entry>C++</entry>
- <entry><classname>Variant::Map</classname></entry>
- <entry><classname>Variant::List</classname></entry>
- </row>
- <row>
- <entry>Java</entry>
- <entry><classname>MapMessage</classname></entry>
- <entry><classname>&nbsp;</classname></entry>
- </row>
- <row>
- <entry>.NET</entry>
- <entry><classname>Dictionary&#60;string, object&#62;</classname></entry>
- <entry><classname>Collection&#60;object&#62;</classname></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <para>
- In all languages, messages are encoded using AMQP&#39;s portable datatypes.
+ <footnote>
+ <para>
+ Note that the Qpid JMS client supports MapMessages whose values can be nested maps or lists. This is not standard JMS behaviour.
+ </para>
+ </footnote>
+ Specific language support for <classname>map</classname> and <classname>list</classname> objects are shown in the following table.
+ </para>
+ <table id="tabl-Programming_in_Apache_Qpid-Qpid_Maps_in_Message_Content">
+ <title>Map and List Representation in Supported Languages</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Language</entry>
+ <entry>map</entry>
+ <entry>list</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Python</entry>
+ <entry><classname>dict</classname></entry>
+ <entry><classname>list</classname></entry>
+ </row>
+ <row>
+ <entry>C++</entry>
+ <entry><classname>Variant::Map</classname></entry>
+ <entry><classname>Variant::List</classname></entry>
+ </row>
+ <row>
+ <entry>Java</entry>
+ <entry><classname>MapMessage</classname></entry>
+ <entry><classname>&nbsp;</classname></entry>
+ </row>
+ <row>
+ <entry>.NET</entry>
+ <entry><classname>Dictionary&#60;string, object&#62;</classname></entry>
+ <entry><classname>Collection&#60;object&#62;</classname></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ In all languages, messages are encoded using AMQP&#39;s portable datatypes.
</para>
<tip>
- <para>Because of the differences in type systems among
- languages, the simplest way to provide portable messages is to
- rely on maps, lists, strings, 64 bit signed integers, and
- doubles for messages that need to be exchanged across languages
- and platforms.</para>
+ <para>Because of the differences in type systems among
+ languages, the simplest way to provide portable messages is to
+ rely on maps, lists, strings, 64 bit signed integers, and
+ doubles for messages that need to be exchanged across languages
+ and platforms.</para>
</tip>
<section id="section-Python-Maps">
@@ -1938,55 +1938,55 @@ try {
<example>
<title>Sending Qpid Maps and Lists in Python</title>
<programlisting><![CDATA[
-from qpid.messaging import *
-# !!! SNIP !!!
-
-content = {'Id' : 987654321, 'name' : 'Widget', 'percent' : 0.99}
-content['colours'] = ['red', 'green', 'white']
-content['dimensions'] = {'length' : 10.2, 'width' : 5.1,'depth' : 2.0};
-content['parts'] = [ [1,2,5], [8,2,5] ]
-content['specs'] = {'colors' : content['colours'],
- 'dimensions' : content['dimensions'],
- 'parts' : content['parts'] }
-message = Message(content=content)
-sender.send(message)
- ]]> </programlisting>
+ from qpid.messaging import *
+ # !!! SNIP !!!
+
+ content = {'Id' : 987654321, 'name' : 'Widget', 'percent' : 0.99}
+ content['colours'] = ['red', 'green', 'white']
+ content['dimensions'] = {'length' : 10.2, 'width' : 5.1,'depth' : 2.0};
+ content['parts'] = [ [1,2,5], [8,2,5] ]
+ content['specs'] = {'colors' : content['colours'],
+ 'dimensions' : content['dimensions'],
+ 'parts' : content['parts'] }
+ message = Message(content=content)
+ sender.send(message)
+ ]]> </programlisting>
</example>
- <para>The following table shows the datatypes that can be sent in a Python map message,
- and the corresponding datatypes that will be received by clients in Java or C++.</para>
+ <para>The following table shows the datatypes that can be sent in a Python map message,
+ and the corresponding datatypes that will be received by clients in Java or C++.</para>
<table id="table-Python-Maps" >
- <title>Python Datatypes in Maps</title>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>Python Datatype</entry>
- <entry>&rarr; C++</entry>
- <entry>&rarr; Java</entry>
- </row>
- </thead>
- <tbody>
- <row><entry>bool</entry><entry>bool</entry><entry>boolean</entry></row>
- <row><entry>int</entry><entry>int64</entry><entry>long</entry></row>
- <row><entry>long</entry><entry>int64</entry><entry>long</entry></row>
- <row><entry>float</entry><entry>double</entry><entry>double</entry></row>
- <row><entry>unicode</entry><entry>string</entry><entry>java.lang.String</entry></row>
- <row><entry>uuid</entry><entry>qpid::types::Uuid</entry><entry>java.util.UUID</entry></row>
- <row><entry>dict</entry><entry>Variant::Map</entry><entry>java.util.Map</entry></row>
- <row><entry>list</entry><entry>Variant::List</entry><entry>java.util.List</entry></row>
- </tbody>
- </tgroup>
- </table>
+ <title>Python Datatypes in Maps</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>Python Datatype</entry>
+ <entry>&rarr; C++</entry>
+ <entry>&rarr; Java</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row><entry>bool</entry><entry>bool</entry><entry>boolean</entry></row>
+ <row><entry>int</entry><entry>int64</entry><entry>long</entry></row>
+ <row><entry>long</entry><entry>int64</entry><entry>long</entry></row>
+ <row><entry>float</entry><entry>double</entry><entry>double</entry></row>
+ <row><entry>unicode</entry><entry>string</entry><entry>java.lang.String</entry></row>
+ <row><entry>uuid</entry><entry>qpid::types::Uuid</entry><entry>java.util.UUID</entry></row>
+ <row><entry>dict</entry><entry>Variant::Map</entry><entry>java.util.Map</entry></row>
+ <row><entry>list</entry><entry>Variant::List</entry><entry>java.util.List</entry></row>
+ </tbody>
+ </tgroup>
+ </table>
</section>
- <section id="section-cpp-Maps">
+ <section id="section-cpp-Maps">
<title>Qpid Maps and Lists in C++</title>
@@ -1998,52 +1998,52 @@ sender.send(message)
<example>
<title>Sending Qpid Maps and Lists in C++</title>
- <programlisting><![CDATA[
-using namespace qpid::types;
-
-// !!! SNIP !!!
-
-Message message;
-Variant::Map content;
-content["id"] = 987654321;
-content["name"] = "Widget";
-content["percent"] = 0.99;
-Variant::List colours;
-colours.push_back(Variant("red"));
-colours.push_back(Variant("green"));
-colours.push_back(Variant("white"));
-content["colours"] = colours;
-
-Variant::Map dimensions;
-dimensions["length"] = 10.2;
-dimensions["width"] = 5.1;
-dimensions["depth"] = 2.0;
-content["dimensions"]= dimensions;
-
-Variant::List part1;
-part1.push_back(Variant(1));
-part1.push_back(Variant(2));
-part1.push_back(Variant(5));
-
-Variant::List part2;
-part2.push_back(Variant(8));
-part2.push_back(Variant(2));
-part2.push_back(Variant(5));
-
-Variant::List parts;
-parts.push_back(part1);
-parts.push_back(part2);
-content["parts"]= parts;
-
-Variant::Map specs;
-specs["colours"] = colours;
-specs["dimensions"] = dimensions;
-specs["parts"] = parts;
-content["specs"] = specs;
-
-encode(content, message);
-sender.send(message, true);
-]]> </programlisting>
+ <programlisting><![CDATA[
+ using namespace qpid::types;
+
+ // !!! SNIP !!!
+
+ Message message;
+ Variant::Map content;
+ content["id"] = 987654321;
+ content["name"] = "Widget";
+ content["percent"] = 0.99;
+ Variant::List colours;
+ colours.push_back(Variant("red"));
+ colours.push_back(Variant("green"));
+ colours.push_back(Variant("white"));
+ content["colours"] = colours;
+
+ Variant::Map dimensions;
+ dimensions["length"] = 10.2;
+ dimensions["width"] = 5.1;
+ dimensions["depth"] = 2.0;
+ content["dimensions"]= dimensions;
+
+ Variant::List part1;
+ part1.push_back(Variant(1));
+ part1.push_back(Variant(2));
+ part1.push_back(Variant(5));
+
+ Variant::List part2;
+ part2.push_back(Variant(8));
+ part2.push_back(Variant(2));
+ part2.push_back(Variant(5));
+
+ Variant::List parts;
+ parts.push_back(part1);
+ parts.push_back(part2);
+ content["parts"]= parts;
+
+ Variant::Map specs;
+ specs["colours"] = colours;
+ specs["dimensions"] = dimensions;
+ specs["parts"] = parts;
+ content["specs"] = specs;
+
+ encode(content, message);
+ sender.send(message, true);
+ ]]> </programlisting>
</example>
<para>The following table shows the datatypes that can be sent
@@ -2051,32 +2051,32 @@ sender.send(message, true);
will be received by clients in Java and Python.</para>
<table id="table-cpp-Maps">
- <title>C++ Datatypes in Maps</title>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>C++ Datatype</entry>
- <entry>&rarr; Python</entry>
- <entry>&rarr; Java</entry>
- </row>
- </thead>
- <tbody>
- <row><entry>bool</entry><entry>bool</entry><entry>boolean</entry></row>
- <row><entry>uint16</entry><entry>int | long</entry><entry>short</entry></row>
- <row><entry>uint32</entry><entry>int | long</entry><entry>int</entry></row>
- <row><entry>uint64</entry><entry>int | long</entry><entry>long</entry></row>
- <row><entry>int16</entry><entry>int | long</entry><entry>short</entry></row>
- <row><entry>int32</entry><entry>int | long</entry><entry>int</entry></row>
- <row><entry>int64</entry><entry>int | long</entry><entry>long</entry></row>
- <row><entry>float</entry><entry>float</entry><entry>float</entry></row>
- <row><entry>double</entry><entry>float</entry><entry>double</entry></row>
- <row><entry>string</entry><entry>unicode</entry><entry>java.lang.String</entry></row>
- <row><entry>qpid::types::Uuid</entry><entry>uuid</entry><entry>java.util.UUID</entry></row>
- <row><entry>Variant::Map</entry><entry>dict</entry><entry>java.util.Map</entry></row>
- <row><entry>Variant::List</entry><entry>list</entry><entry>java.util.List</entry></row>
- </tbody>
- </tgroup>
- </table>
+ <title>C++ Datatypes in Maps</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>C++ Datatype</entry>
+ <entry>&rarr; Python</entry>
+ <entry>&rarr; Java</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row><entry>bool</entry><entry>bool</entry><entry>boolean</entry></row>
+ <row><entry>uint16</entry><entry>int | long</entry><entry>short</entry></row>
+ <row><entry>uint32</entry><entry>int | long</entry><entry>int</entry></row>
+ <row><entry>uint64</entry><entry>int | long</entry><entry>long</entry></row>
+ <row><entry>int16</entry><entry>int | long</entry><entry>short</entry></row>
+ <row><entry>int32</entry><entry>int | long</entry><entry>int</entry></row>
+ <row><entry>int64</entry><entry>int | long</entry><entry>long</entry></row>
+ <row><entry>float</entry><entry>float</entry><entry>float</entry></row>
+ <row><entry>double</entry><entry>float</entry><entry>double</entry></row>
+ <row><entry>string</entry><entry>unicode</entry><entry>java.lang.String</entry></row>
+ <row><entry>qpid::types::Uuid</entry><entry>uuid</entry><entry>java.util.UUID</entry></row>
+ <row><entry>Variant::Map</entry><entry>dict</entry><entry>java.util.Map</entry></row>
+ <row><entry>Variant::List</entry><entry>list</entry><entry>java.util.List</entry></row>
+ </tbody>
+ </tgroup>
+ </table>
</section>
<section id="section-dotnet-Maps">
@@ -2090,74 +2090,74 @@ sender.send(message, true);
</para>
<example>
- <?dbfo keep-together="auto" ?>
+ <?dbfo keep-together="auto" ?>
<title>Sending Qpid Maps and Lists in .NET C#</title>
- <programlisting><![CDATA[
-using System;
-using Org.Apache.Qpid.Messaging;
+ <programlisting><![CDATA[
+ using System;
+ using Org.Apache.Qpid.Messaging;
-// !!! SNIP !!!
+ // !!! SNIP !!!
-Dictionary<string, object> content = new Dictionary<string, object>();
-Dictionary<string, object> subMap = new Dictionary<string, object>();
-Collection<object> colors = new Collection<object>();
+ Dictionary<string, object> content = new Dictionary<string, object>();
+ Dictionary<string, object> subMap = new Dictionary<string, object>();
+ Collection<object> colors = new Collection<object>();
-// add simple types
-content["id"] = 987654321;
-content["name"] = "Widget";
-content["percent"] = 0.99;
+ // add simple types
+ content["id"] = 987654321;
+ content["name"] = "Widget";
+ content["percent"] = 0.99;
-// add nested amqp/map
-subMap["name"] = "Smith";
-subMap["number"] = 354;
-content["nestedMap"] = subMap;
+ // add nested amqp/map
+ subMap["name"] = "Smith";
+ subMap["number"] = 354;
+ content["nestedMap"] = subMap;
-// add an amqp/list
-colors.Add("red");
-colors.Add("green");
-colors.Add("white");
-content["colorsList"] = colors;
+ // add an amqp/list
+ colors.Add("red");
+ colors.Add("green");
+ colors.Add("white");
+ content["colorsList"] = colors;
-// add one of each supported amqp data type
-bool mybool = true;
-content["mybool"] = mybool;
+ // add one of each supported amqp data type
+ bool mybool = true;
+ content["mybool"] = mybool;
-byte mybyte = 4;
-content["mybyte"] = mybyte;
+ byte mybyte = 4;
+ content["mybyte"] = mybyte;
-UInt16 myUInt16 = 5;
-content["myUInt16"] = myUInt16;
+ UInt16 myUInt16 = 5;
+ content["myUInt16"] = myUInt16;
-UInt32 myUInt32 = 6;
-content["myUInt32"] = myUInt32;
+ UInt32 myUInt32 = 6;
+ content["myUInt32"] = myUInt32;
-UInt64 myUInt64 = 7;
-content["myUInt64"] = myUInt64;
+ UInt64 myUInt64 = 7;
+ content["myUInt64"] = myUInt64;
-char mychar = 'h';
-content["mychar"] = mychar;
+ char mychar = 'h';
+ content["mychar"] = mychar;
-Int16 myInt16 = 9;
-content["myInt16"] = myInt16;
+ Int16 myInt16 = 9;
+ content["myInt16"] = myInt16;
-Int32 myInt32 = 10;
-content["myInt32"] = myInt32;
+ Int32 myInt32 = 10;
+ content["myInt32"] = myInt32;
-Int64 myInt64 = 11;
-content["myInt64"] = myInt64;
+ Int64 myInt64 = 11;
+ content["myInt64"] = myInt64;
-Single mySingle = (Single)12.12;
-content["mySingle"] = mySingle;
+ Single mySingle = (Single)12.12;
+ content["mySingle"] = mySingle;
-Double myDouble = 13.13;
-content["myDouble"] = myDouble;
+ Double myDouble = 13.13;
+ content["myDouble"] = myDouble;
-Guid myGuid = new Guid("000102030405060708090a0b0c0d0e0f");
-content["myGuid"] = myGuid;
+ Guid myGuid = new Guid("000102030405060708090a0b0c0d0e0f");
+ content["myGuid"] = myGuid;
-Message message = new Message(content);
-Send(message, true);
-]]> </programlisting>
+ Message message = new Message(content);
+ Send(message, true);
+ ]]> </programlisting>
</example>
<para>
@@ -2165,45 +2165,45 @@ Send(message, true);
</para>
<table id="table-dotnet-Maps">
- <title>Datatype Mapping between C++ and .NET binding</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>C++ Datatype</entry>
- <entry>&rarr; .NET binding</entry>
- </row>
- </thead>
- <tbody>
- <row><entry>void</entry><entry>nullptr</entry></row>
- <row><entry>bool</entry><entry>bool</entry></row>
- <row><entry>uint8</entry><entry>byte</entry></row>
- <row><entry>uint16</entry><entry>UInt16</entry></row>
- <row><entry>uint32</entry><entry>UInt32</entry></row>
- <row><entry>uint64</entry><entry>UInt64</entry></row>
- <row><entry>uint8</entry><entry>char</entry></row>
- <row><entry>int16</entry><entry>Int16</entry></row>
- <row><entry>int32</entry><entry>Int32</entry></row>
- <row><entry>int64</entry><entry>Int64</entry></row>
- <row><entry>float</entry><entry>Single</entry></row>
- <row><entry>double</entry><entry>Double</entry></row>
- <row><entry>string</entry><entry>string
- <footnote id="callout-dotnet-string">
- <para>Strings are currently interpreted only with UTF-8 encoding.</para>
- </footnote></entry></row>
- <row><entry>qpid::types::Uuid</entry><entry>Guid</entry></row>
- <row><entry>Variant::Map</entry><entry><![CDATA[Dictionary<string, object>]]>
- <footnoteref linkend="callout-dotnet-string"/></entry></row>
- <row><entry>Variant::List</entry><entry><![CDATA[Collection<object>]]>
- <footnoteref linkend="callout-dotnet-string"/></entry></row>
- </tbody>
- </tgroup>
- </table>
-
-
- </section>
-
-
-</section>
+ <title>Datatype Mapping between C++ and .NET binding</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>C++ Datatype</entry>
+ <entry>&rarr; .NET binding</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row><entry>void</entry><entry>nullptr</entry></row>
+ <row><entry>bool</entry><entry>bool</entry></row>
+ <row><entry>uint8</entry><entry>byte</entry></row>
+ <row><entry>uint16</entry><entry>UInt16</entry></row>
+ <row><entry>uint32</entry><entry>UInt32</entry></row>
+ <row><entry>uint64</entry><entry>UInt64</entry></row>
+ <row><entry>uint8</entry><entry>char</entry></row>
+ <row><entry>int16</entry><entry>Int16</entry></row>
+ <row><entry>int32</entry><entry>Int32</entry></row>
+ <row><entry>int64</entry><entry>Int64</entry></row>
+ <row><entry>float</entry><entry>Single</entry></row>
+ <row><entry>double</entry><entry>Double</entry></row>
+ <row><entry>string</entry><entry>string
+ <footnote id="callout-dotnet-string">
+ <para>Strings are currently interpreted only with UTF-8 encoding.</para>
+ </footnote></entry></row>
+ <row><entry>qpid::types::Uuid</entry><entry>Guid</entry></row>
+ <row><entry>Variant::Map</entry><entry><![CDATA[Dictionary<string, object>]]>
+ <footnoteref linkend="callout-dotnet-string"/></entry></row>
+ <row><entry>Variant::List</entry><entry><![CDATA[Collection<object>]]>
+ <footnoteref linkend="callout-dotnet-string"/></entry></row>
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ </section>
+
+
+ </section>
<section>
<title>The Request / Response Pattern</title>
@@ -2230,15 +2230,15 @@ Send(message, true);
<programlisting><![CDATA[Receiver receiver = session.createReceiver("service_queue; {create: always}");
-Message request = receiver.fetch();
-const Address&amp; address = request.getReplyTo(); // Get "reply-to" from request ...
-if (address) {
- Sender sender = session.createSender(address); // ... send response to "reply-to"
- Message response("pong!");
- sender.send(response);
- session.acknowledge();
-}
- ]]></programlisting>
+ Message request = receiver.fetch();
+ const Address&amp; address = request.getReplyTo(); // Get "reply-to" from request ...
+ if (address) {
+ Sender sender = session.createSender(address); // ... send response to "reply-to"
+ Message response("pong!");
+ sender.send(response);
+ session.acknowledge();
+ }
+ ]]></programlisting>
<para>The client creates a sender for the service queue, and
also creates a response queue that is deleted when the
@@ -2247,18 +2247,18 @@ if (address) {
<literal>#</literal>, it is given a unique name.</para>
<programlisting><![CDATA[
-Sender sender = session.createSender("service_queue");
+ Sender sender = session.createSender("service_queue");
-Address responseQueue("#response-queue; {create:always, delete:always}");
-Receiver receiver = session.createReceiver(responseQueue);
+ Address responseQueue("#response-queue; {create:always, delete:always}");
+ Receiver receiver = session.createReceiver(responseQueue);
-Message request;
-request.setReplyTo(responseQueue);
-request.setContent("ping");
-sender.send(request);
-Message response = receiver.fetch();
-std::cout << request.getContent() << " -> " << response.getContent() << std::endl;
-]]> </programlisting>
+ Message request;
+ request.setReplyTo(responseQueue);
+ request.setContent("ping");
+ sender.send(request);
+ Message response = receiver.fetch();
+ std::cout << request.getContent() << " -> " << response.getContent() << std::endl;
+ ]]> </programlisting>
<para>The client sends the string <literal>ping</literal> to
the server. The server sends the response
@@ -2266,12 +2266,12 @@ std::cout << request.getContent() << " -> " << response.getContent() << std::end
<varname>replyTo</varname> property.</para>
</example>
-<!--
- <example>
- <title>Request / Response Applications in Python</title>
- <programlisting>### TODO</programlisting>
- </example>
--->
+ <!--
+ <example>
+ <title>Request / Response Applications in Python</title>
+ <programlisting>### TODO</programlisting>
+ </example>
+ -->
</section>
@@ -2279,109 +2279,109 @@ std::cout << request.getContent() << " -> " << response.getContent() << std::end
<title>Performance Tips</title>
<itemizedlist>
- <listitem>
+ <listitem>
<para>Consider prefetching messages for receivers (see
<xref linkend="prefetch"/>). This helps eliminate roundtrips
and increases throughput. Prefetch is disabled by default,
and enabling it is the most effective means of improving
throughput of received messages.</para>
- </listitem>
- <listitem>
+ </listitem>
+ <listitem>
<para>Send messages asynchronously. Again, this helps
eliminate roundtrips and increases throughput. The C++ and
.NET clients send asynchronously by default, however the
python client defaults to synchronous sends. </para>
- </listitem>
- <listitem>
+ </listitem>
+ <listitem>
<para>Acknowledge messages in batches (see
<xref linkend="acknowledgements"/>). Rather than
acknowledging each message individually, consider issuing
acknowledgements after n messages and/or after a particular
duration has elapsed.</para>
- </listitem>
- <listitem>
+ </listitem>
+ <listitem>
<para>Tune the sender capacity (see
<xref linkend="replay"/>). If the capacity is too low the
sender may block waiting for the broker to confirm receipt
of messages, before it can free up more capacity.</para>
- </listitem>
- <listitem>
+ </listitem>
+ <listitem>
<para>If you are setting a reply-to address on messages
being sent by the c++ client, make sure the address type is
set to either queue or topic as appropriate. This avoids the
client having to determine which type of node is being
refered to, which is required when hanling reply-to in AMQP
0-10. </para>
- </listitem>
- <listitem>
- <para>For latency sensitive applications, setting tcp-nodelay
- on qpidd and on client connections can help reduce the
- latency.</para>
- </listitem>
+ </listitem>
+ <listitem>
+ <para>For latency sensitive applications, setting tcp-nodelay
+ on qpidd and on client connections can help reduce the
+ latency.</para>
+ </listitem>
</itemizedlist>
</section>
- <section>
- <title>Cluster Failover</title>
+ <section>
+ <title>Cluster Failover</title>
- <para>The messaging broker can be run in clustering mode, which provides high reliability through replicating state between brokers in the cluster. If one broker in a cluster fails, clients can choose another broker in the cluster and continue their work. Each broker in the cluster also advertises the addresses of all known brokers
+ <para>The messaging broker can be run in clustering mode, which provides high reliability through replicating state between brokers in the cluster. If one broker in a cluster fails, clients can choose another broker in the cluster and continue their work. Each broker in the cluster also advertises the addresses of all known brokers
-<footnote><para>This is done via the amq.failover exchange in AMQP 0-10</para></footnote>
+ <footnote><para>This is done via the amq.failover exchange in AMQP 0-10</para></footnote>
-. A client can use this information to dynamically keep the list of reconnection urls up to date.</para>
+ . A client can use this information to dynamically keep the list of reconnection urls up to date.</para>
- <para>In C++, the <classname>FailoverUpdates</classname> class provides this functionality:</para>
+ <para>In C++, the <classname>FailoverUpdates</classname> class provides this functionality:</para>
- <example>
- <title>Tracking cluster membership</title>
+ <example>
+ <title>Tracking cluster membership</title>
- <para>In C++:</para>
+ <para>In C++:</para>
- <programlisting><![CDATA[
-#include <qpid/messaging/FailoverUpdates.h>
-...
-Connection connection("localhost:5672");
-connection.setOption("reconnect", true);
-try {
- connection.open();
- std::auto_ptr<FailoverUpdates> updates(new FailoverUpdates(connection));
-]]>
+ <programlisting><![CDATA[
+ #include <qpid/messaging/FailoverUpdates.h>
+ ...
+ Connection connection("localhost:5672");
+ connection.setOption("reconnect", true);
+ try {
+ connection.open();
+ std::auto_ptr<FailoverUpdates> updates(new FailoverUpdates(connection));
+ ]]>
</programlisting>
- <para>In python:</para>
+ <para>In python:</para>
- <programlisting><![CDATA[
-import qpid.messaging.util
-...
-connection = Connection("localhost:5672")
-connection.reconnect = True
-try:
- connection.open()
- auto_fetch_reconnect_urls(connection)
-]]>
+ <programlisting><![CDATA[
+ import qpid.messaging.util
+ ...
+ connection = Connection("localhost:5672")
+ connection.reconnect = True
+ try:
+ connection.open()
+ auto_fetch_reconnect_urls(connection)
+ ]]>
</programlisting>
- <para>
- In .NET C#:
- </para>
+ <para>
+ In .NET C#:
+ </para>
-<programlisting>
-using Org.Apache.Qpid.Messaging;
-...
-connection = new Connection(&#34;localhost:5672&#34;);
-connection.SetOption("reconnect", true);
-try {
- connection.Open();
- FailoverUpdates failover = new FailoverUpdates(connection);
+ <programlisting>
+ using Org.Apache.Qpid.Messaging;
+ ...
+ connection = new Connection(&#34;localhost:5672&#34;);
+ connection.SetOption("reconnect", true);
+ try {
+ connection.Open();
+ FailoverUpdates failover = new FailoverUpdates(connection);
-</programlisting>
+ </programlisting>
- </example>
- </section>
+ </example>
+ </section>
-<section>
+ <section>
<title>Logging</title>
<para>To simplify debugging, Qpid provides a logging facility
@@ -2389,72 +2389,72 @@ try {
<section>
<title>Logging in C++</title>
- <para>
- The Qpidd broker and C++ clients can both use environment variables to enable logging. Linux and Windows systems use the same named environment variables and values.
- </para>
- <para>Use QPID_LOG_ENABLE to set the level of logging you are interested in (trace, debug, info, notice, warning, error, or critical):
- </para>
+ <para>
+ The Qpidd broker and C++ clients can both use environment variables to enable logging. Linux and Windows systems use the same named environment variables and values.
+ </para>
+ <para>Use QPID_LOG_ENABLE to set the level of logging you are interested in (trace, debug, info, notice, warning, error, or critical):
+ </para>
-<screen>
-export QPID_LOG_ENABLE=&#34;warning+&#34;
-</screen>
- <para>
- The Qpidd broker and C++ clients use QPID_LOG_OUTPUT to determine where logging output should be sent. This is either a file name or the special values stderr, stdout, or syslog:
- </para>
+ <screen>
+ export QPID_LOG_ENABLE=&#34;warning+&#34;
+ </screen>
+ <para>
+ The Qpidd broker and C++ clients use QPID_LOG_OUTPUT to determine where logging output should be sent. This is either a file name or the special values stderr, stdout, or syslog:
+ </para>
-<screen>
-export QPID_LOG_TO_FILE=&#34;/tmp/myclient.out&#34;
-</screen>
+ <screen>
+ export QPID_LOG_TO_FILE=&#34;/tmp/myclient.out&#34;
+ </screen>
- <para>
- From a Windows command prompt, use the following command format to set the environment variables:
- </para>
+ <para>
+ From a Windows command prompt, use the following command format to set the environment variables:
+ </para>
-<screen>
-set QPID_LOG_ENABLE=warning+
-set QPID_LOG_TO_FILE=D:\tmp\myclient.out
-</screen>
- </section>
+ <screen>
+ set QPID_LOG_ENABLE=warning+
+ set QPID_LOG_TO_FILE=D:\tmp\myclient.out
+ </screen>
+ </section>
- <section>
- <title>Logging in Python</title>
- <para>
- The Python client library supports logging using the standard Python logging module. The easiest way to do logging is to use the <command>basicConfig()</command>, which reports all warnings and errors:
- </para>
+ <section>
+ <title>Logging in Python</title>
+ <para>
+ The Python client library supports logging using the standard Python logging module. The easiest way to do logging is to use the <command>basicConfig()</command>, which reports all warnings and errors:
+ </para>
-<programlisting>from logging import basicConfig
-basicConfig()
-</programlisting>
- <para>
- Qpidd also provides a convenience method that makes it easy to specify the level of logging desired. For instance, the following code enables logging at the <command>DEBUG</command> level:
- </para>
+ <programlisting>from logging import basicConfig
+ basicConfig()
+ </programlisting>
+ <para>
+ Qpidd also provides a convenience method that makes it easy to specify the level of logging desired. For instance, the following code enables logging at the <command>DEBUG</command> level:
+ </para>
-<programlisting>from qpid.log import enable, DEBUG
-enable("qpid.messaging.io", DEBUG)
-</programlisting>
- <para>
- For more information on Python logging, see <ulink url="http://docs.python.org/lib/node425.html">http://docs.python.org/lib/node425.html</ulink>. For more information on Qpid logging, use <command>$ pydoc qpid.log</command>.
- </para>
- </section>
-</section>
+ <programlisting>from qpid.log import enable, DEBUG
+ enable("qpid.messaging.io", DEBUG)
+ </programlisting>
+ <para>
+ For more information on Python logging, see <ulink url="http://docs.python.org/lib/node425.html">http://docs.python.org/lib/node425.html</ulink>. For more information on Qpid logging, use <command>$ pydoc qpid.log</command>.
+ </para>
+ </section>
+ </section>
- <section id="section-amqp0-10-mapping">
- <title>The AMQP 0-10 mapping</title>
+ <section id="section-amqp0-10-mapping">
+ <title>The AMQP 0-10 mapping</title>
- <para>
- This section describes the AMQP 0-10 mapping for the Qpid
- Messaging API.
- </para>
- <para>
+ <para>
+ This section describes the AMQP 0-10 mapping for the Qpid
+ Messaging API.
+ </para>
+ <para>
The interaction with the broker triggered by creating a sender
or receiver depends on what the specified address resolves
to. Where the node type is not specified in the address, the
client queries the broker to determine whether it refers to a
queue or an exchange.
- </para>
- <para>
+ </para>
+ <para>
When sending to a queue, the queue's name is set as the
routing key and the message is transfered to the default (or
nameless) exchange. When sending to an exchange, the message
@@ -2571,13 +2571,13 @@ enable("qpid.messaging.io", DEBUG)
</para>
<para>The following table shows how Qpid Messaging API message
- properties are mapped to AMQP 0-10 message properties and
- delivery properties. In this table <varname>msg</varname>
- refers to the Message class defined in the Qpid Messaging API,
- <varname>mp</varname> refers to an AMQP 0-10
- <varname>message-properties</varname> struct, and
- <varname>dp</varname> refers to an AMQP 0-10
- <varname>delivery-properties</varname> struct.</para>
+ properties are mapped to AMQP 0-10 message properties and
+ delivery properties. In this table <varname>msg</varname>
+ refers to the Message class defined in the Qpid Messaging API,
+ <varname>mp</varname> refers to an AMQP 0-10
+ <varname>message-properties</varname> struct, and
+ <varname>dp</varname> refers to an AMQP 0-10
+ <varname>delivery-properties</varname> struct.</para>
<table id="table-amqp0-10-message-properties" pgwide="1">
<title>Mapping to AMQP 0-10 Message Properties</title>
@@ -2589,13 +2589,13 @@ enable("qpid.messaging.io", DEBUG)
<row>
<entry>Python API</entry>
<entry>C++ API
- <footnote>
- <para>
- The .NET Binding for C++ Messaging provides all the
- message and delivery properties described in the C++ API.
- See <xref linkend="table-Dotnet-Binding-Message" /> .
- </para>
- </footnote>
+ <footnote>
+ <para>
+ The .NET Binding for C++ Messaging provides all the
+ message and delivery properties described in the C++ API.
+ See <xref linkend="table-Dotnet-Binding-Message" /> .
+ </para>
+ </footnote>
</entry>
<entry>AMQP 0-10 Property<footnote><para>In these entries, <literal>mp</literal> refers to an AMQP message property, and <literal>dp</literal> refers to an AMQP delivery property.</para></footnote></entry>
</row>
@@ -2693,12 +2693,12 @@ enable("qpid.messaging.io", DEBUG)
a received message.
</para>
<programlisting lang="python">
-try:
- msg = receiver.fetch(timeout=1)
- if "x-amqp-0-10.timestamp" in msg.properties:
- print("Timestamp=%s" % str(msg.properties["x-amqp-0-10.timestamp"]))
-except Empty:
- pass
+ try:
+ msg = receiver.fetch(timeout=1)
+ if "x-amqp-0-10.timestamp" in msg.properties:
+ print("Timestamp=%s" % str(msg.properties["x-amqp-0-10.timestamp"]))
+ except Empty:
+ pass
</programlisting>
</example>
<example>
@@ -2707,12 +2707,12 @@ except Empty:
The same example, except in C++.
</para>
<programlisting lang="c++">
-messaging::Message msg;
-if (receiver.fetch(msg, messaging::Duration::SECOND*1)) {
- if (msg.getProperties().find("x-amqp-0-10.timestamp") != msg.getProperties().end()) {
- <![CDATA[std::cout << "Timestamp=" << msg.getProperties()["x-amqp-0-10.timestamp"].asString() << std::endl;]]>
- }
-}
+ messaging::Message msg;
+ if (receiver.fetch(msg, messaging::Duration::SECOND*1)) {
+ if (msg.getProperties().find("x-amqp-0-10.timestamp") != msg.getProperties().end()) {
+ <![CDATA[std::cout << "Timestamp=" << msg.getProperties()["x-amqp-0-10.timestamp"].asString() << std::endl;]]>
+ }
+ }
</programlisting>
</example>
</section>
@@ -2745,54 +2745,54 @@ if (receiver.fetch(msg, messaging::Duration::SECOND*1)) {
<example>
<title>"Hello world!" in Java</title>
<programlisting lang="java">
-package org.apache.qpid.example.jmsexample.hello;
+ package org.apache.qpid.example.jmsexample.hello;
-import javax.jms.*;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import java.util.Properties;
+ import javax.jms.*;
+ import javax.naming.Context;
+ import javax.naming.InitialContext;
+ import java.util.Properties;
-public class Hello {
+ public class Hello {
- public Hello() {
- }
+ public Hello() {
+ }
- public static void main(String[] args) {
- Hello producer = new Hello();
- producer.runTest();
- }
+ public static void main(String[] args) {
+ Hello producer = new Hello();
+ producer.runTest();
+ }
- private void runTest() {
- try {
- Properties properties = new Properties();
- properties.load(this.getClass().getResourceAsStream("hello.properties")); <co id="hello-java-properties" linkends="callout-java-properties"/>
- Context context = new InitialContext(properties); <co id="hello-java-context" linkends="callout-java-context"/>
+ private void runTest() {
+ try {
+ Properties properties = new Properties();
+ properties.load(this.getClass().getResourceAsStream("hello.properties")); <co id="hello-java-properties" linkends="callout-java-properties"/>
+ Context context = new InitialContext(properties); <co id="hello-java-context" linkends="callout-java-context"/>
- ConnectionFactory connectionFactory
+ ConnectionFactory connectionFactory
= (ConnectionFactory) context.lookup("qpidConnectionfactory"); <co id="hello-java-connection-factory" linkends="callout-java-connection-factory"/>
- Connection connection = connectionFactory.createConnection(); <co id="hello-java-connection" linkends="callout-java-connection"/>
- connection.start(); <co id="hello-java-start" linkends="callout-java-start"/>
+ Connection connection = connectionFactory.createConnection(); <co id="hello-java-connection" linkends="callout-java-connection"/>
+ connection.start(); <co id="hello-java-start" linkends="callout-java-start"/>
- Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);<co id="hello-java-session" linkends="callout-java-session"/>
- Destination destination = (Destination) context.lookup("topicExchange"); <co id="hello-java-destination" linkends="callout-java-destination"/>
+ Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);<co id="hello-java-session" linkends="callout-java-session"/>
+ Destination destination = (Destination) context.lookup("topicExchange"); <co id="hello-java-destination" linkends="callout-java-destination"/>
- MessageProducer messageProducer = session.createProducer(destination); <co id="hello-java-producer" linkends="callout-java-producer"/>
- MessageConsumer messageConsumer = session.createConsumer(destination); <co id="hello-java-consumer" linkends="callout-java-consumer"/>
+ MessageProducer messageProducer = session.createProducer(destination); <co id="hello-java-producer" linkends="callout-java-producer"/>
+ MessageConsumer messageConsumer = session.createConsumer(destination); <co id="hello-java-consumer" linkends="callout-java-consumer"/>
- TextMessage message = session.createTextMessage("Hello world!");
- messageProducer.send(message);
+ TextMessage message = session.createTextMessage("Hello world!");
+ messageProducer.send(message);
- message = (TextMessage)messageConsumer.receive(); <co id="hello-java-receive" linkends="callout-java-receive"/>
- System.out.println(message.getText());
+ message = (TextMessage)messageConsumer.receive(); <co id="hello-java-receive" linkends="callout-java-receive"/>
+ System.out.println(message.getText());
- connection.close(); <co id="hello-java-close" linkends="callout-java-close"/>
- context.close(); <co id="hello-java-jndi-close" linkends="callout-java-jndi-close"/>
- }
- catch (Exception exp) {
- exp.printStackTrace();
- }
- }
-}
+ connection.close(); <co id="hello-java-close" linkends="callout-java-close"/>
+ context.close(); <co id="hello-java-jndi-close" linkends="callout-java-jndi-close"/>
+ }
+ catch (Exception exp) {
+ exp.printStackTrace();
+ }
+ }
+ }
</programlisting>
</example>
@@ -2839,16 +2839,16 @@ public class Hello {
<example>
<title>JNDI Properties File for "Hello world!" example</title>
- <programlisting>
-java.naming.factory.initial
- = org.apache.qpid.jndi.PropertiesFileInitialContextFactory
-
-# connectionfactory.[jndiname] = [ConnectionURL]
-connectionfactory.qpidConnectionfactory
- = amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672' <co id="hello-properties-connectionfactory" linkends="callout-hello-properties-connectionfactory"/>
-# destination.[jndiname] = [address_string]
-destination.topicExchange = amq.topic <co id="hello-properties-destination" linkends="callout-hello-properties-destination"/>
- </programlisting>
+ <programlisting>
+ java.naming.factory.initial
+ = org.apache.qpid.jndi.PropertiesFileInitialContextFactory
+
+ # connectionfactory.[jndiname] = [ConnectionURL]
+ connectionfactory.qpidConnectionfactory
+ = amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672' <co id="hello-properties-connectionfactory" linkends="callout-hello-properties-connectionfactory"/>
+ # destination.[jndiname] = [address_string]
+ destination.topicExchange = amq.topic <co id="hello-properties-destination" linkends="callout-hello-properties-destination"/>
+ </programlisting>
</example>
<calloutlist>
@@ -2881,16 +2881,16 @@ destination.topicExchange = amq.topic <co id="hello-properties-destination" link
<example>
<title>JNDI Properties File</title>
- <programlisting><![CDATA[
-java.naming.factory.initial
- = org.apache.qpid.jndi.PropertiesFileInitialContextFactory
-
-# connectionfactory.[jndiname] = [ConnectionURL]
-connectionfactory.qpidConnectionfactory
- = amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'
-# destination.[jndiname] = [address_string]
-destination.topicExchange = amq.topic
-]]></programlisting>
+ <programlisting><![CDATA[
+ java.naming.factory.initial
+ = org.apache.qpid.jndi.PropertiesFileInitialContextFactory
+
+ # connectionfactory.[jndiname] = [ConnectionURL]
+ connectionfactory.qpidConnectionfactory
+ = amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'
+ # destination.[jndiname] = [address_string]
+ destination.topicExchange = amq.topic
+ ]]></programlisting>
</example>
<para>The following sections describe the JNDI properties that Qpid uses.</para>
@@ -3017,15 +3017,15 @@ destination.topicExchange = amq.topic
maxprefetch
</entry>
<entry>
- integer
+ integer
</entry>
<entry>
- <para>
+ <para>
The maximum number of pre-fetched messages per consumer. If not specified, default value of 500 is used.
- </para>
- <para>
+ </para>
+ <para>
Note: You can also set the default per-consumer prefetch value on a client-wide basis by configuring the client using <link linkend="client-jvm-properties">Java system properties.</link>
- </para>
+ </para>
</entry>
</row>
<row>
@@ -3033,10 +3033,10 @@ destination.topicExchange = amq.topic
sync_publish
</entry>
<entry>
- {'persistent' | 'all'}
+ {'persistent' | 'all'}
</entry>
<entry>
- A sync command is sent after every persistent message to guarantee that it has been received; if the value is 'persistent', this is done only for persistent messages.
+ A sync command is sent after every persistent message to guarantee that it has been received; if the value is 'persistent', this is done only for persistent messages.
</entry>
</row>
<row>
@@ -3044,47 +3044,47 @@ destination.topicExchange = amq.topic
sync_ack
</entry>
<entry>
- Boolean
+ Boolean
</entry>
<entry>
- A sync command is sent after every acknowledgement to guarantee that it has been received.
+ A sync command is sent after every acknowledgement to guarantee that it has been received.
</entry>
</row>
- <row>
+ <row>
<entry>
use_legacy_map_msg_format
</entry>
<entry>
- Boolean
+ Boolean
</entry>
<entry>
- If you are using JMS Map messages and deploying a new client with any JMS client older than 0.8 release, you must set this to true to ensure the older clients can understand the map message encoding.
+ If you are using JMS Map messages and deploying a new client with any JMS client older than 0.8 release, you must set this to true to ensure the older clients can understand the map message encoding.
</entry>
</row>
- <row>
+ <row>
<entry>
failover
</entry>
<entry>
- {'singlebroker' | 'roundrobin' | 'failover_exchange' | 'nofailover' | '&lt;class&gt;'}
+ {'singlebroker' | 'roundrobin' | 'failover_exchange' | 'nofailover' | '&lt;class&gt;'}
</entry>
<entry>
- <para>
- This option controls failover behaviour. The method <literal>singlebroker</literal> uses only the first broker in the list,
- <literal>roundrobin</literal> will try each broker given in the broker list until a connection is established,
- <literal>failover_exchange</literal> connects to the initial broker given in the broker URL and will receive membership updates
- via the failover exchange. <literal>nofailover</literal> disables all retry and failover logic. Any other value is interpreted as a
- classname which must implement the <literal>org.apache.qpid.jms.failover.FailoverMethod</literal> interface.
- </para>
- <para>
- The broker list options <literal>retries</literal> and <literal>connectdelay</literal> (described below) determine the number of times a
- connection to a broker will be retried and the the length of time to wait between successive connection attempts before moving on to
- the next broker in the list. The failover option <literal>cyclecount</literal> controls the number of times to loop through the list of
- available brokers before finally giving up.
- </para>
- <para>
- Defaults to <literal>roundrobin</literal> if the brokerlist contains multiple brokers, or <literal>singlebroker</literal> otherwise.
- </para>
+ <para>
+ This option controls failover behaviour. The method <literal>singlebroker</literal> uses only the first broker in the list,
+ <literal>roundrobin</literal> will try each broker given in the broker list until a connection is established,
+ <literal>failover_exchange</literal> connects to the initial broker given in the broker URL and will receive membership updates
+ via the failover exchange. <literal>nofailover</literal> disables all retry and failover logic. Any other value is interpreted as a
+ classname which must implement the <literal>org.apache.qpid.jms.failover.FailoverMethod</literal> interface.
+ </para>
+ <para>
+ The broker list options <literal>retries</literal> and <literal>connectdelay</literal> (described below) determine the number of times a
+ connection to a broker will be retried and the the length of time to wait between successive connection attempts before moving on to
+ the next broker in the list. The failover option <literal>cyclecount</literal> controls the number of times to loop through the list of
+ available brokers before finally giving up.
+ </para>
+ <para>
+ Defaults to <literal>roundrobin</literal> if the brokerlist contains multiple brokers, or <literal>singlebroker</literal> otherwise.
+ </para>
</entry>
</row>
</tbody>
@@ -3108,29 +3108,29 @@ destination.topicExchange = amq.topic
<example>
<title>Broker Lists</title>
- <para>A broker list can specify properties to be used when connecting to the broker, such as security options. This broker list specifies options for a Kerberos connection using GSSAPI:</para>
- <programlisting><![CDATA[
-amqp://guest:guest@test/test?sync_ack='true'
- &brokerlist='tcp://ip1:5672?sasl_mechs='GSSAPI''
- ]]></programlisting>
+ <para>A broker list can specify properties to be used when connecting to the broker, such as security options. This broker list specifies options for a Kerberos connection using GSSAPI:</para>
+ <programlisting><![CDATA[
+ amqp://guest:guest@test/test?sync_ack='true'
+ &brokerlist='tcp://ip1:5672?sasl_mechs='GSSAPI''
+ ]]></programlisting>
- <para>This broker list specifies SSL options:</para>
+ <para>This broker list specifies SSL options:</para>
- <programlisting><![CDATA[
-amqp://guest:guest@test/test?sync_ack='true'
- &brokerlist='tcp://ip1:5672?ssl='true'&ssl_cert_alias='cert1''
- ]]></programlisting>
+ <programlisting><![CDATA[
+ amqp://guest:guest@test/test?sync_ack='true'
+ &brokerlist='tcp://ip1:5672?ssl='true'&ssl_cert_alias='cert1''
+ ]]></programlisting>
- <para>
- This broker list specifies two brokers using the connectdelay and retries broker options. It also illustrates the failover connection URL
- property.
- </para>
+ <para>
+ This broker list specifies two brokers using the connectdelay and retries broker options. It also illustrates the failover connection URL
+ property.
+ </para>
- <programlisting><![CDATA[
+ <programlisting><![CDATA[
-amqp://guest:guest@/test?failover='roundrobin?cyclecount='2''
- &brokerlist='tcp://ip1:5672?retries='5'&connectdelay='2000';tcp://ip2:5672?retries='5'&connectdelay='2000''
- ]]></programlisting>
+ amqp://guest:guest@/test?failover='roundrobin?cyclecount='2''
+ &brokerlist='tcp://ip1:5672?retries='5'&connectdelay='2000';tcp://ip2:5672?retries='5'&connectdelay='2000''
+ ]]></programlisting>
</example>
<para>The following broker list options are supported.</para>
@@ -3188,10 +3188,10 @@ amqp://guest:guest@/test?failover='roundrobin?cyclecount='2''
sasl_encryption
</entry>
<entry>
- Boolean
+ Boolean
</entry>
<entry>
- If <literal>sasl_encryption='true'</literal>, the JMS client attempts to negotiate a security layer with the broker using GSSAPI to encrypt the connection. Note that for this to happen, GSSAPI must be selected as the sasl_mech.
+ If <literal>sasl_encryption='true'</literal>, the JMS client attempts to negotiate a security layer with the broker using GSSAPI to encrypt the connection. Note that for this to happen, GSSAPI must be selected as the sasl_mech.
</entry>
</row>
<row>
@@ -3295,7 +3295,7 @@ amqp://guest:guest@/test?failover='roundrobin?cyclecount='2''
</entry>
<entry>
- If multiple certificates are present in the keystore, the alias will be used to extract the correct certificate.
+ If multiple certificates are present in the keystore, the alias will be used to extract the correct certificate.
</entry>
</row>
<row>
@@ -3306,7 +3306,7 @@ amqp://guest:guest@/test?failover='roundrobin?cyclecount='2''
integer
</entry>
<entry>
- The number of times to retry connection to each broker in the broker list. Defaults to 1.
+ The number of times to retry connection to each broker in the broker list. Defaults to 1.
</entry>
</row>
<row>
@@ -3353,13 +3353,13 @@ amqp://guest:guest@/test?failover='roundrobin?cyclecount='2''
<title>Java JMS Message Properties</title>
<para>The following table shows how Qpid Messaging API message
- properties are mapped to AMQP 0-10 message properties and
- delivery properties. In this table <varname>msg</varname>
- refers to the Message class defined in the Qpid Messaging API,
- <varname>mp</varname> refers to an AMQP 0-10
- <varname>message-properties</varname> struct, and
- <varname>dp</varname> refers to an AMQP 0-10
- <varname>delivery-properties</varname> struct.</para>
+ properties are mapped to AMQP 0-10 message properties and
+ delivery properties. In this table <varname>msg</varname>
+ refers to the Message class defined in the Qpid Messaging API,
+ <varname>mp</varname> refers to an AMQP 0-10
+ <varname>message-properties</varname> struct, and
+ <varname>dp</varname> refers to an AMQP 0-10
+ <varname>delivery-properties</varname> struct.</para>
<table >
<title>Java JMS Mapping to AMQP 0-10 Message Properties</title>
@@ -3418,54 +3418,54 @@ amqp://guest:guest@/test?failover='roundrobin?cyclecount='2''
<example>
<title>Sending a Java JMS MapMessage</title>
- <programlisting><![CDATA[
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.MapMessage;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import java.util.Arrays;
-
-// !!! SNIP !!!
-
-MessageProducer producer = session.createProducer(queue);
-
-MapMessage m = session.createMapMessage();
-m.setIntProperty("Id", 987654321);
-m.setStringProperty("name", "Widget");
-m.setDoubleProperty("price", 0.99);
-
-List<String> colors = new ArrayList<String>();
-colors.add("red");
-colors.add("green");
-colors.add("white");
-m.setObject("colours", colors);
-
-Map<String,Double> dimensions = new HashMap<String,Double>();
-dimensions.put("length",10.2);
-dimensions.put("width",5.1);
-dimensions.put("depth",2.0);
-m.setObject("dimensions",dimensions);
-
-List<List<Integer>> parts = new ArrayList<List<Integer>>();
-parts.add(Arrays.asList(new Integer[] {1,2,5}));
-parts.add(Arrays.asList(new Integer[] {8,2,5}));
-m.setObject("parts", parts);
-
-Map<String,Object> specs = new HashMap<String,Object>();
-specs.put("colours", colors);
-specs.put("dimensions", dimensions);
-specs.put("parts", parts);
-m.setObject("specs",specs);
-
-producer.send(m);
- ]]></programlisting>
+ <programlisting><![CDATA[
+ import java.util.ArrayList;
+ import java.util.HashMap;
+ import java.util.List;
+ import java.util.Map;
+
+ import javax.jms.Connection;
+ import javax.jms.Destination;
+ import javax.jms.MapMessage;
+ import javax.jms.MessageProducer;
+ import javax.jms.Session;
+
+ import java.util.Arrays;
+
+ // !!! SNIP !!!
+
+ MessageProducer producer = session.createProducer(queue);
+
+ MapMessage m = session.createMapMessage();
+ m.setIntProperty("Id", 987654321);
+ m.setStringProperty("name", "Widget");
+ m.setDoubleProperty("price", 0.99);
+
+ List<String> colors = new ArrayList<String>();
+ colors.add("red");
+ colors.add("green");
+ colors.add("white");
+ m.setObject("colours", colors);
+
+ Map<String,Double> dimensions = new HashMap<String,Double>();
+ dimensions.put("length",10.2);
+ dimensions.put("width",5.1);
+ dimensions.put("depth",2.0);
+ m.setObject("dimensions",dimensions);
+
+ List<List<Integer>> parts = new ArrayList<List<Integer>>();
+ parts.add(Arrays.asList(new Integer[] {1,2,5}));
+ parts.add(Arrays.asList(new Integer[] {8,2,5}));
+ m.setObject("parts", parts);
+
+ Map<String,Object> specs = new HashMap<String,Object>();
+ specs.put("colours", colors);
+ specs.put("dimensions", dimensions);
+ specs.put("parts", parts);
+ m.setObject("specs",specs);
+
+ producer.send(m);
+ ]]></programlisting>
</example>
<para>The following table shows the datatypes that can be sent in a <classname>MapMessage</classname>, and the corresponding datatypes that will be received by clients in Python or C++.</para>
@@ -3509,14 +3509,14 @@ producer.send(m);
<title>log4j Logging Properties</title>
<programlisting><![CDATA[
-log4j.logger.org.apache.qpid=WARN, console
-log4j.additivity.org.apache.qpid=false
+ log4j.logger.org.apache.qpid=WARN, console
+ log4j.additivity.org.apache.qpid=false
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.Threshold=all
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n
-]]></programlisting>
+ log4j.appender.console=org.apache.log4j.ConsoleAppender
+ log4j.appender.console.Threshold=all
+ log4j.appender.console.layout=org.apache.log4j.PatternLayout
+ log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n
+ ]]></programlisting>
</example>
</section>
@@ -3530,420 +3530,420 @@ log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n
<listitem>
<para>
JVM level using JVM arguments : Configuration that affects all connections, sessions, consumers and producers created within that JVM.
- </para>
+ </para>
<para>Ex. <varname>-Dmax_prefetch=1000</varname> property specifies the message credits to use.</para>
</listitem>
<listitem>
<para>
Connection level using Connection/Broker properties : Affects the respective connection and sessions, consumers and produces created by that connection.
- </para>
+ </para>
<para>Ex. <varname>amqp://guest:guest@test/test?max_prefetch='1000'
- &amp;brokerlist='tcp://localhost:5672'
-</varname> property specifies the message credits to use. This overrides any value specified via the JVM argument <varname>max_prefetch</varname>.</para>
+ &amp;brokerlist='tcp://localhost:5672'
+ </varname> property specifies the message credits to use. This overrides any value specified via the JVM argument <varname>max_prefetch</varname>.</para>
<para>Please refer to the <xref linkend="section-jms-connection-url"/> section for a complete list of all properties and how to use them.</para>
</listitem>
<listitem>
<para>
Destination level using Addressing options : Affects the producer(s) and consumer(s) created using the respective destination.
- </para>
+ </para>
<para>Ex. <varname>my-queue; {create: always, link:{capacity: 10}}</varname>, where <varname>capacity</varname> option specifies the message credits to use. This overrides any connection level configuration.</para>
<para>Please refer to the <xref linkend="section-addresses"/> section for a complete understanding of addressing and it's various options.</para>
</listitem>
</itemizedlist>
-<para>Some of these config options are available at all three levels (Ex. <varname>max_prefetch</varname>), while others are available only at JVM or connection level.</para>
+ <para>Some of these config options are available at all three levels (Ex. <varname>max_prefetch</varname>), while others are available only at JVM or connection level.</para>
<section id="client-jvm-properties">
<title>Qpid JVM Arguments</title>
- <table >
- <title>Config Options For Connection Behaviour</title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Property Name</entry>
- <entry>Type</entry>
- <entry>Default Value</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>qpid.amqp.version</entry>
- <entry>string</entry>
- <entry>0-10</entry>
- <entry><para>Sets the AMQP version to be used - currently supports one of {0-8,0-9,0-91,0-10}.</para><para>The client will begin negotiation at the specified version and only negotiate downwards if the Broker does not support the specified version.</para></entry>
- </row>
- <row>
- <entry>qpid.heartbeat</entry>
- <entry>int</entry>
- <entry>120 (secs)</entry>
- <entry>The heartbeat interval in seconds. Two consective misssed heartbeats will result in the connection timing out.<para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
- </row>
-
- <row>
- <entry>ignore_setclientID</entry>
- <entry>boolean</entry>
- <entry>false</entry>
- <entry>If a client ID is specified in the connection URL it's used or else an ID is generated. If an ID is specified after it's been set Qpid will throw an exception. <para>Setting this property to 'true' will disable that check and allow you to set a client ID of your choice later on.</para></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
-
- <table >
- <title>Config Options For Session Behaviour</title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Property Name</entry>
- <entry>Type</entry>
- <entry>Default Value</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>qpid.session.command_limit</entry>
- <entry>int</entry>
- <entry>65536</entry>
- <entry>Limits the # of unacked commands</entry>
- </row>
-
- <row>
- <entry>qpid.session.byte_limit</entry>
- <entry>int</entry>
- <entry>1048576</entry>
- <entry>Limits the # of unacked commands in terms of bytes</entry>
- </row>
-
- <row>
- <entry>qpid.use_legacy_map_message</entry>
- <entry>boolean</entry>
- <entry>false</entry>
- <entry><para>If set will use the old map message encoding. By default the Map messages are encoded using the 0-10 map encoding.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
- </row>
-
- <row>
- <entry>qpid.jms.daemon.dispatcher</entry>
- <entry>boolean</entry>
- <entry>false</entry>
- <entry><para>Controls whether the Session dispatcher thread is a daemon thread or not. If this system property is set to true then the Session dispatcher threads will be created as daemon threads. This setting is introduced in version 0.16.</para></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table >
- <title>Config Options For Consumer Behaviour</title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Property Name</entry>
- <entry>Type</entry>
- <entry>Default Value</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>max_prefetch</entry>
- <entry>int</entry>
- <entry>500</entry>
- <entry>Maximum number of pre-fetched messages per consumer. <para>This can also be defaulted for consumers created on a particular connection using the <link linkend="section-jms-connection-url">Connection URL</link> options, or per destination (see the <varname>capacity</varname> option under link properties in addressing)</para></entry>
- </row>
-
- <row>
- <entry>qpid.session.max_ack_delay</entry>
- <entry>long</entry>
- <entry>1000 (ms)</entry>
- <entry><para>Timer interval to flush message acks in buffer when using AUTO_ACK and DUPS_OK.</para> <para>When using the above ack modes, message acks are batched and sent if one of the following conditions are met (which ever happens first).
- <itemizedlist>
- <listitem><para>When the ack timer fires.</para></listitem>
- <listitem><para>if un_acked_msg_count > max_prefetch/2.</para></listitem>
- </itemizedlist>
- </para>
- <para>The ack timer can be disabled by setting it to 0.</para>
- </entry>
- </row>
-
- <row>
- <entry>sync_ack</entry>
- <entry>boolean</entry>
- <entry>false</entry>
- <entry><para>If set, each message will be acknowledged synchronously. When using AUTO_ACK mode, you need to set this to "true", in order to get the correct behaviour as described by the JMS spec.</para><para>This is set to false by default for performance reasons, therefore by default AUTO_ACK behaves similar to DUPS_OK.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table >
- <title>Config Options For Producer Behaviour</title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Property Name</entry>
- <entry>Type</entry>
- <entry>Default Value</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>sync_publish</entry>
- <entry>string</entry>
- <entry>"" (disabled)</entry>
- <entry><para>If one of {persistent|all} is set then persistent messages or all messages will be sent synchronously.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table >
- <title>Config Options For Threading</title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Property Name</entry>
- <entry>Type</entry>
- <entry>Default Value</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>qpid.thread_factory</entry>
- <entry>string</entry>
- <entry>org.apache.qpid.thread.DefaultThreadFactory</entry>
- <entry><para>Specifies the thread factory to use.</para><para>If using a real time JVM, you need to set the above property to <varname>org.apache.qpid.thread.RealtimeThreadFactory</varname>.</para></entry>
- </row>
-
- <row>
- <entry>qpid.rt_thread_priority</entry>
- <entry>int</entry>
- <entry>20</entry>
- <entry><para>Specifies the priority (1-99) for Real time threads created by the real time thread factory.</para></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table >
- <title>Config Options For I/O</title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Property Name</entry>
- <entry>Type</entry>
- <entry>Default Value</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>qpid.transport</entry>
- <entry>string</entry>
- <entry>org.apache.qpid.transport.network.io.IoNetworkTransport</entry>
- <entry><para>The transport implementation to be used.</para><para>A user could specify an alternative transport mechanism that implements the interface <varname>org.apache.qpid.transport.network.OutgoingNetworkTransport</varname>.</para></entry>
- </row>
- <row>
- <entry>qpid.sync_op_timeout</entry>
- <entry>long</entry>
- <entry>60000</entry>
- <entry><para>The length of time (in milliseconds) to wait for a synchronous operation to complete.</para><para>For compatibility with older clients, the synonym <varname>amqj.default_syncwrite_timeout</varname> is supported.</para></entry>
- </row>
- <row>
- <entry>qpid.tcp_nodelay</entry>
- <entry>boolean</entry>
- <entry>true</entry>
- <entry>
- <para>Sets the TCP_NODELAY property of the underlying socket. The default was changed to true as of Qpid 0.14.</para>
- <para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para>
- <para>For compatibility with older clients, the synonym <varname>amqj.tcp_nodelay</varname> is supported.</para>
- </entry>
- </row>
- <row>
- <entry>qpid.send_buffer_size</entry>
- <entry>integer</entry>
- <entry>65535</entry>
- <entry>
- <para>Sets the SO_SNDBUF property of the underlying socket. Added in Qpid 0.16.</para>
- <para>For compatibility with older clients, the synonym <varname>amqj.sendBufferSize</varname> is supported.</para>
- </entry>
- </row>
- <row>
- <entry>qpid.receive_buffer_size</entry>
- <entry>integer</entry>
- <entry>65535</entry>
- <entry>
- <para>Sets the SO_RCVBUF property of the underlying socket. Added in Qpid 0.16.</para>
- <para>For compatibility with older clients, the synonym <varname>amqj.receiveBufferSize</varname> is supported.</para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table >
- <title>Config Options For Security</title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Property Name</entry>
- <entry>Type</entry>
- <entry>Default Value</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>qpid.sasl_mechs</entry>
- <entry>string</entry>
- <entry>PLAIN</entry>
- <entry><para>The SASL mechanism to be used. More than one could be specified as a comma separated list.</para><para>We currently support the following mechanisms {PLAIN | GSSAPI | EXTERNAL}.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
- </row>
-
- <row>
- <entry>qpid.sasl_protocol</entry>
- <entry>string</entry>
- <entry>AMQP</entry>
- <entry><para>When using GSSAPI as the SASL mechanism, <varname>sasl_protocol</varname> must be set to the principal for the qpidd broker, e.g. <varname>qpidd</varname>.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
- </row>
-
- <row>
- <entry>qpid.sasl_server_name</entry>
- <entry>string</entry>
- <entry>localhost</entry>
- <entry><para>When using GSSAPI as the SASL mechanism, <varname>sasl_server</varname> must be set to the host for the SASL server, e.g. <varname>example.com</varname>.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Config Options For Security - Standard JVM properties needed when using GSSAPI as the SASL mechanism.<footnote><para>Please refer to the Java security documentation for a complete understanding of the above properties.</para></footnote></title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Property Name</entry>
- <entry>Type</entry>
- <entry>Default Value</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>javax.security.auth.useSubjectCredsOnly</entry>
- <entry>boolean</entry>
- <entry>true</entry>
- <entry><para>If set to 'false', forces the SASL GASSPI client to obtain the kerberos credentials explicitly instead of obtaining from the "subject" that owns the current thread.</para></entry>
- </row>
-
- <row>
- <entry>java.security.auth.login.config</entry>
- <entry>string</entry>
- <entry></entry>
- <entry><para>Specifies the jass configuration file.</para><para><varname>Ex-Djava.security.auth.login.config=myjas.conf</varname>
-</para><para>Here is the sample myjas.conf JASS configuration file: <programlisting><![CDATA[
-
- com.sun.security.jgss.initiate {
- com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true;
- };
-
-]]></programlisting></para></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Config Options For Security - Using SSL for securing connections or using EXTERNAL as the SASL mechanism.</title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Property Name</entry>
- <entry>Type</entry>
- <entry>Default Value</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>qpid.ssl_timeout</entry>
- <entry>long</entry>
- <entry>60000</entry>
- <entry><para>Timeout value used by the Java SSL engine when waiting on operations.</para></entry>
- </row>
-
- <row>
- <entry>qpid.ssl.KeyManagerFactory.algorithm</entry>
- <entry>string</entry>
- <entry>-</entry>
- <entry>
- <para>The key manager factory algorithm name. If not set, defaults to the value returned from the Java runtime call <literal>KeyManagerFactory.getDefaultAlgorithm()</literal></para>
- <para>For compatibility with older clients, the synonym <varname>qpid.ssl.keyStoreCertType</varname> is supported.</para>
- </entry>
- </row>
-
- <row>
- <entry>qpid.ssl.TrustManagerFactory.algorithm</entry>
- <entry>string</entry>
- <entry>-</entry>
- <entry>
- <para>The trust manager factory algorithm name. If not set, defaults to the value returned from the Java runtime call <literal>TrustManagerFactory.getDefaultAlgorithm()</literal></para>
- <para>For compatibility with older clients, the synonym <varname>qpid.ssl.trustStoreCertType</varname> is supported.</para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
- <table>
- <title>Config Options For Security - Standard JVM properties needed when Using SSL for securing connections or using EXTERNAL as the SASL mechanism.<footnote><para>Qpid allows you to have per connection key and trust stores if required. If specified per connection, the JVM arguments are ignored.</para></footnote></title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Property Name</entry>
- <entry>Type</entry>
- <entry>Default Value</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>javax.net.ssl.keyStore</entry>
- <entry>string</entry>
- <entry>jvm default</entry>
- <entry><para>Specifies the key store path.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
- </row>
-
- <row>
- <entry>javax.net.ssl.keyStorePassword</entry>
- <entry>string</entry>
- <entry>jvm default</entry>
- <entry><para>Specifies the key store password.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
- </row>
-
- <row>
- <entry>javax.net.ssl.trustStore</entry>
- <entry>string</entry>
- <entry>jvm default</entry>
- <entry><para>Specifies the trust store path.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
- </row>
-
- <row>
- <entry>javax.net.ssl.trustStorePassword</entry>
- <entry>string</entry>
- <entry>jvm default</entry>
- <entry><para>Specifies the trust store password.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </section>
+ <table >
+ <title>Config Options For Connection Behaviour</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Property Name</entry>
+ <entry>Type</entry>
+ <entry>Default Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>qpid.amqp.version</entry>
+ <entry>string</entry>
+ <entry>0-10</entry>
+ <entry><para>Sets the AMQP version to be used - currently supports one of {0-8,0-9,0-91,0-10}.</para><para>The client will begin negotiation at the specified version and only negotiate downwards if the Broker does not support the specified version.</para></entry>
+ </row>
+ <row>
+ <entry>qpid.heartbeat</entry>
+ <entry>int</entry>
+ <entry>120 (secs)</entry>
+ <entry>The heartbeat interval in seconds. Two consective misssed heartbeats will result in the connection timing out.<para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
+ </row>
+
+ <row>
+ <entry>ignore_setclientID</entry>
+ <entry>boolean</entry>
+ <entry>false</entry>
+ <entry>If a client ID is specified in the connection URL it's used or else an ID is generated. If an ID is specified after it's been set Qpid will throw an exception. <para>Setting this property to 'true' will disable that check and allow you to set a client ID of your choice later on.</para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+
+ <table >
+ <title>Config Options For Session Behaviour</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Property Name</entry>
+ <entry>Type</entry>
+ <entry>Default Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>qpid.session.command_limit</entry>
+ <entry>int</entry>
+ <entry>65536</entry>
+ <entry>Limits the # of unacked commands</entry>
+ </row>
+
+ <row>
+ <entry>qpid.session.byte_limit</entry>
+ <entry>int</entry>
+ <entry>1048576</entry>
+ <entry>Limits the # of unacked commands in terms of bytes</entry>
+ </row>
+
+ <row>
+ <entry>qpid.use_legacy_map_message</entry>
+ <entry>boolean</entry>
+ <entry>false</entry>
+ <entry><para>If set will use the old map message encoding. By default the Map messages are encoded using the 0-10 map encoding.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
+ </row>
+
+ <row>
+ <entry>qpid.jms.daemon.dispatcher</entry>
+ <entry>boolean</entry>
+ <entry>false</entry>
+ <entry><para>Controls whether the Session dispatcher thread is a daemon thread or not. If this system property is set to true then the Session dispatcher threads will be created as daemon threads. This setting is introduced in version 0.16.</para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table >
+ <title>Config Options For Consumer Behaviour</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Property Name</entry>
+ <entry>Type</entry>
+ <entry>Default Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>max_prefetch</entry>
+ <entry>int</entry>
+ <entry>500</entry>
+ <entry>Maximum number of pre-fetched messages per consumer. <para>This can also be defaulted for consumers created on a particular connection using the <link linkend="section-jms-connection-url">Connection URL</link> options, or per destination (see the <varname>capacity</varname> option under link properties in addressing)</para></entry>
+ </row>
+
+ <row>
+ <entry>qpid.session.max_ack_delay</entry>
+ <entry>long</entry>
+ <entry>1000 (ms)</entry>
+ <entry><para>Timer interval to flush message acks in buffer when using AUTO_ACK and DUPS_OK.</para> <para>When using the above ack modes, message acks are batched and sent if one of the following conditions are met (which ever happens first).
+ <itemizedlist>
+ <listitem><para>When the ack timer fires.</para></listitem>
+ <listitem><para>if un_acked_msg_count > max_prefetch/2.</para></listitem>
+ </itemizedlist>
+ </para>
+ <para>The ack timer can be disabled by setting it to 0.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>sync_ack</entry>
+ <entry>boolean</entry>
+ <entry>false</entry>
+ <entry><para>If set, each message will be acknowledged synchronously. When using AUTO_ACK mode, you need to set this to "true", in order to get the correct behaviour as described by the JMS spec.</para><para>This is set to false by default for performance reasons, therefore by default AUTO_ACK behaves similar to DUPS_OK.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table >
+ <title>Config Options For Producer Behaviour</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Property Name</entry>
+ <entry>Type</entry>
+ <entry>Default Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>sync_publish</entry>
+ <entry>string</entry>
+ <entry>"" (disabled)</entry>
+ <entry><para>If one of {persistent|all} is set then persistent messages or all messages will be sent synchronously.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table >
+ <title>Config Options For Threading</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Property Name</entry>
+ <entry>Type</entry>
+ <entry>Default Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>qpid.thread_factory</entry>
+ <entry>string</entry>
+ <entry>org.apache.qpid.thread.DefaultThreadFactory</entry>
+ <entry><para>Specifies the thread factory to use.</para><para>If using a real time JVM, you need to set the above property to <varname>org.apache.qpid.thread.RealtimeThreadFactory</varname>.</para></entry>
+ </row>
+
+ <row>
+ <entry>qpid.rt_thread_priority</entry>
+ <entry>int</entry>
+ <entry>20</entry>
+ <entry><para>Specifies the priority (1-99) for Real time threads created by the real time thread factory.</para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table >
+ <title>Config Options For I/O</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Property Name</entry>
+ <entry>Type</entry>
+ <entry>Default Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>qpid.transport</entry>
+ <entry>string</entry>
+ <entry>org.apache.qpid.transport.network.io.IoNetworkTransport</entry>
+ <entry><para>The transport implementation to be used.</para><para>A user could specify an alternative transport mechanism that implements the interface <varname>org.apache.qpid.transport.network.OutgoingNetworkTransport</varname>.</para></entry>
+ </row>
+ <row>
+ <entry>qpid.sync_op_timeout</entry>
+ <entry>long</entry>
+ <entry>60000</entry>
+ <entry><para>The length of time (in milliseconds) to wait for a synchronous operation to complete.</para><para>For compatibility with older clients, the synonym <varname>amqj.default_syncwrite_timeout</varname> is supported.</para></entry>
+ </row>
+ <row>
+ <entry>qpid.tcp_nodelay</entry>
+ <entry>boolean</entry>
+ <entry>true</entry>
+ <entry>
+ <para>Sets the TCP_NODELAY property of the underlying socket. The default was changed to true as of Qpid 0.14.</para>
+ <para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para>
+ <para>For compatibility with older clients, the synonym <varname>amqj.tcp_nodelay</varname> is supported.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>qpid.send_buffer_size</entry>
+ <entry>integer</entry>
+ <entry>65535</entry>
+ <entry>
+ <para>Sets the SO_SNDBUF property of the underlying socket. Added in Qpid 0.16.</para>
+ <para>For compatibility with older clients, the synonym <varname>amqj.sendBufferSize</varname> is supported.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>qpid.receive_buffer_size</entry>
+ <entry>integer</entry>
+ <entry>65535</entry>
+ <entry>
+ <para>Sets the SO_RCVBUF property of the underlying socket. Added in Qpid 0.16.</para>
+ <para>For compatibility with older clients, the synonym <varname>amqj.receiveBufferSize</varname> is supported.</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table >
+ <title>Config Options For Security</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Property Name</entry>
+ <entry>Type</entry>
+ <entry>Default Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>qpid.sasl_mechs</entry>
+ <entry>string</entry>
+ <entry>PLAIN</entry>
+ <entry><para>The SASL mechanism to be used. More than one could be specified as a comma separated list.</para><para>We currently support the following mechanisms {PLAIN | GSSAPI | EXTERNAL}.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
+ </row>
+
+ <row>
+ <entry>qpid.sasl_protocol</entry>
+ <entry>string</entry>
+ <entry>AMQP</entry>
+ <entry><para>When using GSSAPI as the SASL mechanism, <varname>sasl_protocol</varname> must be set to the principal for the qpidd broker, e.g. <varname>qpidd</varname>.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
+ </row>
+
+ <row>
+ <entry>qpid.sasl_server_name</entry>
+ <entry>string</entry>
+ <entry>localhost</entry>
+ <entry><para>When using GSSAPI as the SASL mechanism, <varname>sasl_server</varname> must be set to the host for the SASL server, e.g. <varname>example.com</varname>.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Config Options For Security - Standard JVM properties needed when using GSSAPI as the SASL mechanism.<footnote><para>Please refer to the Java security documentation for a complete understanding of the above properties.</para></footnote></title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Property Name</entry>
+ <entry>Type</entry>
+ <entry>Default Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>javax.security.auth.useSubjectCredsOnly</entry>
+ <entry>boolean</entry>
+ <entry>true</entry>
+ <entry><para>If set to 'false', forces the SASL GASSPI client to obtain the kerberos credentials explicitly instead of obtaining from the "subject" that owns the current thread.</para></entry>
+ </row>
+
+ <row>
+ <entry>java.security.auth.login.config</entry>
+ <entry>string</entry>
+ <entry></entry>
+ <entry><para>Specifies the jass configuration file.</para><para><varname>Ex-Djava.security.auth.login.config=myjas.conf</varname>
+ </para><para>Here is the sample myjas.conf JASS configuration file: <programlisting><![CDATA[
+
+ com.sun.security.jgss.initiate {
+ com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true;
+ };
+
+ ]]></programlisting></para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Config Options For Security - Using SSL for securing connections or using EXTERNAL as the SASL mechanism.</title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Property Name</entry>
+ <entry>Type</entry>
+ <entry>Default Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>qpid.ssl_timeout</entry>
+ <entry>long</entry>
+ <entry>60000</entry>
+ <entry><para>Timeout value used by the Java SSL engine when waiting on operations.</para></entry>
+ </row>
+
+ <row>
+ <entry>qpid.ssl.KeyManagerFactory.algorithm</entry>
+ <entry>string</entry>
+ <entry>-</entry>
+ <entry>
+ <para>The key manager factory algorithm name. If not set, defaults to the value returned from the Java runtime call <literal>KeyManagerFactory.getDefaultAlgorithm()</literal></para>
+ <para>For compatibility with older clients, the synonym <varname>qpid.ssl.keyStoreCertType</varname> is supported.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>qpid.ssl.TrustManagerFactory.algorithm</entry>
+ <entry>string</entry>
+ <entry>-</entry>
+ <entry>
+ <para>The trust manager factory algorithm name. If not set, defaults to the value returned from the Java runtime call <literal>TrustManagerFactory.getDefaultAlgorithm()</literal></para>
+ <para>For compatibility with older clients, the synonym <varname>qpid.ssl.trustStoreCertType</varname> is supported.</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <table>
+ <title>Config Options For Security - Standard JVM properties needed when Using SSL for securing connections or using EXTERNAL as the SASL mechanism.<footnote><para>Qpid allows you to have per connection key and trust stores if required. If specified per connection, the JVM arguments are ignored.</para></footnote></title>
+ <tgroup cols="4">
+ <thead>
+ <row>
+ <entry>Property Name</entry>
+ <entry>Type</entry>
+ <entry>Default Value</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>javax.net.ssl.keyStore</entry>
+ <entry>string</entry>
+ <entry>jvm default</entry>
+ <entry><para>Specifies the key store path.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
+ </row>
+
+ <row>
+ <entry>javax.net.ssl.keyStorePassword</entry>
+ <entry>string</entry>
+ <entry>jvm default</entry>
+ <entry><para>Specifies the key store password.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
+ </row>
+
+ <row>
+ <entry>javax.net.ssl.trustStore</entry>
+ <entry>string</entry>
+ <entry>jvm default</entry>
+ <entry><para>Specifies the trust store path.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
+ </row>
+
+ <row>
+ <entry>javax.net.ssl.trustStorePassword</entry>
+ <entry>string</entry>
+ <entry>jvm default</entry>
+ <entry><para>Specifies the trust store password.</para><para>This can also be set per connection using the <link linkend="section-jms-connection-url">Connection URL</link> options.</para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
</section>
</chapter>
@@ -3966,76 +3966,76 @@ log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n
broker.</para>
<example><?dbfo keep-together="auto" ?>
- <title>Traditional service model "Hello world!" example</title>
- <programlisting><![CDATA[
-namespace Apache.Qpid.Documentation.HelloService
-{
- using System;
- using System.ServiceModel;
- using System.ServiceModel.Channels;
- using System.Threading;
- using Apache.Qpid.Channel;
-
- [ServiceContract]
- public interface IHelloService
- {
- [OperationContract(IsOneWay = true, Action = "*")]
- void SayHello(string greeting);
- }
-
- public class HelloService : IHelloService
- {
- private static int greetingCount;
-
- public static int GreetingCount
- {
+ <title>Traditional service model "Hello world!" example</title>
+ <programlisting><![CDATA[
+ namespace Apache.Qpid.Documentation.HelloService
+ {
+ using System;
+ using System.ServiceModel;
+ using System.ServiceModel.Channels;
+ using System.Threading;
+ using Apache.Qpid.Channel;
+
+ [ServiceContract]
+ public interface IHelloService
+ {
+ [OperationContract(IsOneWay = true, Action = "*")]
+ void SayHello(string greeting);
+ }
+
+ public class HelloService : IHelloService
+ {
+ private static int greetingCount;
+
+ public static int GreetingCount
+ {
get { return greetingCount; }
- }
+ }
- public void SayHello(string greeting)
- {
+ public void SayHello(string greeting)
+ {
Console.WriteLine("Service received: " + greeting);
greetingCount++;
- }]]></programlisting>
+ }]]></programlisting>
- <programlisting><![CDATA[
- static void Main(string[] args)
- {
+ <programlisting><![CDATA[
+ static void Main(string[] args)
+ {
try
{
- AmqpBinding amqpBinding = new AmqpBinding();
- amqpBinding.BrokerHost = "localhost";
- amqpBinding.BrokerPort = 5672;
-
- ServiceHost serviceHost = new ServiceHost(typeof(HelloService));
- serviceHost.AddServiceEndpoint(typeof(IHelloService),
- amqpBinding, "amqp:hello_service_node");
- serviceHost.Open();
-
- // Send the service a test greeting
- Uri amqpClientUri=new Uri("amqp:amq.direct?routingkey=hello_service_node");
- EndpointAddress clientEndpoint = new EndpointAddress(amqpClientUri);
- ChannelFactory<IHelloService> channelFactory =
- new ChannelFactory<IHelloService>(amqpBinding, clientEndpoint);
- IHelloService clientProxy = channelFactory.CreateChannel();
-
- clientProxy.SayHello("Greetings from WCF client");
-
- // wait for service to process the greeting
- while (HelloService.GreetingCount == 0)
- {
- Thread.Sleep(100);
- }
- channelFactory.Close();
- serviceHost.Close();
+ AmqpBinding amqpBinding = new AmqpBinding();
+ amqpBinding.BrokerHost = "localhost";
+ amqpBinding.BrokerPort = 5672;
+
+ ServiceHost serviceHost = new ServiceHost(typeof(HelloService));
+ serviceHost.AddServiceEndpoint(typeof(IHelloService),
+ amqpBinding, "amqp:hello_service_node");
+ serviceHost.Open();
+
+ // Send the service a test greeting
+ Uri amqpClientUri=new Uri("amqp:amq.direct?routingkey=hello_service_node");
+ EndpointAddress clientEndpoint = new EndpointAddress(amqpClientUri);
+ ChannelFactory<IHelloService> channelFactory =
+ new ChannelFactory<IHelloService>(amqpBinding, clientEndpoint);
+ IHelloService clientProxy = channelFactory.CreateChannel();
+
+ clientProxy.SayHello("Greetings from WCF client");
+
+ // wait for service to process the greeting
+ while (HelloService.GreetingCount == 0)
+ {
+ Thread.Sleep(100);
+ }
+ channelFactory.Close();
+ serviceHost.Close();
}
catch (Exception e)
{
- Console.WriteLine("Exception: {0}", e);
+ Console.WriteLine("Exception: {0}", e);
+ }
+ }
+ }
}
- }
- }
-}
]]></programlisting>
</example>
@@ -4059,22 +4059,22 @@ namespace Apache.Qpid.Documentation.HelloService
the Qpid C++ "Hello world!" example.</para>
<example><?dbfo keep-together="auto" ?>
- <title>Binary "Hello world!" example using the channel model</title>
- <programlisting><![CDATA[
-namespace Apache.Qpid.Samples.Channel.HelloWorld
-{
- using System;
- using System.ServiceModel;
- using System.ServiceModel.Channels;
- using System.ServiceModel.Description;
- using System.Text;
- using System.Xml;
- using Apache.Qpid.Channel;
-
- public class HelloWorld
- {
- static void Main(string[] args)
- {
+ <title>Binary "Hello world!" example using the channel model</title>
+ <programlisting><![CDATA[
+ namespace Apache.Qpid.Samples.Channel.HelloWorld
+ {
+ using System;
+ using System.ServiceModel;
+ using System.ServiceModel.Channels;
+ using System.ServiceModel.Description;
+ using System.Text;
+ using System.Xml;
+ using Apache.Qpid.Channel;
+
+ public class HelloWorld
+ {
+ static void Main(string[] args)
+ {
String broker = "localhost";
int port = 5672;
String target = "amq.topic";
@@ -4082,22 +4082,22 @@ namespace Apache.Qpid.Samples.Channel.HelloWorld
if (args.Length > 0)
{
- broker = args[0];
+ broker = args[0];
}
if (args.Length > 1)
{
- port = int.Parse(args[1]);
+ port = int.Parse(args[1]);
}
if (args.Length > 2)
{
- target = args[2];
+ target = args[2];
}
if (args.Length > 3)
{
- source = args[3];
+ source = args[3];
}
AmqpBinaryBinding binding = new AmqpBinaryBinding();
@@ -4120,7 +4120,7 @@ namespace Apache.Qpid.Samples.Channel.HelloWorld
XmlDictionaryReader reader = message.GetReaderAtBodyContents();
while (!reader.HasValue)
{
- reader.Read();
+ reader.Read();
}
byte[] binaryContent = reader.ReadContentAsBase64();
@@ -4130,24 +4130,24 @@ namespace Apache.Qpid.Samples.Channel.HelloWorld
senderFactory.Close();
receiverFactory.Close();
- }
- }
+ }
+ }
- public class HelloWorldBinaryBodyWriter : BodyWriter
- {
- public HelloWorldBinaryBodyWriter() : base (true) {}
+ public class HelloWorldBinaryBodyWriter : BodyWriter
+ {
+ public HelloWorldBinaryBodyWriter() : base (true) {}
- protected override void OnWriteBodyContents(XmlDictionaryWriter writer)
- {
+ protected override void OnWriteBodyContents(XmlDictionaryWriter writer)
+ {
byte[] binaryContent = Encoding.UTF8.GetBytes("Hello world!");
// wrap the content:
writer.WriteStartElement("Binary");
writer.WriteBase64(binaryContent, 0, binaryContent.Length);
- }
- }
-}
-]]></programlisting>
+ }
+ }
+ }
+ ]]></programlisting>
</example>
<para>Bindings define ChannelFactories and ChannelListeners associated with
diff --git a/doc/book/src/QmfBook.xml b/doc/book/src/qmf/QmfBook.xml
index 64a6545fb5..64a6545fb5 100644
--- a/doc/book/src/QmfBook.xml
+++ b/doc/book/src/qmf/QmfBook.xml
diff --git a/doc/book/src/QmfIntroduction.xml b/doc/book/src/qmf/QmfIntroduction.xml
index db7b8949a5..db7b8949a5 100644
--- a/doc/book/src/QmfIntroduction.xml
+++ b/doc/book/src/qmf/QmfIntroduction.xml
diff --git a/doc/book/src/schemas.xml b/doc/book/src/schemas.xml
deleted file mode 100644
index d0bec81aed..0000000000
--- a/doc/book/src/schemas.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- 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.
-
--->
-
-<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
- <uri resource="foo.xml" typeId="DocBook"/>
- <uri resource="foo.xml" typeId="DocBook"/>
- <uri resource="Programming-In-Apache-Qpid.xml" typeId="DocBook"/>
- <uri resource="queue-state-replication.xml" typeId="DocBook"/>
- <uri resource="AMQP-Messaging-Broker-Java-Book.xml" typeId="DocBook"/>
- <uri resource="High-Level-API.xml" typeId="DocBook"/>
- <uri resource="High-Level-API.xml" typeId="DocBook"/>
- <uri resource="Java-JMS-Selector-Syntax.xml" typeId="DocBook"/>
- <uri resource="ACL.xml" typeId="DocBook"/>
- <uri resource="Add-New-Users.xml" typeId="DocBook"/>
- <uri resource="AMQP-C++-Messaging-Client.xml" typeId="DocBook"/>
- <uri resource="AMQP-Compatibility.xml" typeId="DocBook"/>
- <uri resource="AMQP-Java-JMS-Messaging-Client.xml" typeId="DocBook"/>
- <uri resource="AMQP-Messaging-Broker-CPP.xml" typeId="DocBook"/>
- <uri resource="AMQP-Messaging-Broker-Java.xml" typeId="DocBook"/>
- <uri resource="AMQP-.NET-Messaging-Client.xml" typeId="DocBook"/>
- <uri resource="AMQP-Python-Messaging-Client.xml" typeId="DocBook"/>
- <uri resource="AMQP-Ruby-Messaging-Client.xml" typeId="DocBook"/>
- <uri resource="AMQP.xml" typeId="DocBook"/>
- <uri resource="Binding-URL-Format.xml" typeId="DocBook"/>
- <uri resource="Book-Info.xml" typeId="DocBook"/>
- <uri resource="Book.xml" typeId="DocBook"/>
- <uri resource="Broker-CPP.xml" typeId="DocBook"/>
- <uri resource="Broker-Java.xml" typeId="DocBook"/>
- <uri resource="Cheat-Sheet-for-configuring-Exchange-Options.xml" typeId="DocBook"/>
- <uri resource="Cheat-Sheet-for-configuring-Queue-Options.xml" typeId="DocBook"/>
- <uri resource="Clients.xml" typeId="DocBook"/>
- <uri resource="Configure-ACLs.xml" typeId="DocBook"/>
- <uri resource="Configure-Java-Qpid-to-use-a-SSL-connection.xml" typeId="DocBook"/>
- <uri resource="Configure-Log4j-CompositeRolling-Appender.xml" typeId="DocBook"/>
- <uri resource="Configure-the-Broker-via-config.xml.xml" typeId="DocBook"/>
- <uri resource="Configure-the-Virtual-Hosts-via-virtualhosts.xml.xml" typeId="DocBook"/>
- <uri resource="Configuring-Management-Users.xml" typeId="DocBook"/>
- <uri resource="Configuring-Qpid-JMX-Management-Console.xml" typeId="DocBook"/>
- <uri resource="Connection-URL-Format.xml" typeId="DocBook"/>
- <uri resource="Debug-using-log4j.xml" typeId="DocBook"/>
- <uri resource="Download.xml" typeId="DocBook"/>
- <uri resource="Excel-AddIn.xml" typeId="DocBook"/>
- <uri resource="FAQ.xml" typeId="DocBook"/>
- <uri resource="foo.xml" typeId="DocBook"/>
- <uri resource="f.xml" typeId="DocBook"/>
- <uri resource="Getting-Started.xml" typeId="DocBook"/>
- <uri resource="How-to-Tune-M3-Java-Broker-Performance.xml" typeId="DocBook"/>
- <uri resource="How-to-Use-JNDI.xml" typeId="DocBook"/>
- <uri resource="Introduction.xml" typeId="DocBook"/>
- <uri resource="Java-Broker-Feature-Guide.xml" typeId="DocBook"/>
- <uri resource="Java-Environment-Variables.xml" typeId="DocBook"/>
- <uri resource="LVQ.xml" typeId="DocBook"/>
- <uri resource="Management-Console-Security.xml" typeId="DocBook"/>
- <uri resource="Management-Design-notes.xml" typeId="DocBook"/>
- <uri resource="Managing-CPP-Broker.xml" typeId="DocBook"/>
- <uri resource="MessageStore-Tool.xml" typeId="DocBook"/>
- <uri resource="NET-User-Guide.xml" typeId="DocBook"/>
- <uri resource="PythonBrokerTest.xml" typeId="DocBook"/>
- <uri resource="QMan-Qpid-Management-bridge.xml" typeId="DocBook"/>
- <uri resource="QMF-Python-Console-Tutorial.xml" typeId="DocBook"/>
- <uri resource="Qpid-ACLs.xml" typeId="DocBook"/>
- <uri resource="Qpid-Interoperability-Documentation.xml" typeId="DocBook"/>
- <uri resource="Qpid-Java-Broker-Management-CLI.xml" typeId="DocBook"/>
- <uri resource="Qpid-Java-Build-How-To.xml" typeId="DocBook"/>
- <uri resource="Qpid-Java-FAQ.xml" typeId="DocBook"/>
- <uri resource="Qpid-JMX-Management-Console-FAQ.xml" typeId="DocBook"/>
- <uri resource="Qpid-JMX-Management-Console-User-Guide.xml" typeId="DocBook"/>
- <uri resource="Qpid-JMX-Management-Console.xml" typeId="DocBook"/>
- <uri resource="Qpid-Management-Features.xml" typeId="DocBook"/>
- <uri resource="Qpid-Management-Framework.xml" typeId="DocBook"/>
- <uri resource="Qpid-Troubleshooting-Guide.xml" typeId="DocBook"/>
- <uri resource="queue-state-replication.xml" typeId="DocBook"/>
- <uri resource="Running-CPP-Broker.xml" typeId="DocBook"/>
- <uri resource="SASL-Compatibility.xml" typeId="DocBook"/>
- <uri resource="SSL.xml" typeId="DocBook"/>
- <uri resource="Starting-a-cluster.xml" typeId="DocBook"/>
- <uri resource="System-Properties.xml" typeId="DocBook"/>
- <uri resource="Use-Priority-Queues.xml" typeId="DocBook"/>
- <uri resource="Using-Broker-Federation.xml" typeId="DocBook"/>
- <uri resource="Using-Qpid-with-other-JNDI-Providers.xml" typeId="DocBook"/>
- <uri resource="WCF.xml" typeId="DocBook"/>
-</locatingRules>