diff options
author | Jonathan Robie <jonathan@apache.org> | 2010-01-14 16:55:54 +0000 |
---|---|---|
committer | Jonathan Robie <jonathan@apache.org> | 2010-01-14 16:55:54 +0000 |
commit | 7bebe45fe72476fe98b1d391e8fa1de6a1e2c2ef (patch) | |
tree | 26340aa9825cbfa8282f19e685c854025b710e54 | |
parent | 425c785ed930986ac0fb8dbbb9c0e22f6354b7ce (diff) | |
download | qpid-python-7bebe45fe72476fe98b1d391e8fa1de6a1e2c2ef.tar.gz |
The next batch of converted documentation ...
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@899299 13f79535-47bb-0310-9956-ffa450edef68
26 files changed, 5198 insertions, 130 deletions
diff --git a/doc/book/src/AMQP compatibility.xml b/doc/book/src/AMQP compatibility.xml new file mode 100644 index 0000000000..5b6838a092 --- /dev/null +++ b/doc/book/src/AMQP compatibility.xml @@ -0,0 +1,692 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml" id="AMQP-Compatibility"> + <title> + Apache Qpid : AMQP compatibility + </title> + <para> + <emphasis>Qpid provides the most complete and compatible implementation + of AMQP. And is the most aggressive in implementing the latest + version of the specification. Qpid can be</emphasis> <emphasis><xref linkend="qpid_Download"/></emphasis> + </para> + <para> + There are two brokers: + </para> + + <itemizedlist> + <listitem><para>C++ with support for AMQP 0-10</para></listitem> + <listitem><para>Java with support for AMQP 0-8 and 0-9 (0-10 planned)</para></listitem> + </itemizedlist> + <para> + There are client libraries for C++, Java (JMS), .Net (written in + C#), python and ruby. + </para> + <itemizedlist> + <listitem><para>All clients support 0-10 and interoperate with the C++ + broker. + </para></listitem> + </itemizedlist> + <itemizedlist> + <listitem><para>The JMS client supports 0-8, 0-9 and 0-10 and interoperates + with both brokers. + </para></listitem> + </itemizedlist> + <itemizedlist> + <listitem><para>The python and ruby clients will also support all versions, + but the API is dynamically driven by the specification used and + so differs between versions. To work with the Java broker you + must use 0-8 or 0-9, to work with the C++ broker you must use + 0-10. + </para></listitem> + </itemizedlist> + <itemizedlist> + <listitem><para>There are two separate C# clients, one for 0-8 that + interoperates with the Java broker, one for 0-10 that + inteoperates with the C++ broker. + </para></listitem> + </itemizedlist> + <para> + QMF Management is supported in Ruby, Python, C++, and via QMan + for Java JMX & WS-DM. + </para> + <section role="h3" id="AMQPcompatibility-AMQPCompatibilityofQpidreleases-3A"> + <title> + AMQP + Compatibility of Qpid releases: + </title> + <para> + Qpid implements the AMQP Specification, and as the specification + has progressed Qpid is keeping up with the updates. This means + that different Qpid versions support different versions of AMQP. + Here is a simple guide on what use. + </para> + <para> + Here is a matrix that describes the different versions supported + by each release. The status symbols are interpreted as follows: + </para> + + <variablelist> + <varlistentry> + <term>Y</term> + <listitem><para>supported</para></listitem> + </varlistentry> + <varlistentry> + <term>N</term> + <listitem><para>unsupported</para></listitem> + </varlistentry> + <varlistentry> + <term>IP</term> + <listitem><para>in progress</para></listitem> + </varlistentry> + <varlistentry> + <term>P</term> + <listitem><para>planned</para></listitem> + </varlistentry> + </variablelist> + + <table> + <title/> + <tgroup cols="6"> + <tbody> + <row> + <entry> + Component + </entry> + <entry> + Spec + </entry> + <entry> + + </entry> + <entry> + + </entry> + <entry> + + </entry> + <entry> + + </entry> + </row> + <row> + <entry> + + </entry> + <entry> + + </entry> + <entry> + M2.1 + </entry> + <entry> + M3 + </entry> + <entry> + M4 + </entry> + <entry> + 0.5 + </entry> + </row> + <row> + <entry> + java client + </entry> + <entry> + 0-10 + </entry> + <entry> + + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + + </entry> + <entry> + 0-9 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + + </entry> + <entry> + 0-8 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + java broker + </entry> + <entry> + 0-10 + </entry> + <entry> + + </entry> + <entry> + + </entry> + <entry> + + </entry> + <entry> + P + </entry> + </row> + <row> + <entry> + + </entry> + <entry> + 0-9 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + + </entry> + <entry> + 0-8 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + c++ client/broker + </entry> + <entry> + 0-10 + </entry> + <entry> + + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + + </entry> + <entry> + 0-9 + </entry> + <entry> + Y + </entry> + <entry> + + </entry> + <entry> + + </entry> + <entry> + + </entry> + </row> + <row> + <entry> + python client + </entry> + <entry> + 0-10 + </entry> + <entry> + + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + + </entry> + <entry> + 0-9 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + + </entry> + <entry> + 0-8 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + ruby client + </entry> + <entry> + 0-10 + </entry> + <entry> + + </entry> + <entry> + + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + + </entry> + <entry> + 0-8 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + C# client + </entry> + <entry> + 0-10 + </entry> + <entry> + + </entry> + <entry> + + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + + </entry> + <entry> + 0-8 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + </tbody> + </tgroup> + </table> + <!--h3--> + </section> + + <section role="h3" id="AMQPcompatibility-InteroptablebyAMQPspecificationversion"> + <title> + Interop + table by AMQP specification version + </title> + <para> + Above table represented in another format. + </para> + <table> + <title/> + <tgroup cols="5"> + <tbody> + <row> + <entry> + + </entry> + <entry> + release + </entry> + <entry> + 0-8 + </entry> + <entry> + 0-9 + </entry> + <entry> + 0-10 + </entry> + </row> + <row> + <entry> + java client + </entry> + <entry> + M3 M4 0.5 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + java client + </entry> + <entry> + M2.1 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + N + </entry> + </row> + <row> + <entry> + java broker + </entry> + <entry> + M3 M4 0.5 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + N + </entry> + </row> + <row> + <entry> + java broker + </entry> + <entry> + trunk + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + P + </entry> + </row> + <row> + <entry> + java broker + </entry> + <entry> + M2.1 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + N + </entry> + </row> + <row> + <entry> + c++ client/broker + </entry> + <entry> + M3 M4 0.5 + </entry> + <entry> + N + </entry> + <entry> + N + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + c++ client/broker + </entry> + <entry> + M2.1 + </entry> + <entry> + N + </entry> + <entry> + Y + </entry> + <entry> + N + </entry> + </row> + <row> + <entry> + python client + </entry> + <entry> + M3 M4 0.5 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + </row> + <row> + <entry> + python client + </entry> + <entry> + M2.1 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + N + </entry> + </row> + <row> + <entry> + ruby client + </entry> + <entry> + M3 M4 0.5 + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + N + </entry> + </row> + <row> + <entry> + ruby client + </entry> + <entry> + trunk + </entry> + <entry> + Y + </entry> + <entry> + Y + </entry> + <entry> + P + </entry> + </row> + <row> + <entry> + C# client + </entry> + <entry> + M3 M4 0.5 + </entry> + <entry> + Y + </entry> + <entry> + N + </entry> + <entry> + N + </entry> + </row> + <row> + <entry> + C# client + </entry> + <entry> + trunk + </entry> + <entry> + Y + </entry> + <entry> + N + </entry> + <entry> + Y + </entry> + </row> + </tbody> + </tgroup> + </table> + <!--h3--> + </section> + +</chapter> diff --git a/doc/book/src/AMQP-Messaging-Broker-Java.xml b/doc/book/src/AMQP-Messaging-Broker-Java.xml index 15e37ed64e..c911f311d1 100644 --- a/doc/book/src/AMQP-Messaging-Broker-Java.xml +++ b/doc/book/src/AMQP-Messaging-Broker-Java.xml @@ -1,132 +1,36 @@ <?xml version="1.0"?> <section> - <title> - General - User Guides - </title> - <itemizedlist> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Java%20Broker%20Feature%20Guide.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Java%20FAQ.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Getting%20Started%20Guide.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Java%20Environment%20Variables.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Troubleshooting%20Guide.html"/> - </para> - </listitem> - </itemizedlist> - <bridgehead id="AMQPMessagingBroker%28implementedinJava%29-HowTos"><anchor id="AMQPMessagingBroker%28implementedinJava%29-HowTos"/>How Tos - </bridgehead> - <itemizedlist> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Add%20New%20Users.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20ACLs.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20Java%20Qpid%20to%20use%20a%20SSL%20connection..html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20Log4j%20CompositeRolling%20Appender.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20the%20Broker%20via%20config.xml.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20the%20Virtual%20Hosts%20via%20virtualhosts.xml.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Debug%20using%20log4j.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="How%20to%20Tune%20M3%20Java%20Broker%20Performance.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Java%20Build%20How%20To.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Use%20Priority%20Queues.html"/> - </para> - </listitem> - </itemizedlist> - <bridgehead id="AMQPMessagingBroker%28implementedinJava%29-ManagementTools"><anchor id="AMQPMessagingBroker%28implementedinJava%29-ManagementTools"/>Management - Tools - </bridgehead> - <itemizedlist> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20JMX%20Management%20Console.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="MessageStore%20Tool.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Java%20Broker%20Management%20CLI.html"/> - </para> - </listitem> - <listitem> - <para> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Management%20Design%20notes.html"/> - </para> - </listitem> - </itemizedlist> - <informaltable> - <tgroup cols="1"> - <colspec colnum="1" colname="col1"/> - <thead> - <row> - <entry> - <anchor id="comment-5144724"/> - <para> - Replaces <ulink url="http://cwiki.apache.org/confluence/display/qpid/Java+Broker"> - http://cwiki.apache.org/confluence/display/qpid/Java+Broker</ulink></para> - <para> - Identical content, changing title and location. - </para> - </entry> - </row> - </thead> - <tbody/> - </tgroup> - </informaltable> +<section> + <title>General User Guides</title> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Java%20Broker%20Feature%20Guide.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Java%20FAQ.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Java%20Environment%20Variables.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Troubleshooting%20Guide.xml"/> +</section> + +<section id="AMQPMessagingBroker%28implementedinJava%29-HowTos"> +<title>How Tos</title> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Add%20New%20Users.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20ACLs.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20Java%20Qpid%20to%20use%20a%20SSL%20connection..xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20Log4j%20CompositeRolling%20Appender.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20the%20Broker%20via%20config.xml.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Configure%20the%20Virtual%20Hosts%20via%20virtualhosts.xml.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Debug%20using%20log4j.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="How%20to%20Tune%20M3%20Java%20Broker%20Performance.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Java%20Build%20How%20To.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Use%20Priority%20Queues.xml"/> +</section> + +<section id="AMQPMessagingBroker%28implementedinJava%29-ManagementTools"> +<title>Management Tools</title> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20JMX%20Management%20Console.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="MessageStore%20Tool.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid%20Java%20Broker%20Management%20CLI.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Management%20Design%20notes.xml"/> + +</section> </section> diff --git a/doc/book/src/Add New Users.xml b/doc/book/src/Add New Users.xml new file mode 100644 index 0000000000..1f1e9bf5b6 --- /dev/null +++ b/doc/book/src/Add New Users.xml @@ -0,0 +1,215 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Add New Users + </title><para> + The Qpid Java Broker has a single reference source (<xref linkend="qpid_PrincipalDatabase"/>) that + defines all the users in the system. + </para><para> + To add a new user to the broker the password file must be + updated. The details about adding entries and when these updates + take effect are dependent on the file format each of which are + described below. + </para> + + <section role="h2" id="AddNewUsers-AvailablePasswordfileformats"><title> + Available + Password file formats + </title> + <para> + There are currently two different file formats available for use + depending on the PrincipalDatabase that is desired. In all cases + the clients need not be aware of the type of PrincipalDatabase in + use they only need support the SASL mechanisms they provide. + </para><itemizedlist> + <listitem><para> + <xref linkend="AddNewUsers-plain"/> + </para></listitem> + <listitem><para> + <xref linkend="AddNewUsers-base64md5"/> + </para></listitem> + </itemizedlist><para> + + </para> + + <section role="h3" id="AddNewUsers-Plain"><title> + Plain + </title> + <para> + The plain file has the following format: + </para> + <programlisting> +# Plain password authentication file. +# default name : passwd +# Format <username>:<password> +#e.g. +martin:password +</programlisting> + <para> + As the contents of the file are plain text and the password is + taken to be everything to the right of the ':'(colon). The + password, therefore, cannot contain a ':' colon, but this can be + used to delimit the password. + </para><para> + Lines starting with a '#' are treated as comments. + </para> +<!--h3--></section> + + <section role="h3" id="AddNewUsers-Whereisthepasswordfileformybroker-3F"><title> + Where is + the password file for my broker ? + </title> + <para> + The location of the password file in use for your broker is as + configured in your config.xml file. + </para> + <programlisting> +<principal-databases> + <principal-database> + <name>passwordfile</name> + <class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class> + <attributes> + <attribute> + <name>passwordFile</name> + <value>${conf}/passwd</value> + </attribute> + </attributes> + </principal-database> + </principal-databases> +</programlisting> + <para> + So in the example config.xml file this password file lives in the + directory specified as the conf directory (at the top of your + config.xml file). + </para><para> + If you wish to use Base64 encoding for your password file, then + in the <class> element above you should specify + org.apache.qpid.server.security.auth.database.Base64MD5PasswordFilePrincipalDatabase + </para><para> + The default is: + </para> + <programlisting> + <conf>${prefix}/etc</conf> +</programlisting> +<!--h3--></section> + + + <section role="h3" id="AddNewUsers-Base64MD5PasswordFileFormat"><title> + Base64MD5 + Password File Format + </title> + <para> + This format can be used to ensure that SAs cannot read the plain + text password values from your password file on disk. + </para><para> + The Base64MD5 file uses the following format: + </para> + <programlisting> +# Base64MD5 password authentication file +# default name : qpid.passwd +# Format <username>:<Base64 Encoded MD5 hash of the users password> +#e.g. +martin:X03MO1qnZdYdgyfeuILPmQ== +</programlisting> + <para> + As with the Plain format the line is delimited by a ':'(colon). + The password field contains the MD5 Hash of the users password + encoded in Base64. + </para><para> + This file is read on broker start-up and is not re-read. + </para> +<!--h3--></section> + + <section role="h3" id="AddNewUsers-HowcanIupdateaBase64MD5passwordfile-3F"><title> + How can + I update a Base64MD5 password file ? + </title> + <para> + To update the file there are two options: + </para><orderedlist> + <listitem><para>Edit the file by hand using the <emphasis>qpid-passwd</emphasis> tool + that will generate the required lines. The output from the tool + is the text that needs to be copied in to your active password + file. This tool is located in the broker bin directory. + Eventually it is planned for this tool to emulate the + functionality of <xref linkend="qpid_htpasswd"/> + for qpid passwd files. + <emphasis>NOTE:</emphasis> For the changes to be seen by the broker you must + either restart the broker or reload the data with the + management tools (see <xref linkend="qpid_Qpid-20JMX-20Management-20Console-20User-20Guide"/>) + </para></listitem> + <listitem><para>Use the management tools to create a new user. The changes + will be made by the broker to the password file and the new user + will be immediately available to the system (see <xref linkend="qpid_Qpid-20JMX-20Management-20Console-20User-20Guide"/>). + </para></listitem> + </orderedlist> +<!--h3--></section> +<!--h2--></section> + + + <section role="h2" id="AddNewUsers-Dynamicchangestopasswordfiles."><title> + Dynamic + changes to password files. + </title> + <para> + The Plain password file and the Base64MD5 format file are both + only read once on start up. + </para><para> + To make changes dynamically there are two options, both require + administrator access via the Management Console (see <xref linkend="qpid_Qpid-20JMX-20Management-20Console-20User-20Guide"/>) + </para><orderedlist> + <listitem><para>You can replace the file and use the console to reload its + contents. + </para></listitem> + <listitem><para>The management console provides an interface to create, + delete and amend the users. These changes are written back to the + active password file. + </para></listitem> + </orderedlist> +<!--h2--></section> + + <section role="h2" id="AddNewUsers-HowpasswordfilesandPrincipalDatabasesrelatetoauthenticationmechanisms"><title> + How password files and PrincipalDatabases relate to + authentication mechanisms + </title> + <para> + For each type of password file a PrincipalDatabase exists that + parses the contents. These PrincipalDatabases load various SASL + mechanism based on their supportability. e.g. the Base64MD5 file + format can't support Plain authentication as the plain password + is not available. Any client connecting need only be concerned + about the SASL module they support and not the type of + PrincipalDatabase. So I client that understands CRAM-MD5 will + work correctly with a Plain and Base64MD5 PrincipalDatabase. + </para><table><title/><tgroup cols="2"> + <tbody> + <row> + <entry> + FileFormat/PrincipalDatabase + </entry> + <entry> + SASL + </entry> + </row> + <row> + <entry> + Plain + </entry> + <entry> + AMQPLAIN PLAIN CRAM-MD5 + </entry> + </row> + <row> + <entry> + Base64MD5 + </entry> + <entry> + CRAM-MD5 CRAM-MD5-HASHED + </entry> + </row> + </tbody> + </tgroup></table><para> + For details of SASL support see <xref linkend="qpid_Qpid-20Interoperability-20Documentation"/> + </para> +<!--h2--></section> + +</chapter> diff --git a/doc/book/src/Brokers.xml b/doc/book/src/Brokers.xml index 8854f21234..52fd449464 100644 --- a/doc/book/src/Brokers.xml +++ b/doc/book/src/Brokers.xml @@ -9,7 +9,7 @@ <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>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> </partintro> <xi:include href="AMQP-Messaging-Broker-CPP.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> diff --git a/doc/book/src/Configure ACLs.xml b/doc/book/src/Configure ACLs.xml new file mode 100644 index 0000000000..2ccbbc4a84 --- /dev/null +++ b/doc/book/src/Configure ACLs.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"> + <title> + Apache Qpid : Configure ACLs + </title> + <section role="h2" id="ConfigureACLs-ConfigureACLs"> + <title> + Configure ACLs + </title> + <section role="h3" id="ConfigureACLs-Specification"> + <title> + Specification + </title> + <itemizedlist> + <listitem><para> + <xref linkend="qpid_Java-20XML-20ACLs"/> + </para></listitem> + <listitem><para> + <xref linkend="qpid_ACL"/> + </para></listitem> + </itemizedlist> + + <!--h3--> + </section> + + <section role="h3" id="ConfigureACLs-CBroker"> + <title> + C++ Broker + </title> + <para> + The C++ broker supports <xref linkend="qpid_ACL"/> of the ACLs + </para> + + <!--h3--> + </section> + + <section role="h3" id="ConfigureACLs-JavaBroker"> + <title> + Java Broker + </title> + + <itemizedlist> + <listitem><para> + <xref linkend="qpid_Java-20XML-20ACLs"/> + </para></listitem> + <listitem><para>Support for Version 2 specification is in progress. + </para></listitem> + </itemizedlist> + + <!--h3--> + </section> + + <!--h2--> + </section> + +</chapter> diff --git a/doc/book/src/Configure Java Qpid to use a SSL connection..xml b/doc/book/src/Configure Java Qpid to use a SSL connection..xml new file mode 100644 index 0000000000..7647490b2a --- /dev/null +++ b/doc/book/src/Configure Java Qpid to use a SSL connection..xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Configure Java Qpid to use a SSL connection. + </title> + + <section role="h2" id="ConfigureJavaQpidtouseaSSLconnection.-UsingSSLconnectionwithQpidJava."><title> + Using SSL connection with Qpid Java. + </title> + <para> + This section will show how to use SSL to enable secure + connections between a Java client and broker. + </para> +<!--h2--></section> + <section role="h2" id="ConfigureJavaQpidtouseaSSLconnection.-Setup"><title> + Setup + </title> + <section role="h3" id="ConfigureJavaQpidtouseaSSLconnection.-BrokerSetup"><title> + Broker + Setup + </title> + <para> + The broker configuration file (config.xml) needs to be updated to + include the SSL keystore location details. + </para> + +<programlisting> +<!-- Additions required to Connector Section --> + +<ssl> + <enabled>true</enabled> + <sslOnly>true</sslOnly> + <keystorePath>/path/to/keystore.ks</keystorePath> + <keystorePassword>keystorepass</keystorePassword> +</ssl> +</programlisting> + + <para> + The sslOnly option is included here for completeness however this + will disable the unencrypted port and leave only the SSL port + listening for connections. + </para> +<!--h3--></section> + <section role="h3" id="ConfigureJavaQpidtouseaSSLconnection.-ClientSetup"><title> + Client + Setup + </title> + <para> + The best place to start looking is class + <emphasis>SSLConfiguration</emphasis> this is provided to the connection + during creation however there is currently no example that + demonstrates its use. + </para> +<!--h3--></section> +<!--h2--></section> + + <section role="h2" id="ConfigureJavaQpidtouseaSSLconnection.-Performingtheconnection."><title> + Performing + the connection. + </title> + <para/> + <!--h2--></section> +</chapter> diff --git a/doc/book/src/Configure Log4j CompositeRolling Appender.xml b/doc/book/src/Configure Log4j CompositeRolling Appender.xml new file mode 100644 index 0000000000..47bd021f7c --- /dev/null +++ b/doc/book/src/Configure Log4j CompositeRolling Appender.xml @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Configure Log4j CompositeRolling Appender + </title> + <section role="h2" id="ConfigureLog4jCompositeRollingAppender-HowtoconfiguretheCompositeRollinglog4jAppender"><title> + How to configure the CompositeRolling log4j Appender + </title> + <para> + There are several sections of our default log4j file that will + need your attention if you wish to fully use this Appender. + </para> + + <orderedlist> + <listitem> + <para>Enable the Appender</para> + <para> + The default log4j.xml file uses the FileAppender, swap this for + the ArchivingFileAppender as follows: + </para> + <programlisting> + <!-- Log all info events to file --> + <root> + <priority value="info"/> + + <appender-ref ref="ArchivingFileAppender"/> + </root> +</programlisting> + </listitem> + <listitem> + <para> + Configure the Appender + </para> + + <para> + The Appender has a number of parameters that can be adjusted + depending on what you are trying to achieve. For clarity lets + take a quick look at the complete default appender: + </para> + <programlisting> + <appender name="ArchivingFileAppender" class="org.apache.log4j.QpidCompositeRollingAppender"> + <!-- Ensure that logs allways have the dateFormat set--> + <param name="StaticLogFileName" value="false"/> + <param name="File" value="${QPID_WORK}/log/${logprefix}qpid${logsuffix}.log"/> + <param name="Append" value="false"/> + <!-- Change the direction so newer files have bigger numbers --> + <!-- So log.1 is written then log.2 etc This prevents a lot of file renames at log rollover --> + <param name="CountDirection" value="1"/> + <!-- Use default 10MB --> + <!--param name="MaxFileSize" value="100000"/--> + <param name="DatePattern" value="'.'yyyy-MM-dd-HH-mm"/> + <!-- Unlimited number of backups --> + <param name="MaxSizeRollBackups" value="-1"/> + <!-- Compress(gzip) the backup files--> + <param name="CompressBackupFiles" value="true"/> + <!-- Compress the backup files using a second thread --> + <param name="CompressAsync" value="true"/> + <!-- Start at zero numbered files--> + <param name="ZeroBased" value="true"/> + <!-- Backup Location --> + <param name="backupFilesToPath" value="${QPID_WORK}/backup/log"/> + + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> + </layout> + </appender> +</programlisting> + <para> + The appender configuration has three groups of parameter + configuration. + </para><para> + The first group is for configuration of the file name. The + default is to write a log file to QPID_WORK/log/qpid.log + (Remembering you can use the logprefix and logsuffix values to + modify the file name, see Property Config). + </para> + <programlisting> + <!-- Ensure that logs always have the dateFormat set--> + <param name="StaticLogFileName" value="false"/> + <param name="File" value="${QPID_WORK}/log/${logprefix}qpid${logsuffix}.log"/> + <param name="Append" value="false"/> +</programlisting> + <para> + The second section allows the specification of a Maximum File + Size and a DatePattern that will be used to move on to the next + file. + </para><para> + When MaxFileSize is reached a new log file will be created + The DataPattern is used to decide when to create a new log file, + so here a new file will be created for every minute and every + 10Meg of data. So if 15MB of data is made every minute then there + will be two log files created each minute. One at the start of + the minute and a second when the file hit 10MB. When the next + minute arrives a new file will be made even though it only has + 5MB of content. For a production system it would be expected to + be changed to something like 'yyyy-MM-dd' which would make a new + log file each day and keep the files to a max of 10MB. + </para><para> + The final MaxSizeRollBackups allows you to limit the amount of + disk you are using by only keeping the last n backups. + </para> + <programlisting> + <!-- Change the direction so newer files have bigger numbers --> + <!-- So log.1 is written then log.2 etc This prevents a lot of file renames at log rollover --> + <param name="CountDirection" value="1"/> + <!-- Use default 10MB --> + <!--param name="MaxFileSize" value="100000"/--> + <param name="DatePattern" value="'.'yyyy-MM-dd-HH-mm"/> + <!-- Unlimited number of backups --> + <param name="MaxSizeRollBackups" value="-1"/> +</programlisting> + <para> + The final section allows the old log files to be compressed and + copied to a new location. + </para> + <programlisting> + <!-- Compress(gzip) the backup files--> + <param name="CompressBackupFiles" value="true"/> + <!-- Compress the backup files using a second thread --> + <param name="CompressAsync" value="true"/> + <!-- Start at zero numbered files--> + <param name="ZeroBased" value="true"/> + <!-- Backup Location --> + <param name="backupFilesToPath" value="${QPID_WORK}/backup/log"/> +</programlisting> +</listitem> +</orderedlist> +<!--h2--></section> +</chapter> diff --git a/doc/book/src/Configure the Broker via config.xml.xml b/doc/book/src/Configure the Broker via config.xml.xml new file mode 100644 index 0000000000..2895c8905d --- /dev/null +++ b/doc/book/src/Configure the Broker via config.xml.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"> + <title> + Apache Qpid : Configure the Broker via config.xml + </title> + <section role="h2" id="ConfiguretheBrokerviaconfig.xml-Brokerconfig.xmlOverview"> + <title> + Broker + config.xml Overview + </title> + <para> + The broker config.xml file which is shipped in the etc directory + of any Qpid binary distribution details various options and + configuration for the Java Qpid broker implementation. + </para> + <para> + In tandem with the virtualhosts.xml file, the config.xml file + allows you to control much of the deployment detail for your Qpid + broker in a flexible fashion. + </para> + <para> + Note that you can pass the config.xml you wish to use for your + broker instance to the broker using the -c command line option. + In turn, you can specify the paths for the broker password file + and virtualhosts.xml files in your config.xml for simplicity. + </para> + <para> + For more information about command line configuration options + please see <xref linkend="QpidDesign-Configuration-ConfigurationMethods"/>. + </para> + <!--h2--> + </section> + + <section role="h2" id="ConfiguretheBrokerviaconfig.xml-QpidVersion"> + <title> + Qpid + Version + </title> + <para> + The config format has changed between versions here you can find + the configuration details on a per version basis. + </para> + <para> + <xref linkend="qpid_M2-20--20config.xml"/> + <xref linkend="qpid_M2.1-20--20config.xml"/> + </para> + <!--h2--> + </section> + +</chapter> diff --git a/doc/book/src/Configure the Virtual Hosts via virtualhosts.xml.xml b/doc/book/src/Configure the Virtual Hosts via virtualhosts.xml.xml new file mode 100644 index 0000000000..e3fa29368c --- /dev/null +++ b/doc/book/src/Configure the Virtual Hosts via virtualhosts.xml.xml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Configure the Virtual Hosts via virtualhosts.xml + </title><section role="h2" id="ConfiguretheVirtualHostsviavirtualhosts.xml-virtualhosts.xmlOverview"><title> + virtualhosts.xml Overview + </title> + <para> + This configuration file contains details of all queues and + topics, and associated properties, to be created on broker + startup. These details are configured on a per virtual host + basis. + </para><para> + Note that if you do not add details of a queue or topic you + intend to use to this file, you must first create a consumer on a + queue/topic before you can publish to it using Qpid. + </para><para> + Thus most application deployments need a virtualhosts.xml file + with at least some minimal detail. + </para> + + <section role="h3" id="ConfiguretheVirtualHostsviavirtualhosts.xml-XMLFormatwithComments"><title> + XML Format with Comments + </title> + <para> + The virtualhosts.xml which currently ships as part of the Qpid + distribution is really targeted at development use, and supports + various artifacts commonly used by the Qpid development team. + </para><para> + As a result, it is reasonably complex. In the example XML below, + I have tried to simplify one example virtual host setup which is + possibly more useful for new users of Qpid or development teams + looking to simply make use of the Qpid broker in their + deployment. + </para><para> + I have also added some inline comments on each section, which + should give some extra information on the purpose of the various + elements. + </para> + + + + <programlisting> +<virtualhosts> + <!-- Sets the default virtual host for connections which do not specify a vh --> + <default>localhost</default> + <!-- Define a virtual host and all it's config --> + <virtualhost> + <name>localhost</name> + <localhost> + <!-- Define the types of additional AMQP exchange available for this vh --> + <!-- Always get amq.direct (for queues) and amq.topic (for topics) by default --> + <exchanges> + <!-- Example of declaring an additional exchanges type for developer use only --> + <exchange> + <type>direct</type> + <name>test.direct</name> + <durable>true</durable> + </exchange> + </exchanges> + + <!-- Define the set of queues to be created at broker startup --> + <queues> + <!-- The properties configured here will be applied as defaults to all --> + <!-- queues subsequently defined unless explicitly overridden --> + <exchange>amq.direct</exchange> + <!-- Set threshold values for queue monitor alerting to log --> + <maximumQueueDepth>4235264</maximumQueueDepth> <!-- 4Mb --> + <maximumMessageSize>2117632</maximumMessageSize> <!-- 2Mb --> + <maximumMessageAge>600000</maximumMessageAge> <!-- 10 mins --> + + <!-- Define a queue with all default settings --> + <queue> + <name>ping</name> + </queue> + <!-- Example definitions of queues with overriden settings --> + <queue> + <name>test-queue</name> + <test-queue> + <exchange>test.direct</exchange> + <durable>true</durable> + </test-queue> + </queue> + <queue> + <name>test-ping</name> + <test-ping> + <exchange>test.direct</exchange> + </test-ping> + </queue> + </queues> + </localhost> + </virtualhost> +</virtualhosts> +</programlisting> +<!--h3--></section> + <section role="h3" id="ConfiguretheVirtualHostsviavirtualhosts.xml-Usingyourownvirtualhosts.xml"><title> + Using your own virtualhosts.xml + </title> + + <para> + Note that the config.xml file shipped as an example (or developer + default) in the Qpid distribution contains an element which + defines the path to the virtualhosts.xml. + </para><para> + When using your own virtualhosts.xml you must edit this path to + point at the location of your file. + </para> +<!--h3--></section> +<!--h2--></section> +</chapter> diff --git a/doc/book/src/Configuring Management Users.xml b/doc/book/src/Configuring Management Users.xml new file mode 100644 index 0000000000..60ccbaf8e2 --- /dev/null +++ b/doc/book/src/Configuring Management Users.xml @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Configuring Management Users + </title><para> + The Qpid Java broker has a single source of users for the system. + So a user can connect to the broker to send messages and via the + JMX console to check the state of the broker. + </para><para> + + </para> + + <section role="h2" id="ConfiguringManagementUsers-Addinganewmanagementuser"><title> + Adding + a new management user + </title> + <para> + The broker does have some minimal configuration available to + limit which users can connect to the JMX console and what they + can do when they are there. + </para><para> + There are two steps required to add a new user with rights for + the JMX console. + </para><orderedlist> + <listitem><para>Create a new user login, see HowTo:<xref linkend="qpid_Add-20New-20Users"/> + </para></listitem> + <listitem><para>Grant the new user permission to the JMX Console + </para></listitem> + </orderedlist> + + <section role="h3" id="ConfiguringManagementUsers-GrantingJMXConsolePermissions"><title> + Granting + JMX Console Permissions + </title> + <para> + By default new users do not have access to the JMX console. The + access to the console is controlled via the file + <emphasis>jmxremote.access</emphasis>. + </para><para> + This file contains a mapping from user to privilege. + </para><para> + There are three privileges available: + </para><orderedlist> + <listitem><para>readonly - The user is able to log in and view queues but not + make any changes. + </para></listitem> + <listitem><para>readwrite - Grants user ability to read and write queue + attributes such as alerting values. + </para></listitem> + <listitem><para>admin - Grants the user full access including ability to edit + Users and JMX Permissions in addition to readwrite access. + </para></listitem> + </orderedlist><para> + This file is read at start up and can forcibly be reloaded by an + admin user through the management console. + </para> +<!--h3--></section> + + <section role="h3" id="ConfiguringManagementUsers-AccessFileFormat"><title> + Access + File Format + </title> + <para> + The file is a standard Java properties file and has the following + format + </para> + <programlisting> +<username>=<privilege> +</programlisting> + <para> + If the username value is not a valid user (list in the specified + PrincipalDatabase) then the broker will print a warning when it + reads the file as that entry will have no meaning. + </para><para> + Only when the the username exists in both the access file and the + PrincipalDatabase password file will the user be able to login + via the JMX Console. + </para><section role="h4" id="ConfiguringManagementUsers-ExampleFile"><title> + Example File + </title> + <para> + The file will be timestamped by the management console if edited + through the console. + </para> + <programlisting> +#Generated by JMX Console : Last edited by user:admin +#Tue Jun 12 16:46:39 BST 2007 +admin=admin +guest=readonly +user=readwrite +</programlisting> + +<!--h4--></section> +<!--h3--></section> +<!--h2--></section> +</chapter> diff --git a/doc/book/src/Configuring Qpid JMX Management Console.xml b/doc/book/src/Configuring Qpid JMX Management Console.xml new file mode 100644 index 0000000000..f44830d9e9 --- /dev/null +++ b/doc/book/src/Configuring Qpid JMX Management Console.xml @@ -0,0 +1,159 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Configuring Qpid JMX Management Console + </title><section role="h2" id="ConfiguringQpidJMXManagementConsole-ConfiguringQpidJMXManagementConsole"><title> + Configuring Qpid JMX Management Console + </title> + + <para> + Qpid has a JMX management interface that exposes a number of + components of the running broker. + You can find out more about the features exposed by the JMX + interfaces <xref linkend="qpid_Qpid-20Management-20Features"/>. + </para><para> + + </para> + + <section role="h3" id="ConfiguringQpidJMXManagementConsole-InstallingtheQpidJMXManagementConsole"><title> + Installing the Qpid JMX Management Console + </title> + + <orderedlist> + <listitem><para>Unzip the archive to a suitable location.</para> + + <note><title>SSL encrypted connections</title> + <para> + Recent versions of the broker can make use of SSL to + encrypt their RMI based JMX connections. If a broker + being connected to is making use of this ability then + additional console configuration may be required, + particularly when using self-signed certificates. See + <xref linkend="qpid_Management-20Console-20Security"/> for details. + </para> + </note> + </listitem> + </orderedlist> + + <note> + <title>JMXMP based connections</title> + <para> + In previous releases of Qpid (M4 and below) the broker + JMX connections could make use of the JMXMPConnector for + additional security over its default RMI based JMX + configuration. This is no longer the case, with SSL + encrypted RMI being the favored approach going forward. + However, if you wish to connect to an older broker using + JMXMP the console will support this so long as the + <emphasis>jmxremote_optional.jar</emphasis> file is provided to it. + For details see <xref linkend="qpid_Management-20Console-20Security"/>. + </para> + </note> +<!--h3--></section> + + + <section role="h3" id="ConfiguringQpidJMXManagementConsole-RunningtheQpidJMXManagementConsole"><title> + Running the Qpid JMX Management Console + </title> + + <para> + The console can be started in the following way, depending on + platform: + </para><itemizedlist> + <listitem><para>Windows: by running the 'qpidmc.exe' executable file. + </para></listitem> + </itemizedlist><itemizedlist> + <listitem><para>Linux: by running the 'qpidmc' executable. + </para></listitem> + </itemizedlist><itemizedlist> + <listitem><para>Mac OS X: by launching the consoles application bundle (.app + file). + </para></listitem> + </itemizedlist> +<!--h3--></section> + + + <section role="h3" id="ConfiguringQpidJMXManagementConsole-UsingtheQpidJMXManagementConsole"><title> + Using the Qpid JMX Management Console + </title> + + <para> + Please see <xref linkend="qpid_Qpid-20JMX-20Management-20Console-20User-20Guide"/> for details on using this Eclipse RCP + application. + </para> + +<!--h3--></section> +<!--h2--></section> + + <section role="h2" id="ConfiguringQpidJMXManagementConsole-UsingJConsole"><title> + Using + JConsole + </title> + + <para> + See <xref linkend="qpid_JConsole"/> + </para> +<!--h2--></section> + + + <section role="h2" id="ConfiguringQpidJMXManagementConsole-UsingHermesJMS"><title> + Using + HermesJMS + </title> + + <para> + HermesJMS also offers integration with the Qpid management + interfaces. You can get instructions and more information from + <xref linkend="qpid_HermesJMS"/>. + </para> +<!--h2--></section> + + <section role="h2" id="ConfiguringQpidJMXManagementConsole-UsingMC4J"><title> + Using + MC4J + </title> + + <para> + <xref linkend="qpid_www.mc4j.org"/> is an alternative + management tool. It provide a richer "dashboard" that can + customise the raw MBeans. + </para> + <section role="h4" id="ConfiguringQpidJMXManagementConsole-Installation"><title> + Installation + </title> + + <itemizedlist> + <listitem><para>First download and install MC4J for your platform. Version + 1.2 beta 9 is the latest version that has been tested. + </para></listitem> + <listitem><para>Copy the directory blaze/java/management/mc4j into + the directory <MC4J-Installation>/dashboards + </para></listitem> + </itemizedlist> +<!--h4--></section> + + <section role="h4" id="ConfiguringQpidJMXManagementConsole-Configuration"><title> + Configuration + </title> + + <para> + You should create a connection the JVM to be managed. Using the + Management->Create Server Connection menu option. The + connection URL should be of the form: + service:jmx:rmi:///jndi/rmi://localhost:8999/jmxrmi + making the appropriate host and post changes. + </para> +<!--h4--></section> + + <section role="h4" id="ConfiguringQpidJMXManagementConsole-Operation"><title> + Operation + </title> + + <para> + You can view tabular summaries of the queues, exchanges and + connections using the Global Dashboards->QPID tree view. To + drill down on individual beans you can right click on the bean. + This will show any available graphs too. + </para> +<!--h4--></section> +<!--h2--></section> +</chapter> diff --git a/doc/book/src/Debug using log4j.xml b/doc/book/src/Debug using log4j.xml new file mode 100644 index 0000000000..cdeb419809 --- /dev/null +++ b/doc/book/src/Debug using log4j.xml @@ -0,0 +1,276 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Debug using log4j + </title> + + <section role="h2" id="Debugusinglog4j-Debuggingwithlog4jconfigurations"><title> + Debugging + with log4j configurations + </title> + <para> + Unfortunately setting of logging in the Java Broker is not simply + a matter of setting one of WARN,INFO,DEBUG. At some point in the + future we may have more BAU logging that falls in to that + category but more likely is that we will have a varioius config + files that can be swapped in (dynamically) to understand what is + going on. + </para><para> + This page will be host to a variety of useful configuration + setups that will allow a user or developer to extract only the + information they are interested in logging. Each section will be + targeted at logging in a particular area and will include a full + log4j file that can be used. In addition the logging + <emphasis>category</emphasis> elements will be presented and discussed so + that the user can create their own file. + </para><para> + Currently the configuration that is available has not been fully + documented and as such there are gaps in what is desired and what + is available. Some times this is due to the desire to reduce the + overhead in message processing, but sometimes it is simply an + oversight. Hopefully in future releases the latter will be + addressed but care needs to be taken when adding logging to the + 'Message Flow' path as this will have performance implications. + </para> + + <section role="h3" id="Debugusinglog4j-LoggingConnectionState-5CDeprecated-5C"><title> + Logging + Connection State *Deprecated* + </title> + <para> + <emphasis>deprecation notice</emphasis> Version 0.6 of the Java broker includes + <xref linkend="qpid_Configure-20Operational-20Status-20Logging"/> functionality which improves upon these messages and + as such enabling status logging would be more beneficial. + The configuration file has been left here for assistence with + broker versions prior to 0.6. + </para><para> + The goals of this configuration are to record: + </para><itemizedlist> + <listitem><para>New Connections + </para></listitem> + <listitem><para>New Consumers + </para></listitem> + <listitem><para>Identify slow consumers + </para></listitem> + <listitem><para>Closing of Consumers + </para></listitem> + <listitem><para>Closing of Connections + </para></listitem> + </itemizedlist><para> + An additional goal of this configuration is to minimise any + impact to the 'message flow' path. So it should not adversely + affect production systems. + </para> +<programlisting> +<![CDATA[ +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> + <appender name="FileAppender" class="org.apache.log4j.FileAppender"> + <param name="File" value="${QPID_WORK}/log/${logprefix}qpid${logsuffix}.log"/> + <param name="Append" value="false"/> + + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> + </layout> + + </appender> + + <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender"> + + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> + </layout> + </appender> + + <category name="Qpid.Broker"> + + <priority value="debug"/> + </category> + + + <!-- Provide warnings to standard output --> + <category name="org.apache.qpid"> + <priority value="warn"/> + </category> + + + <!-- Connection Logging --> + + <!-- Log details of client starting connection --> + <category name="org.apache.qpid.server.handler.ConnectionStartOkMethodHandler"> + <priority value="info"/> + </category> + <!-- Log details of client closing connection --> + <category name="org.apache.qpid.server.handler.ConnectionCloseMethodHandler"> + <priority value="info"/> + </category> + <!-- Log details of client responding to be asked to closing connection --> + + <category name="org.apache.qpid.server.handler.ConnectionCloseOkMethodHandler"> + <priority value="info"/> + </category> + + + <!-- Consumer Logging --> + <!-- Provide details of Consumers connecting--> + <category name="org.apache.qpid.server.handler.BasicConsumeMethodHandler"> + <priority value="debug"/> + </category> + + <!-- Provide details of Consumers disconnecting, if the call it--> + <category name="org.apache.qpid.server.handler.BasicCancelMethodHandler"> + <priority value="debug"/> + </category> + <!-- Provide details of when a channel closes to attempt to match to the Consume as a Cancel is not always issued--> + <category name="org.apache.qpid.server.handler.ChannelCloseHandler"> + <priority value="info"/> + </category> + + <!-- Provide details of Consumers starting to consume--> + <category name="org.apache.qpid.server.handler.ChannelFlowHandler"> + <priority value="debug"/> + </category> + <!-- Provide details of what consumers are going to be consuming--> + <category name="org.apache.qpid.server.handler.QueueBindHandler"> + <priority value="info"/> + </category> + + <!-- No way of determining if publish message is returned, client log should show it.--> + + <root> + <priority value="debug"/> + <appender-ref ref="STDOUT"/> + <appender-ref ref="FileAppender"/> + </root> + +</log4j:configuration> +]]> +</programlisting> + <!--h3--></section> + + <section role="h3" id="Debugusinglog4j-DebuggingMyApplication"><title> + Debugging My + Application + </title> + <para> + This is the most often asked for set of configuration. The goals + of this configuration are to record: + </para><itemizedlist> + <listitem><para>New Connections + </para></listitem> + <listitem><para>New Consumers + </para></listitem> + <listitem><para>Message Publications + </para></listitem> + <listitem><para>Message Consumption + </para></listitem> + <listitem><para>Identify slow consumers + </para></listitem> + <listitem><para>Closing of Consumers + </para></listitem> + <listitem><para>Closing of Connections + </para></listitem> + </itemizedlist><para> + NOTE: This configuration enables message logging on the 'message + flow' path so should only be used were message volume is + low. + <emphasis>Every message that is sent to the broker will generate at + least four logging statements</emphasis> + </para> +<programlisting> +<![CDATA[ +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> + <appender name="FileAppender" class="org.apache.log4j.FileAppender"> + <param name="File" value="${QPID_WORK}/log/${logprefix}qpid${logsuffix}.log"/> + <param name="Append" value="false"/> + + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> + </layout> + + </appender> + + <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender"> + + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> + </layout> + </appender> + + <category name="Qpid.Broker"> + + <priority value="debug"/> + </category> + + + <!-- Provide warnings to standard output --> + <category name="org.apache.qpid"> + <priority value="warn"/> + </category> + + + <!-- Connection Logging --> + + <!-- Log details of client starting connection --> + <category name="org.apache.qpid.server.handler.ConnectionStartOkMethodHandler"> + <priority value="info"/> + </category> + <!-- Log details of client closing connection --> + <category name="org.apache.qpid.server.handler.ConnectionCloseMethodHandler"> + <priority value="info"/> + </category> + <!-- Log details of client responding to be asked to closing connection --> + + <category name="org.apache.qpid.server.handler.ConnectionCloseOkMethodHandler"> + <priority value="info"/> + </category> + + <!-- Consumer Logging --> + <!-- Provide details of Consumers connecting--> + <category name="org.apache.qpid.server.handler.BasicConsumeMethodHandler"> + <priority value="debug"/> + </category> + + <!-- Provide details of Consumers disconnecting, if the call it--> + <category name="org.apache.qpid.server.handler.BasicCancelMethodHandler"> + <priority value="debug"/> + </category> + <!-- Provide details of when a channel closes to attempt to match to the Consume as a Cancel is not always issued--> + <category name="org.apache.qpid.server.handler.ChannelCloseHandler"> + <priority value="info"/> + </category> + + <!-- Provide details of Consumers starting to consume--> + <category name="org.apache.qpid.server.handler.ChannelFlowHandler"> + <priority value="debug"/> + </category> + <!-- Provide details of what consumers are going to be consuming--> + <category name="org.apache.qpid.server.handler.QueueBindHandler"> + <priority value="info"/> + </category> + + <!-- No way of determining if publish message is returned, client log should show it.--> + + <!-- WARNING DO NOT ENABLE THIS IN PRODUCTION --> + <!-- Will generate minimum one log statements per published message --> + <!-- Will generate will log receiving of all body frame, count will vary on size of message.--> + <!-- Empty Message = no body, Body is up to 64kb of data --> + <!-- Will generate three log statements per recevied message --> + + <!-- Log messages flow--> + <category name="org.apache.qpid.server.AMQChannel"> + + <priority value="debug"/> + </category> + + <root> + <priority value="debug"/> + <appender-ref ref="STDOUT"/> + <appender-ref ref="FileAppender"/> + </root> + +</log4j:configuration> +]]> +</programlisting> + +<!--h3--></section> +<!--h2--></section> +</chapter> diff --git a/doc/book/src/How to Tune M3 Java Broker Performance.xml b/doc/book/src/How to Tune M3 Java Broker Performance.xml new file mode 100644 index 0000000000..109e283a22 --- /dev/null +++ b/doc/book/src/How to Tune M3 Java Broker Performance.xml @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"> + <title> + Apache Qpid : How to Tune M3 Java Broker Performance + </title> + <section role="h3" id="HowtoTuneM3JavaBrokerPerformance-ProblemStatement"> + <title> + Problem + Statement + </title> + <para> + During destructive testing of the Qpid M3 Java Broker, we tested + some tuning techniques and deployment changes to improve the Qpid + M3 Java Broker's capacity to maintain high levels of throughput, + particularly in the case of a slower consumer than produceer + (i.e. a growing backlog). + </para> + <para> + The focus of this page is to detail the results of tuning & + deployment changes trialled. + </para> + <para> + The successful tuning changes are applicable for any deployment + expecting to see bursts of high volume throughput (1000s of + persistent messages in large batches). Any user wishing to use + these options <emphasis>must test them thoroughly in their own + environment with representative volumes</emphasis>. + </para> + <!--h3--> + </section> + + <section role="h3" id="HowtoTuneM3JavaBrokerPerformance-SuccessfulTuningOptions"> + <title> + Successful + Tuning Options + </title> + <para> + The key scenario being taregetted by these changes is a broker + under heavy load (processing a large batch of persistent + messages)can be seen to perform slowly when filling up with an + influx of high volume transient messages which are queued behind + the persistent backlog. However, the changes suggested will be + equally applicable to general heavy load scenarios. + </para> + <para> + The easiest way to address this is to separate streams of + messages. Thus allowing the separate streams of messages to be + processed, and preventing a backlog behind a particular slow + consumer. + </para> + <para> + These strategies have been successfully tested to mitigate this + problem: + </para> + <table> + <title/> + <tgroup cols="2"> + <tbody> + <row> + <entry> + Strategy + </entry> + <entry> + Result + </entry> + </row> + <row> + <entry> + Seperate connections to one broker for separate streams of + messages. + </entry> + <entry> + Messages processed successfully, no problems experienced + </entry> + </row> + <row> + <entry> + Seperate brokers for transient and persistent messages. + </entry> + <entry> + Messages processed successfully, no problems experienced + </entry> + </row> + </tbody> + </tgroup> + </table> + <para> + <emphasis>Separate Connections</emphasis> + Using separate connections effectively means that the two streams + of data are not being processed via the same buffer, and thus the + broker gets & processes the transient messages while + processing the persistent messages. Thus any build up of + unprocessed data is minimal and transitory. + </para> + <para> + <emphasis>Separate Brokers</emphasis> + Using separate brokers may mean more work in terms of client + connection details being changed, and from an operational + perspective. However, it is certainly the most clear cut way of + isolating the two streams of messages and the heaps impacted. + </para> + <section role="h4" id="HowtoTuneM3JavaBrokerPerformance-Additionaltuning"> + <title> + Additional + tuning + </title> + <para> + It is worth testing if changing the size of the Qpid read/write + thread pool improves performance (eg. by setting + JAVA_OPTS="-Damqj.read_write_pool_size=32" before running + qpid-server). By default this is equal to the number of CPU + cores, but a higher number may show better performance with some + work loads. + </para> + <para> + It is also important to note that you should give the Qpid broker + plenty of memory - for any serious application at least a -Xmx of + 3Gb. If you are deploying on a 64 bit platform, a larger heap is + definitely worth testing with. We will be testing tuning options + around a larger heap shortly. + </para> + <!--h4--> + </section> + <!--h3--> + </section> + + <section role="h3" id="HowtoTuneM3JavaBrokerPerformance-NextSteps"> + <title> + Next + Steps + </title> + <para> + These two options have been testing using a Qpid test case, and + demonstrated that for a test case with a profile of persistent + heavy load following by constant transient high load traffic they + provide significant improvment. + </para> + <para> + However, the deploying project <emphasis>must</emphasis> complete their own + testing, using the same destructive test cases, representative + message paradigms & volumes, in order to verify the proposed + mitigation options. + </para> + <para> + The using programme should then choose the option most applicable + for their deployment and perform BAU testing before any + implementation into a production or pilot environment. + </para> + <!--h3--> + </section> +</chapter> diff --git a/doc/book/src/Java Broker Feature Guide.xml b/doc/book/src/Java Broker Feature Guide.xml new file mode 100644 index 0000000000..db6ea50927 --- /dev/null +++ b/doc/book/src/Java Broker Feature Guide.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"> + <title> + Apache Qpid : Java Broker Feature Guide + </title> + <section role="h3" id="JavaBrokerFeatureGuide-TheQpidpureJavabrokercurrentlysupportsthefollowingfeatures-3A"> + <title> + The Qpid pure Java broker currently supports the following + features: + </title> + <itemizedlist> + <listitem><para>All features required by the Sun JMS 1.1 specification, fully + tested + </para></listitem> + <listitem><para>Transaction support + </para></listitem> + <listitem><para>Persistence using a pluggable layer + </para></listitem> + <listitem><para>Pluggable security using SASL + </para></listitem> + <listitem><para>Management using JMX and an Eclipse Management Console + application + </para></listitem> + <listitem><para>High performance header-based routing for messages + </para></listitem> + <listitem><para>Message Priorities + </para></listitem> + <listitem><para>Configurable logging and log archiving + </para></listitem> + <listitem><para>Threshold alerting + </para></listitem> + <listitem><para>ACLs + </para></listitem> + <listitem><para>Extensively tested on each release, including performance + & reliability testing + </para></listitem> + <listitem><para>Automatic client failover using configurable connection + properties + </para></listitem> + <listitem><para>Durable Queues/Subscriptions + </para></listitem> + </itemizedlist> + <section role="h3" id="JavaBrokerFeatureGuide-Upcomingfeatures-3A"> + <title> + Upcoming + features: + </title> + <itemizedlist> + <listitem><para>Flow To Disk + </para></listitem> + <listitem><para>IP Whitelist + </para></listitem> + <listitem><para>AMQP 0-10 Support (for interoperability) + </para></listitem> + </itemizedlist> + + <!--h3--> + </section> + + <!--h3--> + </section> + +</chapter> diff --git a/doc/book/src/Java Environment Variables.xml b/doc/book/src/Java Environment Variables.xml new file mode 100644 index 0000000000..cc549aa277 --- /dev/null +++ b/doc/book/src/Java Environment Variables.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"> + <title> + Apache Qpid : Java Environment Variables + </title> + <section role="h2" id="JavaEnvironmentVariables-SettingQpidEnvironmentVariables"> + <title> + Setting + Qpid Environment Variables + </title> + + <section role="h3" id="JavaEnvironmentVariables-QpidDeploymentPathVariables"> + <title> + Qpid + Deployment Path Variables + </title> + <para> + There are two main Qpid environment variables which are required + to be set for Qpid deployments, QPID_HOME and QPID_WORK. + </para> + <para> + QPID_HOME - This variable is used to tell the Qpid broker where + it's installed home is, which is in turn used to find dependency + JARs which Qpid uses. + </para> + <para> + QPID_WORK - This variable is used by Qpid when creating all + 'writeable' directories that it uses. This includes the log + directory and the storage location for any BDB instances in use + by your deployment (if you're using persistence with BDB). If you + do not set this variable, then the broker will default (in the + qpid-server script) to use the current user's homedir as the root + directory for creating the writeable locations that it uses. + </para> + + <!--h3--> + </section> + + <section role="h3" id="JavaEnvironmentVariables-SettingMaxMemoryforthebroker"> + <title> + Setting + Max Memory for the broker + </title> + <para> + If you simply start the Qpid broker, it will default to use a + -Xmx setting of 1024M for the broker JVM. However, we would + recommend that you make the maximum -Xmx heap size available, if + possible, of 3Gb (for 32-bit platforms). + </para> + <para> + You can control the memory setting for your broker by setting the + QPID_JAVA_MEM variable before starting the broker e.g. -Xmx3668m + . Enclose your value within quotes if you also specify a -Xms + value. The value in use is echo'd by the qpid-server script on + startup. + </para> + <!--h3--> + </section> + + <!--h2--> + </section> + +</chapter> diff --git a/doc/book/src/Management Console Security.xml b/doc/book/src/Management Console Security.xml new file mode 100644 index 0000000000..a141bb1ccb --- /dev/null +++ b/doc/book/src/Management Console Security.xml @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Management Console Security + </title><section role="h1" id="ManagementConsoleSecurity-ManagementConsoleSecurity"><title> + Management + Console Security + </title> + <itemizedlist> + <listitem><para> + <xref linkend="ManagementConsoleSecurity-SSLencryptedRMI-280.5andabove-29"/> + </para></listitem> + <listitem><para> + <xref linkend="ManagementConsoleSecurity-JMXMP-28M4andprevious-29"/> + </para></listitem> + <listitem><para> + <xref linkend="ManagementConsoleSecurity-UserAccounts-26AccessRights"/> + </para></listitem> + </itemizedlist> + <section role="h2" id="ManagementConsoleSecurity-SSLencryptedRMI-280.5andabove-29"><title> + SSL + encrypted RMI (0.5 and above) + </title> + <para> + Current versions of the broker make use of SSL encryption to + secure their RMI based JMX ConnectorServer for security purposes. + This ships enabled by default, although the test SSL keystore + used during development is not provided for security reasons + (using this would provide no security as anyone could have access + to it). + </para><section role="h3" id="ManagementConsoleSecurity-BrokerConfiguration"><title> + Broker + Configuration + </title> + + <para> + 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. + </para><para> + The broker must be configured with a keystore containing the + private and public keys associated with its SSL certificate. This + is accomplished by setting the Java environment properties + <emphasis>javax.net.ssl.keyStore</emphasis> and + <emphasis>javax.net.ssl.keyStorePassword</emphasis> respectively with the + location and password of an appropriate SSL keystore. Entries for + these properties exist in the brokers main configuration file + alongside the other management settings (see below), although the + command line options will still work and take precedence over the + configuration file. + </para> + <programlisting> +<management> + <ssl> + <enabled>true</enabled> + <!-- Update below path to your keystore location, eg ${conf}/qpid.keystore --> + <keyStorePath>${prefix}/../test_resources/ssl/keystore.jks</keyStorePath> + <keyStorePassword>password</keyStorePassword> + </ssl> +</management> +</programlisting> +<!--h3--></section> + + <section role="h3" id="ManagementConsoleSecurity-JMXManagementConsoleConfiguration"><title> + JMX + Management Console Configuration + </title> + + <para> + If the broker makes use of an SSL certificate signed by a known + signing CA (Certification Authority), the management console + needs no extra configuration, and will make use of Java's + built-in CA + truststore for certificate verification (you may however have to + update the system-wide default truststore if your CA is not + already present in it). + </para><para> + If however you wish to use a self-signed SSL certificate, then + the management console must be provided with an SSL truststore + containing a record for the SSL certificate so that it is able to + validate it when presented by the broker. This is performed by + setting the <emphasis>javax.net.ssl.trustStore</emphasis> and + <emphasis>javax.net.ssl.trustStorePassword</emphasis> environment variables + when starting the console. This can be done at the command line, + or alternatively an example configuration has been made within + the console's qpidmc.ini launcher configuration file that may + pre-configured in advance for repeated usage. See the <xref linkend="qpid_Qpid-20JMX-20Management-20Console-20User-20Guide"/> for more + information on this configuration process. + </para> +<!--h3--></section> + + <section role="h3" id="ManagementConsoleSecurity-JConsoleConfiguration"><title> + JConsole + Configuration + </title> + + <para> + As with the JMX Management Console above, if the broker is using + a self-signed SSL certificate then in order to connect remotely + using JConsole, an appropriate trust store must be provided at + startup. See <xref linkend="qpid_JConsole"/> for further details on configuration. + </para> +<!--h3--></section> + + <section role="h3" id="ManagementConsoleSecurity-AdditionalInformation"><title> + Additional + Information + </title> + + <para> + More information on Java's handling of SSL certificate + verification and customizing the keystores can be found in the + <xref linkend="qpid_JSSERefGuide"/> . + </para> +<!--h3--></section> +<!--h2--></section> + + + + <section role="h2" id="ManagementConsoleSecurity-JMXMP-28M4andprevious-29"><title> + JMXMP + (M4 and previous) + </title> + + <para> + In previous releases of Qpid (M4 and below) the broker, can make + use of Sun's Java Management Extensions Messaging Protocol + (JMXMP) to provide encryption of the JMX connection, offering + increased security over the default unencrypted RMI based JMX + connection. + </para><section role="h3" id="ManagementConsoleSecurity-DownloadandInstall"><title> + Download and + Install + </title> + + <para> + This is possible by adding the jmxremote_optional.jar as provided + by Sun. This jar is covered by the Sun Binary Code License and is + not compatible with the Apache License which is why this + component is not bundled with Qpid. + </para><para> + Download the JMX Remote API 1.0.1_04 Reference Implementation + from <xref linkend="qpid_download.jsp"/>. The included + 'jmxremote-1_0_1-bin\lib\jmxremote_optional.jar' file must be + added to the broker classpath: + </para><para> + First set your classpath to something like this: + </para> + <programlisting> +CLASSPATH=jmxremote_optional.jar +</programlisting> + <para> + Then, run qpid-server passing the following additional flag: + </para> + <programlisting> +qpid-server -run:external-classpath=first +</programlisting> + <para> + Following this the configuration option can be updated to enabled + use of the JMXMP based JMXConnectorServer. + </para> +<!--h3--></section> + + <section role="h3" id="ManagementConsoleSecurity-BrokerConfiguration"><title> + Broker + Configuration + </title> + + <para> + To enabled this security option change the + <emphasis>security-enabled</emphasis> value in your broker configuration + file. + </para> + <programlisting> + <management> + <security-enabled>true</security-enabled> + </management> +</programlisting> + <para> + You may also (for M2 and earlier) need to set the following + system properties using the environment variable QPID_OPTS: + </para><para> + QPID_OPTS="-Dcom.sun.management.jmxremote + -Dcom.sun.management.jmxremote.port=8999 + -Dcom.sun.management.jmxremote.authenticate=false + -Dcom.sun.management.jmxremote.ssl=false" + </para> +<!--h3--></section> + + <section role="h3" id="ManagementConsoleSecurity-JMXManagementConsoleConfiguration"><title> + JMX + Management Console Configuration + </title> + + <para> + If you wish to connect to a broker configured to use JMXMP then + the console also requires provision of the Optional sections of + the JMX Remote API that are not included within the JavaSE + platform. + </para><para> + In order to make it available to the console, place the + 'jmxremote_optional.jar' (rename the file if any additional + information is present in the file name) jar file within the + 'plugins/jmxremote.sasl_1.0.1/' folder of the console release (on + Mac OS X you will need to select 'Show package contents' from the + context menu whilst selecting the management console bundle in + order to reveal the inner file tree). + </para><para> + Following the the console will automatically load the JMX Remote + Optional classes and attempt the JMXMP connection when connecting + to a JMXMP enabled broker. + </para> +<!--h3--></section> +<!--h2--></section> + + <section role="h2" id="ManagementConsoleSecurity-UserAccounts-26AccessRights"><title> + User + Accounts & Access Rights + </title> + + <para> + In order to access the management operations via JMX, users must + have an account and have been assigned appropriate access rights. + See <xref linkend="qpid_Configuring-20Management-20Users"/> + </para> +<!--h2--></section> +<!--h1--></section> + + +</chapter> diff --git a/doc/book/src/MessageStore Tool.xml b/doc/book/src/MessageStore Tool.xml new file mode 100644 index 0000000000..411193b57c --- /dev/null +++ b/doc/book/src/MessageStore Tool.xml @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : MessageStore Tool + </title><section role="h2" id="MessageStoreTool-MessageStoreTool"><title> + MessageStore Tool + </title> + + <para> + We have a number of implementations of the Qpid MessageStore + interface. This tool allows the interrogation of these stores + while the broker is offline. + </para> + + <section role="h3" id="MessageStoreTool-MessageStoreImplementations"><title> + MessageStore + Implementations + </title> + + <itemizedlist> + <listitem><para> + <xref linkend="qpid_BDBMessageStore-20-3rd-20Party-"/> + </para></listitem> + <listitem><para> + <xref linkend="qpid_JDBCStore"/> + </para></listitem> + <listitem><para> + <xref linkend="qpid_MemoryMessageStore"/> + </para></listitem> + </itemizedlist> +<!--h3--></section> + + <section role="h3" id="MessageStoreTool-Introduction"><title> + Introduction + </title> + + <para> + Each of the MessageStore implementations provide different back + end storage for their messages and so would need a different tool + to be able to interrogate their contents at the back end. + </para><para> + What this tool does is to utilise the Java broker code base to + access the contents of the storage providing the user with a + consistent means to inspect the storage contents in broker + memory. The tool allows the current messages in the store to be + inspected and copied/moved between queues. The tool uses the + message instance in memory for all its access paths, but changes + made will be reflected in the physical store (if one exists). + </para> +<!--h3--></section> + + <section role="h3" id="MessageStoreTool-Usage"><title> + Usage + </title> + + <para> + The tools-distribution currently includes a unix shell command + 'msTool.sh' this script will launch the java tool. + </para><para> + The tool loads $QPID_HOME/etc/config.xml by default. If an + alternative broker configuration is required this should be + provided on the command line as would be done for the broker. + </para> + <programlisting> +msTool.sh -c <path to different config.xml> +</programlisting> + <para> + On startup the user is present with a command prompt + </para> + <programlisting> +$ msTool.sh +MessageStoreTool - for examining Persistent Qpid Broker MessageStore instances +bdb$ +</programlisting> +<!--h3--></section> + + <section role="h3" id="MessageStoreTool-AvailableCommands"><title> + Available + Commands + </title> + + <para> + The available commands in the tool can be seen through the use of + the 'help' command. + </para> + <programlisting> +bdb$ help ++----------------------------------------------------------------+ +| Available Commands | ++----------------------------------------------------------------+ +| Command | Description | ++----------------------------------------------------------------+ +| quit | Quit the tool. | +| list | list available items. | +| dump | Dump selected message content. Default: show=content | +| load | Loads specified broker configuration file. | +| clear | Clears any selection. | +| show | Shows the messages headers. | +| select | Perform a selection. | +| help | Provides detailed help on commands. | ++----------------------------------------------------------------+ +bdb$ +</programlisting> + <para> + A brief description is displayed and further usage information is + shown with 'help <command>' + </para> + <programlisting> +bdb$ help list +list availble items. +Usage:list queues [<exchange>] | exchanges | bindings [<exchange>] | all +bdb$ +</programlisting> +<!--h3--></section> + + + <section role="h3" id="MessageStoreTool-FutureWork"><title> + Future Work + </title> + + <para> + Currently the tool only works whilst the broker is offline i.e. + it is up, but not accepting AMQP connections. This requires a + stop/start of the broker. If this functionality was incorporated + into the broker then a telnet functionality could be provided + allowing online management. + </para> +<!--h3--></section> +<!--h2--></section> +</chapter> diff --git a/doc/book/src/Qpid JMX Management Console FAQ.xml b/doc/book/src/Qpid JMX Management Console FAQ.xml new file mode 100644 index 0000000000..a2bbb59050 --- /dev/null +++ b/doc/book/src/Qpid JMX Management Console FAQ.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Qpid JMX Management Console FAQ + </title> +<!-- +h3. {toggle-cloak:id=qManagementConsoleSecurity} How do I connect the management console to my broker using security ? +{cloak:id=qManagementConsoleSecurity} + +The [Management Console Security] page will give you the instructions that you should use to set this up. +{cloak} + + +h3. {toggle-cloak:id=rmiServerHostname} I am unable to connect Qpid JMX MC/JConsole to a remote broker running on Linux, but connecting to localhost on that machine works ? +{cloak:id=rmiServerHostname} + +The RMI based JMX ConnectorServer used by the broker requries two ports to operate. The console connects to an RMI Registry running on the primary (default 8999) port and retrieves the information actually needed to connect to the JMX Server. This information embeds the hostname of the remote machine, and if this is incorrect or unreachable by the connecting client the connection will fail. + +This situation arises due to the hostname configuration on Linux and is generally encountered when the remote machine does not have a DNS hostname entry on the local network, causing the hostname command to return a loopback IP instead of a fully qualified domain name or IP address accessible by remote client machines. It is described in further detail at: http://java.sun.com/javase/6/docs/technotes/guides/management/faq.html#linux1 + +To remedy this issue you can set the _java.rmi.server.hostname_ system property to control the hostname/ip reported to the RMI runtime when advertising the JMX ConnectorServer. This can also be used to dictate the address returned on a computer with multiple network interfaces to control reachability. To do so, add the value _-Djava.rmi.server.hostname=<desired hostname/ip>_ to the QPID_OPTS environment variable before starting the _qpid-server_ script. +--> + + <section role="h2" id="QpidJMXManagementConsoleFAQ-Errors"><title> + Errors + </title> + + <section role="h3" id="QpidJMXManagementConsoleFAQ-HowdoIconnectthemanagementconsoletomybrokerusingsecurity-3F"><title> + How do I connect the management console to + my broker using security ? + </title> + + <para> + The <xref linkend="qpid_Management-20Console-20Security"/> page will give you the instructions that you should + use to set this up. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJMXManagementConsoleFAQ-IamunabletoconnectQpidJMXMC-2FJConsoletoaremotebrokerrunningonLinux-2Cbutconnectingtolocalhostonthatmachineworks-3F"><title> + I am unable to connect Qpid JMX MC/JConsole + to a remote broker running on Linux, but connecting to localhost + on that machine works ? + </title> + + <para> + The RMI + based JMX ConnectorServer used by the broker requries two ports + to operate. The console connects to an RMI Registry running on + the primary (default 8999) port and retrieves the information + actually needed to connect to the JMX Server. This information + embeds the hostname of the remote machine, and if this is + incorrect or unreachable by the connecting client the connection + will fail. + </para><para> + This + situation arises due to the hostname configuration on Linux and + is generally encountered when the remote machine does not have a + DNS hostname entry on the local network, causing the hostname + command to return a loopback IP instead of a fully qualified + domain name or IP address accessible by remote client machines. + It is described in further detail at: <xref linkend="qpid_faq"/> + </para><para> + To + remedy this issue you can set the + <emphasis>java.rmi.server.hostname</emphasis> system property to control the + hostname/ip reported to the RMI runtime when advertising the JMX + ConnectorServer. This can also be used to dictate the address + returned on a computer with multiple network interfaces to + control reachability. To do so, add the value + <emphasis>-Djava.rmi.server.hostname=<desired hostname/ip></emphasis> + to the QPID_OPTS environment variable before starting the + <emphasis>qpid-server</emphasis> script. + </para> +<!--h3--></section> +<!--h2--></section> +</chapter> diff --git a/doc/book/src/Qpid JMX Management Console User Guide.xml b/doc/book/src/Qpid JMX Management Console User Guide.xml new file mode 100644 index 0000000000..bdbb56d4d5 --- /dev/null +++ b/doc/book/src/Qpid JMX Management Console User Guide.xml @@ -0,0 +1,771 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Qpid JMX Management Console User Guide + </title><section role="h1" id="QpidJMXManagementConsoleUserGuide-QpidJMXManagementConsoleUserGuide"><title> + Qpid JMX Management Console User Guide + </title> + + + <para> + + The Qpid JMX Management Console is a standalone Eclipse RCP + application for managing and monitoring the Qpid Java server + utilising its JMX management interfaces. + </para><para> + This guide will give an overview of configuring the console, the + features supported by it, and how to make use of the console in + managing the various JMX Management Beans (MBeans) offered by the + Qpid Java server. + </para> +<!--h1--></section> + + + <section role="h1" id="QpidJMXManagementConsoleUserGuide-Startup-26Configuration"><title> + + Startup & Configuration + </title> + + <para> + + </para> + <section role="h2" id="QpidJMXManagementConsoleUserGuide-Startup"><title> + Startup + </title> + + <para> + + The console can be started in the following way, depending on + platform: + </para><itemizedlist> + <listitem><para> + <emphasis>Windows:</emphasis> by running the <emphasis>qpidmc.exe</emphasis> executable + file. + </para></listitem> + <listitem><para> + <emphasis>Linux:</emphasis> by running the <emphasis>qpidmc</emphasis> executable. + </para></listitem> + <listitem><para> + <emphasis>Mac OS X:</emphasis> by launching the <emphasis>Qpid Management + Console.app</emphasis> application bundle. + </para></listitem> + </itemizedlist><para> + + </para> + </section> + + + <section role="h2" id="QpidJMXManagementConsoleUserGuide-SSLconfiguration"><title> + SSL + configuration + </title> + + <para> + + Newer Qpid Java servers can protect their JMX connections with + SSL, and this is enabled by default. When attempting to connect + to a server with this enabled, the console must be able to verify + the SSL certificate presented to it by the server or the + connection will fail. + </para><para> + If the server makes use of an SSL certificate signed by a known + Signing CA (Certification Authority) then the console needs no + extra configuration, and will make use of Java's default + system-wide CA TrustStore for certificate verification (you may + however have to update the system-wide default CA TrustStore if + your certified is signed by a less common CA that is not already + present in it). + </para><para> + If however the server is equipped with a self-signed SSL + certificate, then the management console must be provided with an + appropriate SSL TrustStore containing the public key for the SSL + certificate, so that it is able to validate it when presented by + the server. The server ships with a script to create an example + self-signed SSL certificate, and store the relevant entries in a + KeyStore and matching TrustStore. This script can serve as a + guide on how to use the Java Keytool security utility to + manipulate your own stores, and more information can be found in + the JSSE Reference Guide: <xref linkend="qpid_JSSERefGuide"/> + </para><para> + Supplying the necessary details to the console is performed by + setting the <emphasis>javax.net.ssl.trustStore</emphasis> and + <emphasis>javax.net.ssl.trustStorePassword</emphasis> environment variables + when starting it. This can be done at the command line, but the + preferred option is to set the configuration within the + <emphasis>qpidmc.ini</emphasis> launcher configuration file for repeated + usage. This file is equipped with a template to ease + configuration, this should be uncommented and edited to suit your + needs. It can be found in the root of the console releases for + Windows, and Linux. For Mac OS X the file is located within the + consoles <emphasis>.app</emphasis> application bundle, and to locate and edit + it you must select <emphasis>'Show Package Contents'</emphasis> when + accessing the context menu of the application, then browse to the + <emphasis>Contents/MacOS</emphasis> sub folder to locate the file. + </para> +<!--h2--></section> + + <section role="h2" id="QpidJMXManagementConsoleUserGuide-JMXMPconfiguration"><title> + JMXMP + configuration + </title> + + <para> + + Older releases of the Qpid Java server can make use of the Java + Management Extensions Messaging Protocol (JMXMP) to provide + protection for their JMX connections. This occurs when the server + has its main configuration set with the management + <emphasis>'security-enabled'</emphasis> property set to true. + </para><para> + In order to connect to this configuration of server, the console + needs an additional library that is not included within the Java + SE platform and cannot be distributed with the console due to + licensing restrictions. + </para><para> + You can download the JMX Remote API 1.0.1_04 Reference + Implementation from the Sun website <xref linkend="qpid_download.jsp"/>. The included + <emphasis>jmxremote-1_0_1-bin/lib/jmxremote_optional.jar</emphasis> file must + be added to the <emphasis>plugins/jmxremote.sasl_1.0.1</emphasis> folder of + the console release (again, in Mac OS X you will need to select + <emphasis>'Show package contents'</emphasis> from the context menu whilst + selecting the management console bundle in order to reveal the + inner file tree). + </para><para> + Following this the console will automatically load the JMX Remote + Optional classes and negotiate the SASL authentication profile + type when encountering a JMXMP enabled Qpid Java server. + </para> +<!--h2--></section> +<!--h1--></section> + <section role="h1" id="QpidJMXManagementConsoleUserGuide-ManagingServerConnections"><title> + + Managing Server Connections + </title> + + <para> + + </para> + <section role="h2" id="QpidJMXManagementConsoleUserGuide-MainToolbar"><title> + Main Toolbar + </title> + + <para> + + The main toolbar of the console can be seen in the image below. + The left most buttons respectively allow for adding a new server + connection, reconnecting to an existing server selected in the + connection tree, disconnecting the selected server connection, + and removing the server from the connection tree. + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/3113098.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject> + + + Beside these buttons is a combo for selecting the refresh + interval; that is, how often the console requests updated + information to display for the currently open area in the main + view. Finally, the right-most button enables an immediate update. + </para> + </section> + + <section role="h2" id="QpidJMXManagementConsoleUserGuide-Connectingtoanewserver"><title> + Connecting + to a new server + </title> + + <para> + + To connect to a new server, press the <emphasis>Add New Server</emphasis> + toolbar button, or select the <emphasis>Qpid Manager -> Add New + Connection</emphasis> menu item. At this point a dialog box will be + displayed requesting the server details, namely the server + hostname, management port, and a username and password. An + example is shown below: + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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 + initiate a connection attempt to the server. It the attempt fails + a reason will be shown and the server will not be added to the + connection tree. If the attempt is successful the server will be + added to the connections list and the entry expanded to show the + initial administration MBeans the user has access to and any + VirtualHosts present on the server, as can be seen in the figure + below. + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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 + use, once connected this initial screen will contain a message on + the right, indicating an upgraded console should be sought by the + user to ensure all management functionality supported by the + server is being utilised. + </para> +<!--h2--></section> + + <section role="h2" id="QpidJMXManagementConsoleUserGuide-Reconnectingtoaserver"><title> + Reconnecting + to a server + </title> + + <para> + + If a server has been connected to previously, it will be saved as + an entry in the connection tree for further use. On subsequent + connections the server can simply be selected from the tree and + using the <emphasis>Reconnect</emphasis> toolbar button or <emphasis>Qpid Manager + -> Reconnect</emphasis> menu item. At this stage the console will + prompt simply for the username and password with which the user + wishes to connect, and following a successful connection the + screen will appear as shown previously above. + </para> +<!--h2--></section> + + + <section role="h2" id="QpidJMXManagementConsoleUserGuide-Disconnectingfromaserver"><title> + Disconnecting + from a server + </title> + + <para> + + To disconnect from a server, select the connection tree node for + the server and press the <emphasis>Disconnect</emphasis> toolbar button, or + use the <emphasis>Qpid Manager -> Disconnect</emphasis> menu option. + </para> +<!--h2--></section> + + <section role="h2" id="QpidJMXManagementConsoleUserGuide-Removingaserver"><title> + Removing a + server + </title> + + <para> + + To remove a server from the connection list, select the + connection tree node for the server and press the <emphasis>Remove</emphasis> + toolbar button, or use the <emphasis>Qpid Manager -> Remove + Connection</emphasis> menu option. + </para> +<!--h2--></section> +<!--h1--></section> + + + <section role="h1" id="QpidJMXManagementConsoleUserGuide-Navigatingaconnectedserver"><title> + Navigating a connected server + </title> + + <para> + + Once connected to a server, the various areas available for + administration are accessed using the Qpid Connections tree at + 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="attachments/91960/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 + to the tree along with the general administration MBeans. + Instead, dedicated selection areas are provided to allow users to + select which Queue/Connection/Exchange they wish to view or add + to the tree. These areas can be found by clicking on the + Connections, Exchanges, and Queues nodes in the tree under each + VirtualHost, as shown in the figure above. One or more MBeans may + be selected and added to the tree as Favourites using the button + provided. These settings are saved for future use, and each time + the console connects to the server it will check for the presence + of the MBean previously in the tree and add them if they are + still present. Queue/Connection/Exchange MBeans can be removed + from the tree by right clicking on them to expose a context menu + allowing deletion. + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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 + an entry in the table within the Queue/Connection/Exchange + selection areas to open it immediately. It is also possible to + open some MBeans like this whilst viewing certain other MBeans. + When opening an MBean in either of these ways, a Back button is + enabled in the top right corner of the main view. Using this + button will return you to the selection area or MBean you were + previously viewing. The history resets each time the tree is used + to open a new area or MBean. + </para> +<!--h1--></section> + + + <section role="h1" id="QpidJMXManagementConsoleUserGuide-ConfigurationManagementMBean"><title> + + ConfigurationManagement MBean + </title> + + <para> + + The ConfigurationManagement MBean is available on newer servers, + to users with admin level management rights. It offers the + ability to perform a live reload of the <emphasis>Security</emphasis> + sections defined in the main server configuration file (e.g. + defaults to: <emphasis>etc/config.xml</emphasis>). This is mainly to allow + updating the server Firewall configuration to new settings + without a restart, and can be performed by clicking the Execute + button and confirming the prompt which follows. + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/3113103.png" format="PNG" scalefit="1"/></imageobject><textobject><phrase/></textobject><caption><para/></caption></mediaobject> + </para> +<!--h1--></section> + + <section role="h1" id="QpidJMXManagementConsoleUserGuide-LoggingManagementMBean"><title> + + LoggingManagement MBean + </title> + + <para> + + The LoggingManagement MBean is available on newer servers, and + accessible by admin level users. It allows live alteration of the + logging behaviour, both at a Runtime-only level and at the + configuration file level. The latter can optionally affect the + Runtime configuration, either through use of the servers + automated LogWatch ability which detects changes to the + configuration file and reloads it, or by manually requesting a + reload. This functionality is split across two management tabs, + Runtime Options and ConfigurationFile Options. + </para> + <section role="h2" id="QpidJMXManagementConsoleUserGuide-RuntimeOptions"><title> + Runtime + Options + </title> + + <para> + + <mediaobject><imageobject><imagedata fileref="attachments/91960/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 + the changes will be lost when the server restarts), and gives + individual access to every Logger active within the server. + </para><para> + As shown in the figure above, the table in this tab presents the + Effective Level of each Logger. This is because the Loggers form + a hierarchy in which those without an explicitly defined (in the + logging configuration file) Level will inherit the Level of their + immediate parent; that is, the Logger whose full name is a prefix + of their own, or if none satisfy that condition then the + RootLogger is their parent. As example, take the + <emphasis>org.apache.qpid</emphasis> Logger. It is parent to all those below + it which begin with <emphasis>org.apache.qpid</emphasis> and unless they have + a specific Level of their own, they will inherit its Level. This + can be seen in the figure, whereby all the children Loggers + visible have a level of WARN just like their parent, but the + RootLogger Level is INFO; the children have inherited the WARN + level from <emphasis>org.apache.qpid</emphasis> rather than INFO from the + RootLogger. + </para><para> + To aid with this distinction, the Logger Levels that are + currently defined in the configuration file are highlighted in + the List. Changing these levels at runtime will also change the + Level of all their children which haven't been set their own + Level using the runtime options. In the latest versions of the + LoggingManagement MBean, it is possible to restore a child logger + that has had an explicit level se, to inheriting that of its + parent by setting it to an INHERITED level that removes any + previously set Level of its own. + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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 + modify it) and the <emphasis>Edit Selected Logger(s)</emphasis> button + pressed to load the dialog shown above. At this point, any of the + available Levels supported by the server can be applied to the + Loggers selected and they will immediately update, as will any + child Loggers without their own specific Level. + </para><para> + The RootLogger can be similarly edited using the button at the + bottom left of the window. + </para> +<!--h2--></section> + + <section role="h2" id="QpidJMXManagementConsoleUserGuide-ConfigurationFileOptions"><title> + ConfigurationFile + Options + </title> + + <para> + + The ConfigurationFile Options tab allows alteration of the Level + settings for the Loggers defined in the configuration file, + allowing changes to persist following a restart of the server. + Changes made to the configuration file are only applied + automatically while the sever is running if it was configured to + enable the LogWatch capability, meaning it will monitor the + configuration file for changes and apply the new configuration + when the change is detected. If this was not enabled, the changes + will be picked up when the server is restarted. The status of the + LogWatch feature is shown at the bottom of the tab. + Alternatively, in the latest versions of the LoggingManagement + MBean it is possible to reload the logging configuration file on + demand. + </para><para> + Manipulating the Levels is as on the Runtime Options tab, either + double-click an individual Logger entry or select multiple + Loggers and use the button to load the dialog to set the new + Level. + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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 + that any Logger set to a specific Level using the Runtime Options + tab that is not defined in the configuration file will maintain + that Level when the configuration file is reloaded. In other + words, if a Logger is defined in the configuration file, then the + configuration file will take precedence at reload, otherwise the + Runtime options take precedence. + </para><para> + This situation will be immediately obvious by examining the + Runtime Options tab to see the effective Level of each Logger + – unless it has been altered with the RuntimeOptions or + specifically set in the configuration file, a Logger Level should + match that of its parent. In the latest versions of the + LoggingManagement MBean, it is possible to use the RuntimeOptions + to restore a child logger to inheriting from its parent by + setting it with an INHERITED level that removes any previously + set Level of its own. + + </para> +<!--h2--></section> +<!--h1--></section> + + + + <section role="h1" id="QpidJMXManagementConsoleUserGuide-ServerInformationMBean"><title> + ServerInformation MBean + </title> + + <para> + + <mediaobject><imageobject><imagedata fileref="attachments/91960/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 + server version and its management capabilities. In future it is + likely to convey additional server-wide details and/or + functionality. + </para> +<!--h1--></section> + + <section role="h1" id="QpidJMXManagementConsoleUserGuide-UserManagementMBean"><title> + + UserManagement MBean + </title> + + <para> + + The UserManagement MBean is accessible by admin level users, and + allows manipulation of existing user accounts and creation of new + user accounts. + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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="attachments/91960/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 + have access to the management interface, and if so what + capabilities are accessible. <emphasis>Read Only</emphasis> access allows + undertaking any operations that do not alter the server state, + such as viewing messages. <emphasis>Read + Write</emphasis> access allows use + of all operations which are not deemed admin-only (such as those + in the UserManagement MBean itself). <emphasis>Admin</emphasis> access allows + a user to utilize any operation, and view the admin-only MBeans + (currently these are ConfigurationManagement, LoggingManagement, + and UserManagement). + </para><para> + One or more users at a time may be deleted by selecting them in + the table and clicking the <emphasis>Delete User(s)</emphasis> button. The + console will then prompt for confirmation before undertaking the + removals. Similarly, the access rights for one or more users may + be updated by selecting them in the table and clicking the + <emphasis>Set Rights</emphasis> button. The console will then display a + dialog enabling selection of the new access level and + confirmation to undertake the update. + </para><para> + An individual user password may be updated by selecting the user + in the table in and clicking the <emphasis>Set Password</emphasis> button. + The console will then display a dialog enabling input of the new + password and confirmation to undertake the update. + </para><para> + + The server caches the user details in memory to aid performance. + If may sometimes be necessary to externally modify the password + and access right files on disk. In order for these changes to be + known to the server without a restart, it must be instructed to + reload the file contents. This can be done using the provided + <emphasis>Reload User Details</emphasis> button (on older servers, only the + management rights file is reloaded, on newer servers both files + are. The description on screen will indicate the behaviour). + After pressing this button the console will seek confirmation + before proceeding. + </para> +<!--h1--></section> + + + <section role="h1" id="QpidJMXManagementConsoleUserGuide-VirtualHostManagerMBean"><title> + + VirtualHostManager MBean + </title> + + <para> + + Each VirtualHost in the server has an associated + VirtualHostManager MBean. This allows viewing, creation, and + deletion of Queues and Exchanges within the VirtualHost. + </para><para> + Clicking the <emphasis>Create</emphasis> button in the Queue section will + open a dialog allowing specification of the Name, Owner + (optional), and durability properties of the new Queue, and + confirmation of the operation. + </para><para> + One or more Queues may be deleted by selecting them in the table + and clicking the <emphasis>Delete</emphasis> button. This will unregister the + Queue bindings, remove the subscriptions and delete the Queue(s). + The console will prompt for confirmation before undertaking the + operation. + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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 + Durable attributes of the new Exchange, and confirmation of the + operation. + </para><para> + One or more Exchanges may be deleted by selecting them in the + table and clicking the <emphasis>Delete</emphasis> button. This will + unregister all the related channels and Queue bindings then + delete the Exchange(s). The console will prompt for confirmation + before undertaking the operation. + </para><para> + + Double-clicking on a particular Queue or Exchange name in the + tables will open the MBean representing it. + </para> +<!--h1--></section> + + + + <section role="h1" id="QpidJMXManagementConsoleUserGuide-Notifications"><title> + + Notifications + </title> + + <para> + + MBeans on the server can potentially send Notifications that + users may subscribe to. When managing an individual MBean that + offers Notifications types for subscription, the console supplies + a Notifications tab to allow (un)subscription to the + Notifications if desired and viewing any that are received + following subscription. + </para><para> + In order to provide quicker access to/awareness of any received + Notifications, each VirtualHost area in the connection tree has a + Notifications area that aggregates all received Notifications for + MBeans in that VirtualHost. An example of this can be seen in the + figure below. + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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 + Notifications area of the individual MBean that generated the + Notification. + </para><para> + They may be cleared selectively or all at once. To clear + particular Notifications, they should be selected in the table + before pressing the <emphasis>Clear</emphasis> button. To clear all + Notifications, simply press the <emphasis>Clear</emphasis> button without + anything selected in the table, at which point the console will + request confirmation of this clear-all action. + </para> +<!--h1--></section> + + <section role="h1" id="QpidJMXManagementConsoleUserGuide-ManagingQueues"><title> + Managing + Queues + </title> + + <para> + + As mentioned in earlier discussion of Navigation, Queue MBeans + can be opened either by double clicking an entry in the Queues + selection area, or adding a queue to the tree as a favourite and + clicking on its tree node. Unique to the Queue selection screen + is the ability to view additional attributes beyond just that of + the Queue Name. This is helpful for determining which Queues + satisfy a particular condition, e.g. having <X> messages on + the queue. The example below shows the selection view with + additional attributes <emphasis>Consumer Count, Durable, MessageCount, + and QueueDepth</emphasis> (selected using the <emphasis>Select + Attributes</emphasis> button at the bottom right corner of the + table)<emphasis>.</emphasis> + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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, + editing those which are writable values (highlighted in blue) if + the users management permissions allow, viewing descriptions of + their purpose, and graphing certain numerical attribute values as + they change over time. + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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 + on the queue, and later for selecting specific messages to + operate upon. It is possible to view any desired range of + messages on the queue by specifying the visible range using the + fields at the top and pressing the <emphasis>Set</emphasis> button. Next to + this there are helper buttons to enable faster browsing through + the messages on the queue; these allow moving forward and back by + whatever number of messages is made visible by the viewing range + set. The Queue Position column indicates the position of each + message on the queue, but is only present when connected to newer + servers as older versions cannot provide the necessary + information to show this (unless only a single message position + is requested). + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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 + clicking a message in the table (or using the <emphasis>View Message + Content</emphasis> button to its right) will open a dialog window + displaying the contents of the message. + </para><para> + One or more messages can be selected in the table and moved to + another queue in the VirtualHost by using the <emphasis>Move + Message(s)</emphasis> button, which opens a dialog to enable selection + of the destination and confirmation of the operation. Newer + servers support the ability to similarly copy the selected + messages to another queue in a similar fashion, or delete the + selected messages from the queue after prompting for + confirmation. + </para><para> + Finally, all messages (that have not been acquired by consumers) + on the queue can be deleted using the <emphasis>Clear Queue</emphasis> + button, which will generate a prompt for confirmation. On newer + servers, the status bar at the lower left of the application will + report the number of messages actually removed. + </para> +<!--h1--></section> + + + <section role="h1" id="QpidJMXManagementConsoleUserGuide-ManagingExchanges"><title> + + Managing Exchanges + </title> + + <para> + Exchange MBeans are opened for management operations in similar + fashion as described for Queues, again showing an Attributes tab + initially, with the Operations tab next: + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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 + presented in the format shown above. The left table provides the + binding/routing keys present in the exchange. Selecting one of + these entries in the table prompts the right table to display all + the queues associated with this key. Pressing the <emphasis>Create</emphasis> + button opens a dialog allowing association of an existing queue + with the entered Binding. + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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="attachments/91960/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 + of these entries in the table prompts the right table to display + the header values that control when the binding matches an + incoming message. + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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 + new binding, associating an existing Queue with a particular set + of header keys and values. The <emphasis>x-match</emphasis> key is required, + and instructs the server whether to match the binding with + incoming messages based on ANY or ALL of the further key-value + pairs entered. If it is desired to enter more than 4 pairs, you + may press the <emphasis>Add additional field</emphasis> button to create a + new row as many times as is required. + + When managing a <emphasis>headers</emphasis> Exchange, double clicking an + entry in the left-hand table will open the MBean for the Queue + specified in the binding properties. + </para><para> + When managing another Exchange Type, double clicking the Queue + Name in the right-hand table will open the MBean of the Queue + specified. + </para> +<!--h1--></section> + + <section role="h1" id="QpidJMXManagementConsoleUserGuide-ManagingConnections"><title> + + Managing Connections + </title> + + <para> + + Exchange MBeans are opened for management operations in similar + fashion as described for Queues, again showing an Attributes tab + initially, with the Operations tab next, and finally a + Notifications tab allowing subscription and viewing of + Notifications. The Operations tab can be seen in the figure + below. + </para><para> + <mediaobject><imageobject><imagedata fileref="attachments/91960/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> + on them, and the <emphasis>Default Queue</emphasis> if there is one (or + <emphasis>null</emphasis> if there is not). + </para><para> + The main operations supported on a connection are Commiting and + Rolling Back of Transactions on a particular Channel, if the + Channel is Transactional. This can be done by selecting a + particular Channel in the table and pressing the <emphasis>Commit + Transactions</emphasis> or <emphasis>Rollback Transactions</emphasis> buttons at + the lower right corner of the table, at which point the console + will prompt for confirmation of the action. These buttons are + only active when the selected Channel in the table is + Transactional. + </para><para> + The final operation supported is closing the Connection. After + pressing the <emphasis>Close Connection</emphasis> button, the console will + prompt for confirmation of the action. If this is carried out, + the MBean for the Connection being managed will be removed from + the server. The console will be notified of this by the server + and display an information dialog to that effect, as it would if + any other MBean were to be unregistered whilst being viewed. + </para><para> + Double clicking a row in the table will open the MBean of the + associated <emphasis>Default Queue</emphasis> if there is one. + </para> + +<!--h1--></section> +</chapter> diff --git a/doc/book/src/Qpid Java Broker Management CLI.xml b/doc/book/src/Qpid Java Broker Management CLI.xml new file mode 100644 index 0000000000..edfb041f46 --- /dev/null +++ b/doc/book/src/Qpid Java Broker Management CLI.xml @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Qpid Java Broker Management CLI + </title> + <section role="h2" id="QpidJavaBrokerManagementCLI-HowtobuildApacheQpidCLI"><title> + How to + build Apache Qpid CLI + </title> + + + <section role="h3" id="QpidJavaBrokerManagementCLI-BuildInstructionsGeneral"><title> + Build + Instructions - General + </title> + + <para> + At the very beginning please build Apache Qpid by refering this + installation guide from here <xref linkend="qpid_qpid-java-build-how-to"/>. + </para><para> + After successfully build Apache Qpid you'll be able to start + Apache Qpid Java broker,then only you are in a position to use + Qpid CLI. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaBrokerManagementCLI-CheckouttheSource"><title> + Check + out the Source + </title> + + <para> + First check out the source from subversion repository. Please + visit the following link for more information about different + versions of Qpid CLI. + </para><para> + <xref linkend="qpid_list"/> + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaBrokerManagementCLI-Prerequisites"><title> + Prerequisites + </title> + + <para> + For the broker code you need JDK 1.5.0_15 or later. You should + set JAVA_HOME and include the bin directory in your PATH. + </para><para> + Check it's ok by executing java -v ! + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaBrokerManagementCLI-BuildingApacheQpidCLI"><title> + Building + Apache Qpid CLI + </title> + + <para> + This project is currently having only an ant build system.Please + install ant build system before trying to install Qpid CLI. + </para> +<!--h3--></section> + + + + <section role="h3" id="QpidJavaBrokerManagementCLI-Compiling"><title> + Compiling + </title> + + <para> + To compile the source please run following command + </para> + <programlisting> +ant compile +</programlisting> + <para> + To compile the test source run the following command + </para> + <programlisting> +ant compile-tests +</programlisting> +<!--h3--></section> + + + <section role="h3" id="QpidJavaBrokerManagementCLI-RunningCLI"><title> + Running CLI + </title> + + <para> + After successful compilation set QPID_CLI environment variable to + the main source directory.(set the environment variable to the + directory where ant build script stored in the SVN + checkout).Please check whether the Qpid Java broker is up an + running in the appropriate location and run the following command + to start the Qpid CLI by running the qpid-cli script in the bin + directory. + </para><para> + $QPID_CLI/bin/qpid-cli -h <hostname of the broker> -p + <broker running port> + For more details please have a look in to README file which ships + with source package of Qpid CLI. + </para> +<!--h3--></section> + + + <section role="h3" id="QpidJavaBrokerManagementCLI-Otheranttargets"><title> + Other + ant targets + </title> + + <para>For now we are supporting those ant targets.</para> + + <variablelist> + <varlistentry> + <term>ant clean</term> + <listitem><para>Clean the complete build including CLI build and test build.</para></listitem> + </varlistentry> + <varlistentry> + <term>ant jar</term> + <listitem><para>Create the jar file for the project without test cases.</para></listitem> + </varlistentry> + <varlistentry> + <term>ant init</term> + <listitem><para>Create the directory structure for build.</para></listitem> + </varlistentry> + <varlistentry> + <term>ant compile-tests </term> + <listitem><para>This compiles all the test source.</para></listitem> + </varlistentry> + <varlistentry> + <term>ant test </term> + <listitem><para>Run all the test cases.</para></listitem> + </varlistentry> + + </variablelist> + +<!--h3--></section> +<!--h2--></section> +</chapter> diff --git a/doc/book/src/Qpid Java Build How To.xml b/doc/book/src/Qpid Java Build How To.xml new file mode 100644 index 0000000000..e27b5b951b --- /dev/null +++ b/doc/book/src/Qpid Java Build How To.xml @@ -0,0 +1,344 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Qpid Java Build How To + </title> + + <section role="h1" id="QpidJavaBuildHowTo-BuildInstructionsGeneral"><title> + Build + Instructions - General + </title> + + <section role="h2" id="QpidJavaBuildHowTo-Checkoutthesource"><title> + Check out the + source + </title> + <para> + Firstly, check the source for Qpid out of our subversion + repository: + </para><para> + <xref linkend="qpid_trunk"/> + </para> +<!--h2--></section> + <section role="h2" id="QpidJavaBuildHowTo-Prerequisites"><title> + Prerequisites + </title> + <para> + For the broker code you need JDK 1.5.0_15 or later. You should + set JAVA_HOME and include the bin directory in your PATH. + </para><para> + Check it's ok by executing java -v ! + </para><para> + If you are wanting to run the python tests against the broker you + will of course need a version of python. + </para> +<!--h2--></section> +<!--h1--></section> + + <section role="h1" id="QpidJavaBuildHowTo-BuildInstructionsTrunk"><title> + Build + Instructions - Trunk + </title> + <para> + Our build system has reverted to ant as of May 2008. + </para><para> + The ant target 'help' will tell you what you need to know about + the build system. + </para> + <section role="h2" id="QpidJavaBuildHowTo-AntBuildScripts"><title> + Ant Build + Scripts + </title> + <para> + Currently the Qpid java project builds using ant. + </para><para> + The ant build system is set up in a modular way, with a top level + build script and template for module builds and then a module + level build script which inherits from the template. + </para><para> + So, at the top level there are: + </para><table><title/><tgroup cols="2"> + <tbody> + <row> + <entry> + File + </entry> + <entry> + Description + </entry> + </row> + <row> + <entry> + build.xml + </entry> + <entry> + Top level build file for the project which defines all the + build targets + </entry> + </row> + <row> + <entry> + common.xml + </entry> + <entry> + Common properties used throughout the build system + </entry> + </row> + <row> + <entry> + module.xml + </entry> + <entry> + Template used by all modules which sets up properties for + module builds + </entry> + </row> + </tbody> + </tgroup></table><para> + Then, in each module subdirectory there is: + </para><table><title/><tgroup cols="2"> + <tbody> + <row> + <entry> + File + </entry> + <entry> + Description + </entry> + </row> + <row> + <entry> + build.xml + </entry> + <entry> + Defines all the module values for template properties + </entry> + </row> + </tbody> + </tgroup></table> +<!--h2--></section> + <section role="h2" id="QpidJavaBuildHowTo-Buildtargets"><title> + Build targets + </title> + <para> + The main build targets you are probably interested in are: + </para><table><title/><tgroup cols="2"> + <tbody> + <row> + <entry> + Target + </entry> + <entry> + Description + </entry> + </row> + <row> + <entry> + build + </entry> + <entry> + Builds all source code for Qpid + </entry> + </row> + <row> + <entry> + test + </entry> + <entry> + Runs the testsuite for Qpid + </entry> + </row> + </tbody> + </tgroup></table><para> + So, if you just want to compile everything you should run the + build target in the top level build.xml file. + </para><para> + If you want to build an installable version of Qpid, run the + archive task from the top level build.xml file. + </para><para> + If you want to compile an individual module, simply run the build + target from the appropriate module e.g. to compile the broker + source + </para> +<!--h2--></section> + <section role="h2" id="QpidJavaBuildHowTo-ConfiguringEclipse"><title> + Configuring + Eclipse + </title> + <para> + 1. Run the ant build from the root directory of Java trunk. + 2. New project -> create from existing file system for broker, + common, client, junit-toolkit, perftests, systests and each + directory under management + 4. Add the contents of lib/ to the build path + 5. Setup Generated Code + 6. Setup Dependencies + </para> + <section role="h3" id="QpidJavaBuildHowTo-GeneratedCode"><title> + Generated Code + </title> + <para> + The Broker and Common packages both depend on generated code. + After running 'ant' the build/scratch directory will contain this + generated code. + For the broker module add build/scratch/broker/src + For the common module add build/scratch/common/src + </para> +<!--h3--></section> + <section role="h3" id="QpidJavaBuildHowTo-Dependencies"><title> + Dependencies + </title> + <para> + These dependencies are correct at the time of writting however, + if things are not working you can check the dependencies by + looking in the modules build.xml file: + </para> + <programlisting> +for i in `find . -name build.xml` ; do echo "$i:"; grep module.depends $i ; done +</programlisting> + <para> + The <emphasis>module.depend</emphasis> value will detail which other modules + are dependencies. + </para><para> + broker + </para><itemizedlist> + <listitem><para>common + </para></listitem> + <listitem><para>management/common + </para></listitem> + </itemizedlist><para> + client + </para><itemizedlist> + <listitem><para>Common + </para></listitem> + </itemizedlist><para> + systest + </para><itemizedlist> + <listitem><para>client + </para></listitem> + <listitem><para>management/common + </para></listitem> + <listitem><para>broker + </para></listitem> + <listitem><para>broker/test + </para></listitem> + <listitem><para>common + </para></listitem> + <listitem><para>junit-toolkit + </para></listitem> + <listitem><para>management/tools/qpid-cli + </para></listitem> + </itemizedlist><para> + perftests + </para><itemizedlist> + <listitem><para>systests + </para></listitem> + <listitem><para>client + </para></listitem> + <listitem><para>broker + </para></listitem> + <listitem><para>common + </para></listitem> + <listitem><para>junit-toolkit + </para></listitem> + </itemizedlist><para> + management/eclipse-plugin + </para><itemizedlist> + <listitem><para>broker + </para></listitem> + <listitem><para>common + </para></listitem> + <listitem><para>management/common + </para></listitem> + </itemizedlist><para> + management/console + </para><itemizedlist> + <listitem><para>common + </para></listitem> + <listitem><para>client + </para></listitem> + </itemizedlist><para> + management/agent + </para><itemizedlist> + <listitem><para>common + </para></listitem> + <listitem><para>client + </para></listitem> + </itemizedlist><para> + management/tools/qpid-cli + </para><itemizedlist> + <listitem><para>common + </para></listitem> + <listitem><para>management/common + </para></listitem> + </itemizedlist><para> + management/client + </para><itemizedlist> + <listitem><para>common + </para></listitem> + <listitem><para>client + </para></listitem> + </itemizedlist><para> + integrationtests + </para><itemizedlist> + <listitem><para>systests + </para></listitem> + <listitem><para>client + </para></listitem> + <listitem><para>common + </para></listitem> + <listitem><para>junit-toolkit + </para></listitem> + </itemizedlist><para> + testkit + </para><itemizedlist> + <listitem><para>client + </para></listitem> + <listitem><para>broker + </para></listitem> + <listitem><para>common + </para></listitem> + </itemizedlist><para> + tools + </para><itemizedlist> + <listitem><para>client + </para></listitem> + <listitem><para>common + </para></listitem> + </itemizedlist><para> + client/examples + </para><itemizedlist> + <listitem><para>common + </para></listitem> + <listitem><para>client + </para></listitem> + </itemizedlist><para> + broker-plugins + </para><itemizedlist> + <listitem><para>client + </para></listitem> + <listitem><para>management/common + </para></listitem> + <listitem><para>broker + </para></listitem> + <listitem><para>common + </para></listitem> + <listitem><para>junit-toolkit + </para></listitem> + </itemizedlist> +<!--h3--></section> +<!--h2--></section> + + <section role="h2" id="QpidJavaBuildHowTo-Whatnext-3F"><title> + What next ? + </title> + <para> + If you want to run your built Qpid package, see our <xref linkend="qpid_Getting-20Started-20Guide"/> for details of + how to do that. + </para><para> + If you want to run our tests, you can use the ant test or + testreport (produces a useful report) targets. + </para> + +<!--h2--></section> +<!--h1--></section> +</chapter> diff --git a/doc/book/src/Qpid Java FAQ.xml b/doc/book/src/Qpid Java FAQ.xml new file mode 100644 index 0000000000..8dec9efd42 --- /dev/null +++ b/doc/book/src/Qpid Java FAQ.xml @@ -0,0 +1,925 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Qpid Java FAQ + </title> + + <section role="h2" id="QpidJavaFAQ-Purpose"> + <title>Purpose</title> + <para> + Here are a list of commonly asked questions and answers. Click on + the the bolded questions for the answer to unfold. If you have + any questions which are not on this list, please email our + qpid-user list. + </para> + + <section role="h3" id="QpidJavaFAQ-WhatisQpid-3F"><title> + What is Qpid ? + </title> + + <para> + The java implementation of Qpid is a pure Java message broker + that implements the AMQP protocol. Essentially, Qpid is a robust, + performant middleware component that can handle your messaging + traffic. + </para><para> + It currently supports the following features: + </para><itemizedlist> + <listitem><para>High performance header-based routing for messages + </para></listitem> + <listitem><para>All features required by the JMS 1.1 specification. Qpid + passes all tests in the Sun JMS compliance test suite + </para></listitem> + <listitem><para>Transaction support + </para></listitem> + <listitem><para>Persistence using the high performance Berkeley DB Java + Edition. The persistence layer is also pluggable should an + alternative implementation be required. The BDB store is + available from the <xref linkend="qpid_3rd-20Party-20Libraries"/> page + </para></listitem> + <listitem><para>Pluggable security using SASL. Any Java SASL provider can be + used + </para></listitem> + <listitem><para>Management using JMX and a custom management console built + using Eclipse RCP + </para></listitem> + <listitem><para>Naturally, interoperability with other clients including the + Qpid .NET, Python, Ruby and C++ implementations + </para></listitem> + </itemizedlist> + <!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-WhyamIgettingaConfigurationExceptionatbrokerstartup-3F"><title> + Why am I getting a ConfigurationException at broker startup ? + </title> + + <section role="h4" id="QpidJavaFAQ-InvocationTargetException"><title> + InvocationTargetException + </title> + <para> + If you get a java.lang.reflect.InvocationTargetException on + startup, wrapped as ConfigurationException like this: + </para> + <programlisting> +Error configuring message broker: org.apache.commons.configuration.ConfigurationException: java.lang.reflect.InvocationTargetException +2008-09-26 15:14:56,529 ERROR [main] server.Main (Main.java:206) - Error configuring message broker: org.apache.commons.configuration.ConfigurationException: java.lang.reflect.InvocationTargetException +org.apache.commons.configuration.ConfigurationException: java.lang.reflect.InvocationTargetException +at org.apache.qpid.server.security.auth.database.ConfigurationFilePrincipalDatabaseManager.initialisePrincipalDatabase(ConfigurationFilePrincipalDatabaseManager.java:158) +at org.apache.qpid.server.security.auth.database.ConfigurationFilePrincipalDatabaseManager.initialisePrincipalDatabases(ConfigurationFilePrincipalDatabaseManager.java:87) +at org.apache.qpid.server.security.auth.database.ConfigurationFilePrincipalDatabaseManager.<init>(ConfigurationFilePrincipalDatabaseManager.java:56) +at org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry.initialise(ConfigurationFileApplicationRegistry.java:117) +at org.apache.qpid.server.registry.ApplicationRegistry.initialise(ApplicationRegistry.java:79) +at org.apache.qpid.server.registry.ApplicationRegistry.initialise(ApplicationRegistry.java:67) +at org.apache.qpid.server.Main.startup(Main.java:260) +at org.apache.qpid.server.Main.execute(Main.java:196) +at org.apache.qpid.server.Main.<init>(Main.java:96) +at org.apache.qpid.server.Main.main(Main.java:454) +at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) +at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) +at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) +at java.lang.reflect.Method.invoke(Method.java:597) +at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90) +Caused by: java.lang.reflect.InvocationTargetException +at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) +at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) +at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) +at java.lang.reflect.Method.invoke(Method.java:597) +at org.apache.qpid.server.security.auth.database.ConfigurationFilePrincipalDatabaseManager.initialisePrincipalDatabase(ConfigurationFilePrincipalDatabaseManager.java:148) +</programlisting> + <para> + .. then it means you have a missing password file. + </para><para> + You need to create a password file for your deployment and update + your config.xml to reflect the location of the password file for + your instance. + </para><para> + The config.xml can be a little confusing in terms of element + names and file names for passwords. + </para><para> + To do this, you need to edit the passwordDir element for the + broker, which may have a comment to that effect: + </para> + <programlisting> +<passwordDir><!-- Change to the location --></passwordDir> +</programlisting> + <para> + The file should be named passwd by default but if you want to you + can change this by editing this element: + </para> + <programlisting> +<value>${passwordDir}/passwd</value> +</programlisting> + <!--h4--></section> + + + <section role="h4" id="QpidJavaFAQ-Cannotlocateconfigurationsourcenull-2Fvirtualhosts.xml"><title> + Cannot locate configuration source null/virtualhosts.xml + </title> + + <para> + If you get this message, wrapped inside a ConfigurationException + then you've come across a known issue, see JIRA <xref linkend="qpid_QPID-431"/> + </para><para> + The work around is to use a qualified path as the parameter value + for your -c option, rather than (as you migth be) starting the + broker from your installed etc directory. Even going up one level + and using a path relative to your £QPID_HOME directory + would sort this e.g qpid-server -c ./etc/myconfig.xml + </para> +<!--h4--></section> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowdoIruntheQpidbroker-3F"><title> + How do I run + the Qpid broker ? + </title> + + <para> + The broker comes with a script for unix/linux/cygwin called + qpid-server, which can be found in the bin directory of the + installed package. This command can be executed without any + paramters and will then use the default configuration file + provided on install. + </para><para> + For the Windows OS, please use qpid-server.bat. + </para><para> + There's no need to set your classpath for QPID as the scripts + take care of that by adding jar's with classpath defining + manifest files to your classpath. + </para><para> + For more information on running the broker please see our + <xref linkend="qpid_Getting-20Started"/> page. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowcanIcreateaconnectionusingaURL-3F"><title> + How can I + create a connection using a URL ? + </title> + + <para> + Please see the <xref linkend="qpid_Connection-20URL-20Format"/> documentation. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowdoIrepresentaJMSDestinationstringwithQPID-3F"><title> + How + do I represent a JMS Destination string with QPID ? + </title> + + <section role="h4" id="QpidJavaFAQ-Queues"><title> + Queues + </title> + + <para> + A queue can be created in QPID using the following URL format. + </para><para> + direct://amq.direct/<Destination>/<Queue + Name> + </para><para> + For example: + direct://amq.direct/<Destination>/simpleQueue + </para><para> + Queue names may consist of any mixture of digits, letters, and + underscores. + </para><para> + The <xref linkend="qpid_BindingURLFormat"/> is described in more + detail on it's own page. + </para> +<!--h4--></section> + + <section role="h4" id="QpidJavaFAQ-Topics"><title> + Topics + </title> + + <para> + A topic can be created in QPID using the following URL format. + </para><para> + topic://amq.topic/<Topic Subscription>/ + </para><para> + The topic subscription may only contain the letters A-Z and a-z + and digits 0-9. + </para><para> + The topic subscription is formed from a series of words that may + only contain the letters A-Z and a-z and digits 0-9. + The words are delimited by dots. Each dot represents a new level. + </para><para> + For example: stocks.nyse.ibm + </para><para> + Wildcards can be used on subscription with the following meaning. + </para><itemizedlist> + <listitem><para>match a single level + # match zero or more levels + </para></listitem> + </itemizedlist><para> + For example: + With two clients + 1 - stocks.*.ibm + 2 - stocks.#.ibm + </para><para> + Publishing stocks.nyse.ibm will be received by both + clients but stocks.ibm and stocks.world.us.ibm + will only be received by client 2. + </para><para> + The topic currently does not support wild cards. + </para> +<!--h4--></section> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowdoIconnecttothebrokerusingJNDI-3F"><title> + How do I + connect to the broker using JNDI ? + </title> + + <para> + see <xref linkend="qpid_How-20to-20Use-20JNDI"/> + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-I-27musingSpringandWeblogiccanyouhelpmewiththeconfigurationformovingovertoQpid-3F"><title> + I'm using Spring and Weblogic - can you help me with the + configuration for moving over to Qpid ? + </title> + + <para> + Here is a donated Spring configuration file <xref linkend="qpid_2264.zip"/> which shows the + config for Qpid side by side with Weblogic. HtH ! + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowdoIconfigurethelogginglevelforQpid-3F"><title> + How do + I configure the logging level for Qpid ? + </title> + + <para> + The system property + </para> + <programlisting> +amqj.logging.level +</programlisting> + <para> + can be used to configure the logging level. + For the broker, you can use the environment variable + AMQJ_LOGGING_LEVEL which is picked up by the qpid-run script + (called by qpid-server to start the broker) at runtime. + </para><para> + For client code that you've written, simply pass in a system + property to your command line to set it to the level you'd like + i.e. + </para> + <programlisting> +-Damqj.logging.level=INFO +</programlisting> + <para> + The log level for the broker defaults to INFO if the env variable + is not set, but you may find that your log4j properties affect + this. Setting the property noted above should address this. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowcanIconfiguremyapplicationtouseQpidclientlogging-3F"><title> + How can I configure my application to use Qpid client + logging? + </title> + + <para> + If you don't already have a logging implementation in your + classpath you should add slf4-log4j12-1.4.0.jar and + log4j-1.2.12.jar. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowcanIconfigurethebroker-3F"><title> + How can I + configure the broker ? + </title> + + <para> + The broker configuration is contained in the + <installed-dir>/etc/config.xml file. You can copy and edit + this file and then specify your own configuration file as a + parameter to the startup script using the -c flag i.e. + qpid-server -c <your_config_file's_path> + </para><para> + For more detailed information on configuration, please see + <xref linkend="qpid_Qpid-20Design-20--20Configuration"/> + </para><para> + + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-Whatportsdoesthebrokeruse-3F"><title> + What ports + does the broker use? + </title> + + <para> + The broker defaults to use port 5672 at startup for AMQP + traffic. + If the management interface is enabled it starts on port 8999 by + default. + </para><para> + The JMX management interface actually requires 2 ports to + operate, the second of which is indicated to the client + application during connection initiation to the main (default: + 8999) port. Previously this second port has been chosen at random + during broker startup, however since Qpid 0.5 this has been fixed + to a port 100 higher than the main port(ie Default:9099) in order + to ease firewall navigation. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowcanIchangetheportthebrokerusesatruntime-3F"><title> + How + can I change the port the broker uses at runtime ? + </title> + + <para> + The broker defaults to use port 5672 at startup for AMQP + traffic. + The broker also uses port 8999 for the JMX Management interface. + </para><para> + To change the AMQP traffic port use the -p flag at startup. To + change the management port use -m + i.e. qpid-server -p <port_number_to_use> -m + <port_number_to_use> + </para><para> + Use this to get round any issues on your host server with port + 5672/8999 being in use/unavailable. + </para><para> + For additional details on what ports the broker uses see <xref linkend="QpidJavaFAQ-Whatportsdoesthebrokeruse"/> FAQ + entry. + For more detailed information on configuration, please see + <xref linkend="qpid_Qpid-20Design-20--20Configuration"/> + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-WhatcommandlineoptionscanIpassintotheqpidserverscript-3F"><title> + What command line options can I pass into the qpid-server + script ? + </title> + + <para> + The following command line options are available: + </para> + + <para> + The following options are available: + </para><table> + <title> + Command Line Options + </title> + + <tgroup cols="3"> + <tbody> + <row> + <entry> + Option + </entry> + <entry> + Long Option + </entry> + <entry> + Description + </entry> + </row> + <row> + <entry> + b + </entry> + <entry> + bind + </entry> + <entry> + Bind to the specified address overriding any value in the + config file + </entry> + </row> + <row> + <entry> + c + </entry> + <entry> + config + </entry> + <entry> + Use the given configuration file + </entry> + </row> + <row> + <entry> + h + </entry> + <entry> + help + </entry> + <entry> + Prints list of options + </entry> + </row> + <row> + <entry> + l + </entry> + <entry> + logconfig + </entry> + <entry> + Use the specified log4j.xml file rather than that in the + etc directory + </entry> + </row> + <row> + <entry> + m + </entry> + <entry> + mport + </entry> + <entry> + Specify port to listen on for the JMX Management. Overrides + value in config file + </entry> + </row> + <row> + <entry> + p + </entry> + <entry> + port + </entry> + <entry> + Specify port to listen on. Overrides value in config file + </entry> + </row> + <row> + <entry> + v + </entry> + <entry> + version + </entry> + <entry> + Print version information and exit + </entry> + </row> + <row> + <entry> + w + </entry> + <entry> + logwatch + </entry> + <entry> + Specify interval for checking for logging config changes. + Zero means no checking + </entry> + </row> + </tbody> + </tgroup></table> + </section> + + <section role="h3" id="QpidJavaFAQ-HowdoIauthenticatewiththebroker-3FWhatuserid-26passwordshouldIuse-3F"><title> + How do I authenticate with the broker ? What user id & + password should I use ? + </title> + + <para> + You should login as user guest with password guest + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowdoIcreatequeuesthatwillalwaysbeinstantiatedatbrokerstartup-3F"><title> + How do I create queues that will always be instantiated at + broker startup ? + </title> + + <para> + You can configure queues which will be created at broker startup + by tailoring a copy of the virtualhosts.xml file provided in the + installed qpid-version/etc directory. + </para><para> + So, if you're using a queue called 'devqueue' you can ensure that + it is created at startup by using an entry something like this: + </para> + <programlisting> +<virtualhosts> + <default>test</default> + <virtualhost> + <name>test</name> + <test> + <queue> + <name>devqueue</name> + <devqueue> + <exchange>amq.direct</exchange> + <maximumQueueDepth>4235264</maximumQueueDepth> <!-- 4Mb --> + <maximumMessageSize>2117632</maximumMessageSize> <!-- 2Mb --> + <maximumMessageAge>600000</maximumMessageAge> <!-- 10 mins --> + </devqueue> + </queue> + </test> + </virtualhost> +</virtualhosts> +</programlisting> + <para> + Note that the name (in thie example above the name is 'test') + element should match the virtualhost that you're using to create + connections to the broker. This is effectively a namespace used + to prevent queue name clashes etc. You can also see that we've + set the 'test' virtual host to be the default for any connections + which do not specify a virtual host (in the <default> tag). + </para><para> + You can amend the config.xml to point at a different + virtualhosts.xml file by editing the <virtualhosts/> + element. + </para><para> + So, for example, you could tell the broker to use a file in your + home directory by creating a new config.xml file with the + following entry: + </para><para> + <virtualhosts>/home/myhomedir/virtualhosts.xml</virtualhosts> + </para><para> + You can then pass this amended config.xml into the broker at + startup using the -c flag i.e. + qpid-server -c <path>/config.xml + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowdoIcreatequeuesatruntime-3F"><title> + How do I + create queues at runtime? + </title> + + <para> + Queues can be dynamically created at runtime by creating a + consumer for them. After they have been created and bound (which + happens automatically when a JMS Consumer is created) a publisher + can send messages to them. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowdoItunethebroker-3F"><title> + How do I tune + the broker? + </title> + + <para> + There are a number of tuning options available, please see the + <xref linkend="qpid_How-20to-20Tune-20M3-20Java-20Broker-20Performance"/> page for more information. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-Wheredoundeliverablemessagesendup-3F"><title> + Where do + undeliverable messages end up ? + </title> + + <para> + At present, messages with an invalid routing key will be returned + to the sender. If you register an exception listener for your + publisher (easiest to do by making your publisher implement the + ExceptionListener interface and coding the onException method) + you'll see that you end up in onException in this case. You can + expect to be catching a subclass of + org.apache.qpid.AMQUndeliveredException. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-CanIconfigurethenameoftheQpidbrokerlogfileatruntime-3F"><title> + Can I configure the name of the Qpid broker log file at + runtime ? + </title> + + <para> + If you simply start the Qpid broker using the default + configuration, then the log file is written to + $QPID_WORK/log/qpid.log + </para><para> + This is not ideal if you want to run several instances from one + install, or acrhive logs to a shared drive from several hosts. + </para><para> + To make life easier, there are two optional ways to configure the + naming convention used for the broker log. + </para> + + <section role="h4" id="QpidJavaFAQ-Settingaprefixorsuffix"><title> + Setting a prefix + or suffix + </title> + + <para> + Users should set the following environment variables before + running qpid-server: + </para><para> + QPID_LOG_PREFIX - will prefix the log file name with the + specified value e.g. if you set this value to be the name of your + host (for example) it could look something like host123qpid.log + </para><para> + QPID_LOG_SUFFIX - will suffix the file name with the specified + value e.g. if you set this value to be the name of your + application (for example) if could look something like + qpidMyApp.log + </para> +<!--h4--></section> + + <section role="h4" id="QpidJavaFAQ-IncludingthePID"><title> + Including the PID + </title> + + <para> + Setting either of these variables to the special value PID will + introduce the process id of the java process into the file name + as a prefix or suffix as specified** + </para> +<!--h4--></section> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-Myclientapplicationappearstohavehung-3F"><title> + My + client application appears to have hung? + </title> + + <para> + The client code currently has various timeouts scattered + throughout the code. These can cause your client to appear like + it has hung when it is actually waiting for the timeout ot + compelete. One example is when the broker becomes non-responsive, + the client code has a hard coded 2 minute timeout that it will + wait when closing a connection. These timeouts need to be + consolidated and exposed. see <xref linkend="qpid_QPID-429"/> + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowdoIcontacttheQpidteam-3F"><title> + How do I + contact the Qpid team ? + </title> + + <para> + For general questions, please subscribe to the + users@qpid.apache.org mailing list (<xref linkend="qpid_"/>). + </para><para> + For development questions, please subscribe to the + dev@qpid.apache.org mailing list (<xref linkend="qpid_"/>). + </para><para> + More details on these lists are available on our <xref linkend="qpid_Mailing-20Lists"/> + page. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowcanIchangeauser-27spasswordwhilethebrokerisup-3F"><title> + How can I change a user's password while the broker is up ? + </title> + + <para> + You can do this via the <xref linkend="qpid_Qpid-20JMX-20Management-20Console"/>. To + do this simply log in to the management console as an admin user + (you need to have created an admin account in the + jmxremote.access file first) and then select the 'UserManagement' + mbean. Select the user in the table and click the Set Password + button. Alternatively, update the password file and use the + management console to reload the file with the button at the + bottom of the 'UserManagement' view. In both cases, this will + take effect when the user next logs in i.e. will not cause them + to be disconnected if they are already connected. + </para><para> + For more information on the Management Console please see our + <xref linkend="qpid_Qpid-20JMX-20Management-20Console-20User-20Guide"/> + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowdoIknowifthereisaconsumerforamessageIamgoingtosend-3F"><title> + How do I know if there is a consumer for a message I am going + to send? + </title> + + <para> + Knowing that there is a consumer for a message is quite tricky. + That said using the qpid.jms.Session#createProducer with + immediate and mandatory set to true will get you part of the way + there. + </para><para> + If you are publishing to a well known queue then immediate will + let you know if there is any consumer able to pre-fetch that + message at the time you send it. If not it will be returned to + you on your connection listener. + </para><para> + If you are sending to a queue that the consumer creates then the + mandatory flag will let you know if they have not yet created + that queue. + </para><para> + These flags will not be able to tell you if the consuming + application has received the message and is able to process it. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowdoIuseanInVMBrokerformyowntests-3F"><title> + How do I + use an InVM Broker for my own tests? + </title> + + <para> + I would take a look at the testPassiveTTL in <xref linkend="qpid_TimeToLiveTest.java?revision=683950&view=markup"/> + </para><para> + The setUp and tearDown methods show how to correctly start up a + broker for InVM testing. If you write your tests using a file for + the JNDI you can then very easily swap between running your tests + InVM and against a real broker. + </para><para> + See our <xref linkend="qpid_How-20to-20Use-20JNDI"/> on how to confgure it + </para><para> + Basically though you just need to set two System Properites: + </para><para> + java.naming.factory.initial = + org.apache.qpid.jndi.PropertiesFileInitialContextFactory + java.naming.provider.url = <your JNDI file> + </para><para> + and call getInitialContext() in your code. + </para><para> + You will of course need to have the broker libraries on your + class path for this to run. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-HowcanIinspectthecontentsofmyMessageStore-3F"><title> + How + can I inspect the contents of my MessageStore? + </title> + + <para> + There are two possibilities here: + </para><para> + 1) The management console can be used to interogate an active + broker and browse the contents of a queue.See the <xref linkend="qpid_Qpid-20JMX-20Management-20Console"/> + page for further details. + </para><para> + 2) The <xref linkend="qpid_MessageStore-20Tool"/> can be used to inspect + the contents of a persistent message store. Note: this can + currently only be used when the broker is offline. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-Whyaremytransientmessagesbeingsoslow-3F"><title> + Why are + my transient messages being so slow? + </title> + + <para> + You should check that you aren't sending persistent messages, + this is the default. If you want to send transient messages you + must explicitly set this option when instantiating your + MessageProducer or on the send() method. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-Whydoesmyproducerfillupthebrokerwithmessages-3F"><title> + Why + does my producer fill up the broker with messages? + </title> + + <para> + The Java broker does not currently implement producer flow + control. Publishes are currently asynchronous, so there is no + ability to rate limit this automatically. While this is something + which will be addressed in the future, it is currently up to + applications to ensure that they do not publish faster than the + messages are being consumed for signifcant periods of time. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-ThebrokerkeepsthrowinganOutOfMemoryexception-3F"><title> + The + broker keeps throwing an OutOfMemory exception? + </title> + + <para> + The broker can no longer store any more messages in memory. This + is particular evident if you are using the MemoryMessageStore. To + alleviate this issue you should ensure that your clients are + consuming all the messages from the broker. + </para><para> + You may also want to increase the memory allowance to the broker + though this will only delay the exception if you are publishing + messages faster than you are consuming. See <xref linkend="qpid_Java-20Environment-20Variables"/> for + details of changing the memory settings. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-WhyamIgettingabrokersideexceptionwhenItrytopublishtoaqueueoratopic-3F"><title> + Why am I getting a broker side exception when I try to + publish to a queue or a topic ? + </title> + + <para> + If you get a stack trace like this when you try to publish, then + you may have typo'd the exchange type in your queue or topic + declaration. Open your virtualhosts.xml and check that the + </para> + <programlisting> +<exchange>amq.direct</exchange> +</programlisting> + + <programlisting> +2009-01-12 15:26:27,957 ERROR [pool-11-thread-2] protocol.AMQMinaProtocolSession (AMQMinaProtocolSession.java:365) - Unexpected exception while processing frame. Closing connection. +java.lang.NullPointerException + at org.apache.qpid.server.security.access.PrincipalPermissions.authorise(PrincipalPermissions.java:398) + at org.apache.qpid.server.security.access.plugins.SimpleXML.authorise(SimpleXML.java:302) + at org.apache.qpid.server.handler.QueueBindHandler.methodReceived(QueueBindHandler.java:111) + at org.apache.qpid.server.handler.ServerMethodDispatcherImpl.dispatchQueueBind(ServerMethodDispatcherImpl.java:498) + at org.apache.qpid.framing.amqp_8_0.QueueBindBodyImpl.execute(QueueBindBodyImpl.java:167) + at org.apache.qpid.server.state.AMQStateManager.methodReceived(AMQStateManager.java:204) + at org.apache.qpid.server.protocol.AMQMinaProtocolSession.methodFrameReceived(AMQMinaProtocolSession.java:295) + at org.apache.qpid.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:93) + at org.apache.qpid.server.protocol.AMQMinaProtocolSession.frameReceived(AMQMinaProtocolSession.java:235) + at org.apache.qpid.server.protocol.AMQMinaProtocolSession.dataBlockReceived(AMQMinaProtocolSession.java:191) + at org.apache.qpid.server.protocol.AMQPFastProtocolHandler.messageReceived(AMQPFastProtocolHandler.java:244) + at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:703) + at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362) + at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:54) + at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800) + at org.apache.qpid.pool.PoolingFilter.messageReceived(PoolingFilter.java:371) + at org.apache.mina.filter.ReferenceCountingIoFilter.messageReceived(ReferenceCountingIoFilter.java:96) + at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362) + at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:54) + at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800) + at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:60) + at org.apache.mina.filter.codec.QpidProtocolCodecFilter.messageReceived(QpidProtocolCodecFilter.java:174) + at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362) + at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:54) + at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800) + at org.apache.qpid.pool.Event$ReceivedEvent.process(Event.java:86) + at org.apache.qpid.pool.Job.processAll(Job.java:110) + at org.apache.qpid.pool.Job.run(Job.java:149) + at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) + at java.lang.Thread.run(Thread.java:619) +</programlisting> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-WhyistherealotofAnonymousIoServicethreads"><title> + Why + is there a lot of AnonymousIoService threads + </title> + + <para> + These threads are part of the thread pool used by Mina to process + the socket. In the future we may provide tuning guidelines but at + this point we have seen no performance implications from the + current configuration. As the threads are part of a pool they + should remain inactive until required. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ--22unabletocertifytheprovidedSSLcertificateusingthecurrentSSLtruststore-22whenconnectingtheManagementConsoletothebroker."><title> + "unable to certify the provided SSL certificate using the + current SSL trust store" when connecting the Management Console + to the broker. + </title> + + <para> + You have not configured the console's SSL trust store properly, + see <xref linkend="qpid_Management-20Console-20Security"/> for + more details. + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-Clientkeepsthrowing-27Serverdidnotrespondinatimelyfashion-27-5Cerrorcode408-3ARequestTimeout-5C."><title> + Client keeps throwing 'Server did not respond in a timely + fashion' [error code 408: Request Timeout]. + </title> + + <para> + Certain operations wait for a response from the Server. One such + operations is commit. If the server does not respond to the + commit request within a set time a Request Timeout [error code: + 408] exception is thrown (Server did not respond in a timely + fashion). This is to ensure that a server that has hung does not + cause the client process to be come unresponsive. + </para><para> + However, it is possible that the server just needs a long time to + process a give request. For example, sending a large persistent + message when using a persistent store will take some time to a) + Transfer accross the network and b) to be fully written to disk. + </para><para> + These situations require that the default timeout value be + increased. A cilent <xref linkend="qpid_System-20Properties"/> 'amqj.default_syncwrite_timeout' can be set + on the client to increase the wait time. The default in 0.5 is + 30000 (30s). + </para> +<!--h3--></section> + + <section role="h3" id="QpidJavaFAQ-CanauseTCPKEEPALIVEorAMQPheartbeatingtokeepmyconnectionopen-3F"><title> + Can a use TCP_KEEPALIVE or AMQP heartbeating to keep my + connection open? + </title> + + <para> + See <xref linkend="qpid_Configure-20Broker-20and-20Client-20Heartbeating"/> + </para> + +<!--h3--></section> +<!--h2--></section> + + + +</chapter> diff --git a/doc/book/src/Qpid Management Features.xml b/doc/book/src/Qpid Management Features.xml new file mode 100644 index 0000000000..3d5aa5c883 --- /dev/null +++ b/doc/book/src/Qpid Management Features.xml @@ -0,0 +1,165 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"> + <title> + Apache Qpid : Qpid Management Features + </title> + <para> + <emphasis>Management tool:</emphasis> See our <xref linkend="qpid_Qpid-20JMX-20Management-20Console"/> for + details of how to use various console options with the Qpid + management features. + </para> + <para> + The management of QPID is categorised into following types- + </para> + <orderedlist> + <listitem><para>Exchange + </para></listitem> + <listitem><para>Queue + </para></listitem> + <listitem><para>Connection + </para></listitem> + <listitem><para>Broker + </para></listitem> + </orderedlist> + <para> + <emphasis>1) Managing and Monitoring Exchanges</emphasis>: Following is + the list of features, which we can have available for managing + and monitoring an Exchange running on a Qpid Server Domain- + </para> + <orderedlist> + <listitem><para>Displaying the following information for monitoring purpose- + <orderedlist> + <listitem><para>The list of queues bound to the exchange along with the + routing keys. + </para></listitem> + <listitem><para> + General Exchange properties(like name, + durable etc). + </para></listitem> + </orderedlist> + </para></listitem> + <listitem><para> + Binding an existing queue with the + exchange. + </para></listitem> + </orderedlist> + <para> + <emphasis>2) Managing and Monitoring + Queues</emphasis>: Following are the + features, which we can have for a Queue on a Qpid Server + Domain- + </para> + <orderedlist> + <listitem><para> + Displaying the following information about + the queue for monitoring purpose- + <orderedlist> + <listitem><para> + General Queue properties(like name, + durable, etc.) + </para></listitem> + <listitem><para> + The maximum size of a message that can + be accepted from the message producer. + </para></listitem> + <listitem><para> + The number of the active consumers + accessing the Queue. + </para></listitem> + <listitem><para> + The total number of + consumers (Active and Suspended). + </para></listitem> + <listitem><para> + The number of undelivered messages + in the Queue. + </para></listitem> + <listitem><para> + The total number of messages received + on the Queue since startup. + </para></listitem> + <listitem><para> + The maximum number of bytes for + the Queue that can be stored on the Server. + </para></listitem> + <listitem><para>The maximum number of messages for the Queue that can be + stored on the Server. + </para></listitem> + </orderedlist> + </para></listitem> + <listitem><para> + Viewing the messages on the Queue. + </para></listitem> + <listitem><para> + Deleting message from top of the + Queue. + </para></listitem> + <listitem><para> + Clearing the Queue. + </para></listitem> + <listitem><para> + Browsing the DeadMessageQueue - Messages + which are expired or undelivered because of some reason are + routed to the DeadMessageQueue. This queue can not be + deleted. [Note: The is open because it depends on how + these kind of messages will be handeled?] + </para></listitem> + </orderedlist> + <para> + <emphasis>3) Managing and Monitoring + Connections</emphasis>: Following are the + features, which we can have for a connection on a QPID + Server Domain- + </para> + <orderedlist> + <listitem><para> + Displaying general connection + properties(like remote address, etc.). + </para></listitem> + <listitem><para>Setting maximum number of channels allowed for a + connection. + </para></listitem> + <listitem><para>View all related channels and channel properties. + </para></listitem> + <listitem><para>Closing a channel. + </para></listitem> + <listitem><para>Commit or Rollback transactions of a channel, if the channel + is transactional. + </para></listitem> + <listitem><para>Notification for exceeding the maximum number of + channels. + </para></listitem> + <listitem><para>Dropping a connection. + </para></listitem> + <listitem><para>The work for <xref linkend="qpid_Network-20IO-20Interface"/> implies that + there are potentially some additional requirements + <orderedlist> + <listitem><para>Alert when tcp flow control kicks in + </para></listitem> + <listitem><para>Information available about current memory usage + available through JMX interface + </para></listitem> + <listitem><para>Dynamic removal of buffer bounds? (fundamentally not + possible with TransportIO) + </para></listitem> + <listitem><para>Management functionality added to JMX interface - UI + changes? + </para></listitem> + </orderedlist> + </para></listitem> + </orderedlist> + <para> + <emphasis>4) Managing the Broker</emphasis>: Features for the Broker- + </para> + <orderedlist> + <listitem><para>Creating an Exchange. + </para></listitem> + <listitem><para>Unregistering an Exchange. + </para></listitem> + <listitem><para>Creating a Queue. + </para></listitem> + <listitem><para>Deleting a + Queue. + </para></listitem> + </orderedlist> +</chapter> diff --git a/doc/book/src/Qpid Troubleshooting Guide.xml b/doc/book/src/Qpid Troubleshooting Guide.xml new file mode 100644 index 0000000000..84bfc01374 --- /dev/null +++ b/doc/book/src/Qpid Troubleshooting Guide.xml @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Qpid Troubleshooting Guide + </title><para> + Contents + </para> + <itemizedlist> + <listitem><para> + <xref linkend="QpidTroubleshootingGuide-I-27mgettingajava.lang.UnsupportedClassVersionErrorwhenItrytostartthebroker.Whatdoesthismean-3F"/> + </para></listitem> + <listitem><para> + <xref linkend="QpidTroubleshootingGuide-I-27mhavingaproblembindingtotherequiredhost-3Aportatbrokerstartup-3F"/> + </para></listitem> + <listitem><para> + <xref linkend="QpidTroubleshootingGuide-I-27mhavingproblemswithmyclasspath.HowcanIensurethatmyclasspathisok-3F"/> + </para></listitem> + <listitem><para> + <xref linkend="QpidTroubleshootingGuide-Ican-27tgetthebrokertostart.HowcanIdiagnosetheproblem-3F"/> + </para></listitem> + <listitem><para> + <xref linkend="QpidTroubleshootingGuide-WhenItrytosendmessagestoaqueueI-27mgettingaerrorasthequeuedoesnotexist.WhatcanIdo-3F"/> + </para></listitem> + </itemizedlist> + <section role="h2" id="QpidTroubleshootingGuide-I-27mgettingajava.lang.UnsupportedClassVersionErrorwhenItrytostartthebroker.Whatdoesthismean-3F"><title> + I'm getting a java.lang.UnsupportedClassVersionError when I + try to start the broker. What does this mean ? + </title> + + <para> + The QPID broker requires JDK 1.5 or later. If you're seeing this + exception you don't have that version in your path. Set JAVA_HOME + to the correct version and ensure the bin directory is on your + path. + </para><para> + java.lang.UnsupportedClassVersionError: + org/apache/qpid/server/Main (Unsupported major.minor version + 49.0) + at + java.lang.ClassLoader.defineClass(Ljava.lang.String;[BIILjava.security.ProtectionDomain;)Ljava.lang.Class;(Unknown + Source) + at + java.security.SecureClassLoader.defineClass(Ljava.lang.String;[BIILjava.security.CodeSource;)Ljava.lang.Class;(SecureClassLoader.java:123) + + at + java.net.URLClassLoader.defineClass(Ljava.lang.String;Lsun.misc.Resource;)Ljava.lang.Class;(URLClassLoader.java:251) + + at + java.net.URLClassLoader.access$100(Ljava.net.URLClassLoader;Ljava.lang.String;Lsun.misc.Resource;)Ljava.lang.Class;(URLClassLoader.java:55) + + at java.net.URLClassLoader$1.run()Ljava.lang.Object; + (URLClassLoader.java:194) + at + jrockit.vm.AccessController.do_privileged_exc(Ljava.security.PrivilegedExceptionAction;Ljava.security.AccessControlContext;I)Ljava.lang.Object;(Unknown + Source) + at + jrockit.vm.AccessController.doPrivileged(Ljava.security.PrivilegedExceptionAction;Ljava.security.AccessControlContext;)Ljava.lang.Object;(Unknown + Source) + at + java.net.URLClassLoader.findClass(Ljava.lang.String;)Ljava.lang.Class;(URLClassLoader.java:187) + + at + java.lang.ClassLoader.loadClass(Ljava.lang.String;Z)Ljava.lang.Class; + (Unknown Source) + at + sun.misc.Launcher$AppClassLoader.loadClass(Ljava.lang.String;Z)Ljava.lang.Class;(Launcher.java:274) + + at + java.lang.ClassLoader.loadClass(Ljava.lang.String;)Ljava.lang.Class; + + (Unknown Source) + at + java.lang.ClassLoader.loadClassFromNative(II)Ljava.lang.Class; + + (Unknown Source) + </para> + +<!--h2--></section> + + <section role="h2" id="QpidTroubleshootingGuide-I-27mhavingaproblembindingtotherequiredhost-3Aportatbrokerstartup-3F"><title> + I'm having a problem binding to the required host:port at + broker startup ? + </title> + <para> + This error probably indicates that another process is using the + port you the broker is trying to listen on. If you haven't + amended the default configuration this will be 5672. To check + what process is using the port you can use 'netstat -an |grep + 5672'. + </para><para> + To change the port your broker uses, either edit the config.xml + you are using. You can specify an alternative config.xml from the + one provided in /etc by using the -c flag i.e. qpid-server -c + <my config file path>. + </para><para> + You can also amend the port more simply using the -p option to + qpid-server i.e. qpid-server -p <my port number' + </para> +<!--h2--></section> + + <section role="h2" id="QpidTroubleshootingGuide-I-27mhavingproblemswithmyclasspath.HowcanIensurethatmyclasspathisok-3F"><title> + I'm having problems with my classpath. How can I ensure that + my classpath is ok ? + </title> + <para> + When you are running the broker the classpath is taken care of + for you, via the manifest entries in the launch jars that the + qpid-server configuration file adds to the classpath. + </para><para> + However, if you are running your own client code and experiencing + classspath errors you need to ensure that the client-launch.jar + from the installed Qpid lib directory is on your classpath. The + manifest for this jar includes the common-launch.jar, and thus + all the code you need to run a client application. + </para> + + <section role="h2" id="QpidTroubleshootingGuide-Ican-27tgetthebrokertostart.HowcanIdiagnosetheproblem-3F"><title> + I can't get the broker to start. How can I diagnose the + problem ? + </title> + <para> + Firstly have a look at the broker log file - either on stdout or + in $QPID_WORK/log/qpid.log or in $HOME/log/qpid.log if you + haven't set QPID_WORK. + </para><para> + You should see the problem logged in here via log4j and a stack + trace. Have a look at the other entries on this page for common + problems. If the log file includes a line like: + </para><para> + "2006-10-13 09:58:14,672 INFO [main] server.Main (Main.java:343) + - Qpid.AMQP listening on non-SSL address 0.0.0.0/0.0.0.0:5672" + </para><para> + ... then you know the broker started up. If not, then it didn't. + </para> +<!--h2--></section> + + <section role="h2" id="QpidTroubleshootingGuide-WhenItrytosendmessagestoaqueueI-27mgettingaerrorasthequeuedoesnotexist.WhatcanIdo-3F"><title> + When I try to send messages to a queue I'm getting a error as + the queue does not exist. What can I do ? + </title> + <para> + In Qpid queues need a consumer before they really exist, unless + you have used the virtualhosts.xml file to specify queues which + should always be created at broker startup. If you don't want to + use this config, then simply ensure that you consume first from + queue before staring to publish to it. See the entry on our + <xref linkend="qpid_Qpid-20Java-20FAQ"/> for more details of using the virtualhosts.xml route. + </para> +<!--h2--></section> +</chapter> diff --git a/doc/book/src/Use Priority Queues.xml b/doc/book/src/Use Priority Queues.xml new file mode 100644 index 0000000000..8ba8861f6a --- /dev/null +++ b/doc/book/src/Use Priority Queues.xml @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns:html="http://www.w3.org/1999/xhtml"><title> + Apache Qpid : Use Priority Queues + </title> + + + <section role="h2" id="UsePriorityQueues-GeneralInformation"><title> + General + Information + </title> + <para> + The Qpid M3 release introduces priority queues into the Java + Messaging Broker, supporting JMS clients who wish to make use of + priorities in their messaging implementation. + </para><para> + There are some key points around the use of priority queues in + Qpid, discussed in the sections below. + </para> +<!--h2--></section> + <section role="h2" id="UsePriorityQueues-DefiningPriorityQueues"><title> + Defining + Priority Queues + </title> + <para> + You must define a priority queue specifically before you start to + use it. You cannot subsequently change a queue to/from a priority + queue (without deleting it and re-creating). + </para><para> + You define a queue as a priority queue in the virtualhost + configuration file, which the broker loads at startup. When + defining the queue, add a <priority>true</priority> + element. This will ensure that the queue has 10 distinct + priorities, which is the number supported by JMS. + </para><para> + If you require fewer priorities, it is possible to specify a + <priorities>int</priorities> element (where int is a + valid integer value between 2 and 10 inclusive) which will give + the queue that number of distinct priorities. When messages are + sent to that queue, their effective priority will be calculated + by partitioning the priority space. If the number of effective + priorities is 2, then messages with priority 0-4 are treated the + same as "lower priority" and messages with priority 5-9 are + treated equivalently as "higher priority". + </para> + <programlisting> +<queue> + <name>test</name> + <test> + <exchange>amq.direct</exchange> + <priority>true</priority> + </test> +</queue> +</programlisting> +<!--h2--></section> + + <section role="h2" id="UsePriorityQueues-Clientconfiguration-2Fmessagingmodelforpriorityqueues"><title> + Client configuration/messaging model for priority queues + </title> + <para> + There are some other configuration & paradigm changes which + are required in order that priority queues work as expected. + </para> + <section role="h3" id="UsePriorityQueues-Setlowprefetch"><title> + Set low pre-fetch + </title> + <para> + Qpid clients receive buffered messages in batches, sized + according to the pre-fetch value. The current default is 5000. + </para><para> + However, if you use the default value you will probably + <emphasis>not</emphasis> see desirable behaviour with messages of different + priority. This is because a message arriving after the pre-fetch + buffer has filled will not leap frog messages of lower priority. + It will be delivered at the front of the next batch of buffered + messages (if that is appropriate), but this is most likely NOT + what you need. + </para><para> + So, you need to set the prefetch values for your client + (consumer) to make this sensible. To do this set the java system + property max_prefetch on the client environment (using -D) before + creating your consumer. + </para><para> + Setting the Qpid pre-fetch to 1 for your client means that + message priority will be honoured by the Qpid broker as it + dispatches messages to your client. A default for all client + connections can be set via a system property: + </para> + <programlisting> +-Dmax_prefetch=1 +</programlisting> + <para> + The prefetch can be also be adjusted on a per connection basis by + adding a 'maxprefetch' value to the <xref linkend="qpid_Connection-20URL-20Format"/> + </para> + <programlisting> +amqp://guest:guest@client1/development?maxprefetch='1'&brokerlist='tcp://localhost:5672' +</programlisting> + <para> + There is a slight performance cost here if using the receive() + method and you could test with a slightly higher pre-fetch (up to + 10) if the trade-off between throughput and prioritisation is + weighted towards the former for your application. (If you're + using OnMessage() then this is not a concern.) + </para> +<!--h3--></section> + <section role="h3" id="UsePriorityQueues-Singleconsumerpersession"><title> + Single + consumer per session + </title> + <para> + If you are using the receive() method to consume messages then + you should also only use one consumer per session with priority + queues. If you're using OnMessage() then this is not a concern. + </para> +<!--h3--></section> +<!--h2--></section> +</chapter> diff --git a/doc/book/src/schemas.xml b/doc/book/src/schemas.xml index 960fffaa2a..3b2359e1c3 100644 --- a/doc/book/src/schemas.xml +++ b/doc/book/src/schemas.xml @@ -1,5 +1,6 @@ <?xml version="1.0"?> <locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0"> + <uri resource="Configure the Broker via config.xml.xml" typeId="DocBook"/> <uri resource="SSL.xml" typeId="DocBook"/> <uri resource="Using Broker Federation.xml" typeId="DocBook"/> <uri resource="Cheat Sheet for configuring Exchange Options.xml" typeId="DocBook"/> |