JBoss hornetq SVN: r9214 - in branches/HnetQ_323_cn/docs/quickstart-guide: zh and 1 other directories.
by do-not-reply@jboss.org
Author: gaohoward
Date: 2010-05-10 02:09:57 -0400 (Mon, 10 May 2010)
New Revision: 9214
Added:
branches/HnetQ_323_cn/docs/quickstart-guide/zh/
branches/HnetQ_323_cn/docs/quickstart-guide/zh/about.xml
branches/HnetQ_323_cn/docs/quickstart-guide/zh/download.xml
branches/HnetQ_323_cn/docs/quickstart-guide/zh/examples.xml
branches/HnetQ_323_cn/docs/quickstart-guide/zh/images/
branches/HnetQ_323_cn/docs/quickstart-guide/zh/images/hornetQ_logo_600px.png
branches/HnetQ_323_cn/docs/quickstart-guide/zh/installation.xml
branches/HnetQ_323_cn/docs/quickstart-guide/zh/introduction.xml
branches/HnetQ_323_cn/docs/quickstart-guide/zh/master.xml
branches/HnetQ_323_cn/docs/quickstart-guide/zh/notice.xml
branches/HnetQ_323_cn/docs/quickstart-guide/zh/running.xml
Log:
added zh docs
Added: branches/HnetQ_323_cn/docs/quickstart-guide/zh/about.xml
===================================================================
--- branches/HnetQ_323_cn/docs/quickstart-guide/zh/about.xml (rev 0)
+++ branches/HnetQ_323_cn/docs/quickstart-guide/zh/about.xml 2010-05-10 06:09:57 UTC (rev 9214)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ============================================================================= -->
+<!-- Copyright © 2009 Red Hat, Inc. and others. -->
+<!-- -->
+<!-- The text of and illustrations in this document are licensed by Red Hat under -->
+<!-- a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). -->
+<!-- -->
+<!-- An explanation of CC-BY-SA is available at -->
+<!-- -->
+<!-- http://creativecommons.org/licenses/by-sa/3.0/. -->
+<!-- -->
+<!-- In accordance with CC-BY-SA, if you distribute this document or an adaptation -->
+<!-- of it, you must provide the URL for the original version. -->
+<!-- -->
+<!-- Red Hat, as the licensor of this document, waives the right to enforce, -->
+<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
+<!-- permitted by applicable law. -->
+<!-- ============================================================================= -->
+
+<chapter id="about">
+ <title>About HornetQ</title>
+ <para>What is HornetQ?</para>
+ <itemizedlist>
+ <listitem>
+ <para>HornetQ is an open source project to build a multi-protocol, embeddable, very high
+ performance, clustered, asynchronous messaging system.</para>
+ </listitem>
+ <listitem>
+ <para>For answers to more questions about what HornetQ is and what it isn't please visit
+ the <ulink url="http://www.jboss.org/community/wiki/HornetQGeneralFAQs">FAQs wiki
+ page</ulink>.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Why use HornetQ? Here are just a few of the reasons:</para>
+ <itemizedlist>
+ <listitem>
+ <para>100% open source software. HornetQ is licenced using the Apache Software License v2.0
+ to minimise barriers to adoption.</para>
+ </listitem>
+ <listitem>
+ <para>HornetQ is designed with usability in mind.</para>
+ </listitem>
+ <listitem>
+ <para>Written in Java. Runs on any platform with a Java 6+ runtime, that's everything
+ from Windows desktops to IBM mainframes.</para>
+ </listitem>
+ <listitem>
+ <para>Amazing performance. Our class beating high performance journal provides persistent
+ messaging performance at rates normally seen for non persistent messaging, our non
+ persistent messaging performance rocks the boat too.</para>
+ </listitem>
+ <listitem>
+ <para>Full feature set. All the features you'd expect in any serious messaging system,
+ and others you won't find anywhere else.</para>
+ </listitem>
+ <listitem>
+ <para>Elegant, clean-cut design with minimal third party dependencies. Run HornetQ
+ stand-alone, run it in integrated in your favourite JEE application server, or run
+ it embedded inside your own product. It's up to you.</para>
+ </listitem>
+ <listitem>
+ <para>Seamless high availability. We provide a HA solution with automatic client
+ failover so you can guarantee zero message loss or duplication in event of server
+ failure.</para>
+ </listitem>
+ <listitem>
+ <para>Hugely flexible clustering. Create clusters of servers that know how to load
+ balance messages. Link geographically distributed clusters over unreliable
+ connections to form a global network. Configure routing of messages in a highly
+ flexible way.</para>
+ </listitem>
+ <listitem>
+ <para>For a full list of features, please see the <ulink
+ url="http://www.jboss.org/community/wiki/HornetQFeatures">features wiki
+ page</ulink> .</para>
+ </listitem>
+ </itemizedlist>
+</chapter>
\ No newline at end of file
Added: branches/HnetQ_323_cn/docs/quickstart-guide/zh/download.xml
===================================================================
--- branches/HnetQ_323_cn/docs/quickstart-guide/zh/download.xml (rev 0)
+++ branches/HnetQ_323_cn/docs/quickstart-guide/zh/download.xml 2010-05-10 06:09:57 UTC (rev 9214)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ============================================================================= -->
+<!-- Copyright © 2009 Red Hat, Inc. and others. -->
+<!-- -->
+<!-- The text of and illustrations in this document are licensed by Red Hat under -->
+<!-- a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). -->
+<!-- -->
+<!-- An explanation of CC-BY-SA is available at -->
+<!-- -->
+<!-- http://creativecommons.org/licenses/by-sa/3.0/. -->
+<!-- -->
+<!-- In accordance with CC-BY-SA, if you distribute this document or an adaptation -->
+<!-- of it, you must provide the URL for the original version. -->
+<!-- -->
+<!-- Red Hat, as the licensor of this document, waives the right to enforce, -->
+<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
+<!-- permitted by applicable law. -->
+<!-- ============================================================================= -->
+<chapter id="download">
+ <title>Download</title>
+ <para>The official HornetQ project page is <ulink url="http://hornetq.org/"
+ >http://hornetq.org/</ulink>.</para>
+ <section id="download.software">
+ <title>Software Download</title>
+ <para>The software can be download from the Download page:<ulink
+ url="http://hornetq.org/downloads.html/"
+ >http://hornetq.org/downloads.html</ulink></para>
+ </section>
+ <section id="download.svn">
+ <title>Project Information</title>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>Please take a look at our project <ulink
+ url="http://www.jboss.org/community/wiki/HornetQ">wiki</ulink></para>
+ </listitem>
+ <listitem>
+ <para>If you have any user questions please use our <ulink
+ url="http://www.jboss.org/index.html?module=bb&op=viewforum&f=312">user
+ forum</ulink></para>
+ </listitem>
+ <listitem>
+ <para>If you have development related questions, please use our <ulink
+ url="http://www.jboss.org/index.html?module=bb&op=viewforum&f=313"
+ >developer forum</ulink></para>
+ </listitem>
+ <listitem>
+ <para>Pop in and chat to us in our <ulink url="irc://irc.freenode.net:6667/hornetq"
+ >IRC channel</ulink></para>
+ </listitem>
+ <listitem>
+ <para>Our project <ulink url="http://hornetq.blogspot.com/">blog</ulink></para>
+ </listitem>
+ <listitem>
+ <para>Follow us on <ulink url="http://twitter.com/hornetq">twitter</ulink></para>
+ </listitem>
+ <listitem>
+ <para>HornetQ Subversion trunk is <ulink
+ url="http://anonsvn.jboss.org/repos/hornetq/trunk"
+ >http://anonsvn.jboss.org/repos/hornetq/trunk</ulink></para>
+ </listitem>
+ <listitem>
+ <para>All release tags are availble from <ulink
+ url="http://anonsvn.jboss.org/repos/hornetq/tags"
+ >http://anonsvn.jboss.org/repos/hornetq/tags</ulink></para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </section>
+</chapter>
Added: branches/HnetQ_323_cn/docs/quickstart-guide/zh/examples.xml
===================================================================
--- branches/HnetQ_323_cn/docs/quickstart-guide/zh/examples.xml (rev 0)
+++ branches/HnetQ_323_cn/docs/quickstart-guide/zh/examples.xml 2010-05-10 06:09:57 UTC (rev 9214)
@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ============================================================================= -->
+<!-- Copyright © 2009 Red Hat, Inc. and others. -->
+<!-- -->
+<!-- The text of and illustrations in this document are licensed by Red Hat under -->
+<!-- a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). -->
+<!-- -->
+<!-- An explanation of CC-BY-SA is available at -->
+<!-- -->
+<!-- http://creativecommons.org/licenses/by-sa/3.0/. -->
+<!-- -->
+<!-- In accordance with CC-BY-SA, if you distribute this document or an adaptation -->
+<!-- of it, you must provide the URL for the original version. -->
+<!-- -->
+<!-- Red Hat, as the licensor of this document, waives the right to enforce, -->
+<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
+<!-- permitted by applicable law. -->
+<!-- ============================================================================= -->
+<chapter id="examples">
+ <title>Running the Examples</title>
+ <para>In the directory <literal>examples</literal> there are 2 sets of examples, these are </para>
+ <itemizedlist>
+ <listitem>
+ <para>JMS Examples - these demonstrate functionality while sending and consumng JMS
+ messages.</para>
+ </listitem>
+ <listitem>
+ <para>Java EE Examples - these demonstrate application server integration, e.g. MDBs, EJBs,
+ Servlets, etc.</para>
+ </listitem>
+ </itemizedlist>
+ <section id="examples.jms">
+ <title>The JMS examples</title>
+ <para>The JMS Examples all follow the same format. Each examples is contained in its own
+ directory which contains the following.</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>build.xml</literal></para>
+ <para>This is the ant build file used to run the example</para>
+ </listitem>
+ <listitem>
+ <para><literal>src</literal> directory</para>
+ <para>This contains the source code for the example</para>
+ </listitem>
+ <listitem>
+ <para><literal>server0</literal> configuration directory</para>
+ <para>This contains the configuration files needed to run the server for the example.
+ There may be multiple configuration directories <literal>server0</literal>, <literal
+ >server1</literal> etc for clustered examples etc.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Each example will start one or more stand-alone servers and stop them after the example
+ has completed.</para>
+ <para>As a quick start we'll run the queue example. For all other examples refer to the main
+ user manual.</para>
+ <para>Firstly open a Shell or a Command prompt and navigate to the <literal
+ >examples/jms/queue</literal> directory.</para>
+ <para>Type the command <literal>./build.sh</literal> (or <literal>build.bat</literal> if you
+ are running on Windows), and you should see the following output:</para>
+ <programlisting>Buildfile: build.xml
+
+run:
+
+init:
+
+compile:
+ [echo] src.example.dir=/home/andy/projects/hornetq/trunk/examples/jms/queue/src
+ [javac] Compiling 5 source files to /home/andy/projects/hornetq/trunk/examples/jms/queue
+/build/classes
+
+runExample:
+ [java] 10:41:04,149 INFO @main [JMSExample] hornetq.example.runServer is true
+ [java] 10:41:04,149 INFO @main [JMSExample] starting server with config 'server0'
+ logServerOutput true
+ [java] 10:41:04,149 INFO @main [JMSExample] and vm args: -Xms512M,-Xmx512M,-XX:+U
+seParallelGC,-XX:+AggressiveOpts,-XX:+UseFastAccessorMethods,-Djava.util.logging.config.
+file=/home/andy/projects/hornetq/trunk/examples/jms/common/../../../src/config/stand-alone/no
+n-clustered/logging.properties
+ [java] org.hornetq.jms.example.SpawnedJMSServer out:10:41:08,437 INFO @main [Journal
+StorageManager] AIO journal selected
+ [java] org.hornetq.jms.example.SpawnedJMSServer out:10:41:08,437 WARN @main [Journal
+StorageManager] AIO wasn't located on this platform, it will fall back to using pure Jav
+a NIO. If your platform is Linux, install LibAIO to enable the AIO journal
+ [java] org.hornetq.jms.example.SpawnedJMSServer out:10:41:08,437 WARN @main [Securit
+yStoreImpl] It has been detected that the cluster admin password which is used to replic
+ate management operation from one node to the other has not had its password changed fro
+m the installation default. Please see the HornetQ user guide for instructions o
+n how to do this.
+ [java] org.hornetq.jms.example.SpawnedJMSServer out:10:41:10,941 INFO @main [HornetQCo
+nnectionFactory] read only is false
+ [java] org.hornetq.jms.example.SpawnedJMSServer out:10:41:10,941 INFO @main [HornetQCo
+nnectionFactory] read only is false
+ [java] org.hornetq.jms.example.SpawnedJMSServer out:10:41:10,941 INFO @main [HornetQCo
+nnectionFactory] read only is false
+ [java] org.hornetq.jms.example.SpawnedJMSServer out:10:41:10,991 WARN @main [JMSServ
+erManagerImpl] Binding for java:/ConnectionFactory already exists
+ [java] org.hornetq.jms.example.SpawnedJMSServer out:10:41:10,991 WARN @main [JMSServ
+erManagerImpl] Binding for java:/XAConnectionFactory already exists
+ [java] org.hornetq.jms.example.SpawnedJMSServer out:10:41:11,241 INFO @main [Messagi
+ngServerImpl] HornetQ Server version 2.0.0.BETA5 (buzz-buzz, 107) started
+ [java] org.hornetq.jms.example.SpawnedJMSServer out:10:41:11,241 INFO @main [HornetQBoot
+strapServer] HornetQ server started
+ [java] org.hornetq.jms.example.SpawnedJMSServer out:STARTED::
+ [java] 10:41:11,276 INFO @main [JMSExample] using server0/client-jndi.properties f
+or jndi
+ [java] Sent message: This is a text message
+ [java] Received message: This is a text message
+ [java]
+ [java] #####################
+ [java] ### SUCCESS! ###
+ [java] #####################
+
+BUILD SUCCESSFUL
+Total time: 13 seconds
+</programlisting>
+ <para>Congratulations! You have successfully run your first HornetQ example. Try some of the
+ others.</para>
+ </section>
+ <section id="examples.messaging">
+ <title>The Java EE Examples</title>
+ <para>The Java EE Examples are examples that require a JEE application server to run. They
+ include MDB, Servlet, EJB examples etc. For this you will need the JBoss Application Server
+ installed. How to do this is explained in the previous chapters.</para>
+ <para>We'll use the MDB example for the purposes of this guide. For the other examples refer
+ to the user guide. Before going any further ensure that the JBoss Application Server is
+ running.</para>
+ <para>Like the other Java EE examples the MDB example is a JEE Application which first needs
+ deploying in the JBoss Application Server. The first thing we need to do is set the
+ <literal>JBOSS_HOME</literal> environment property to the location of the JBoss
+ Application Server, in a Linux shell this would be something like:</para>
+ <programlisting>export JBOSS_HOME=/home/jbossas5.1/build/output/jboss-5.1.0.GA</programlisting>
+ <para>Once set we can then deploy the application, from inside the <literal
+ >examples/javaee/mdb</literal> directory run the command:</para>
+ <programlisting>./build.sh deploy</programlisting>
+ <para>This will make a copy of the messaging profile in the JBoss Application server and start
+ the server.</para>
+ <para>In the shell window you should see something like the following output:</para>
+ <programlisting>Buildfile: build.xml
+
+validate-jboss:
+
+deploy:
+
+deploy-resources:
+ [copy] Copying 1 file to /home/andy/projects/jbossas5.1/build/output/jboss-5.1.0.GA
+ /server/default-with-hornetq/deploy/hornetq.sar
+ [copy] Copying 1 file to /home/andy/projects/jbossas5.1/build/output/jboss-5.1.0.GA
+ /server/default-with-hornetq/deploy/hornetq.sar
+
+init:
+
+compile:
+
+jar:
+ [jar] Building jar: /home/andy/projects/hornetq/trunk/examples/javaee/mdb/build/mdb-exa
+ mple.jar
+
+ear:
+ [jar] Building jar: /home/andy/projects/hornetq/trunk/examples/javaee/mdb/build/mdb-exa
+ mple.ear
+
+deploy-ear:
+ [copy] Copying 1 file to /home/andy/projects/jbossas5.1/build/output/jboss-5.1.0.GA
+
+ .......
+
+
+ [exec] 16:01:04,607 INFO [JBossASKernel] Class:javax.jms.MessageListener
+ [exec] 16:01:04,607 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=mdb-example.ear,
+ jar=mdb-example.jar,name=MessageMDBExample,service=EJB3) to KernelDeployment of:
+ mdb-example.jar
+ [exec] 16:01:04,702 INFO [EJBContainer] STARTED EJB: org.hornetq.javaee.example.server
+ .MDBExample ejbName: MessageMDBExample
+ [exec] 16:01:09,496 INFO [TomcatDeployment] deploy, ctxPath=/mdb-example
+ [exec] 16:01:09,812 WARNING [config] Unable to process deployment descriptor for cont
+ ext '/mdb-example'
+ [exec] 16:01:09,812 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context
+ '/mdb-example'
+ [exec] 16:01:09,958 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-
+ 8080
+ [exec] 16:01:09,990 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
+ [exec] 16:01:10,001 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag
+ =JBoss_5_1_0_GA date=200905151005)] Started in 6m:21s:797ms
+
+</programlisting>
+ <para>We can now run the example, do this by running the following command from within the
+ <literal>mdb</literal> directory.</para>
+ <programlisting>./build.sh</programlisting>
+ <para>You should see some output similar to the following:</para>
+ <programlisting>Buildfile: build.xml
+
+run:
+
+init:
+
+compile:
+
+runExample:
+ [java] Sent message: This is a text message
+
+BUILD SUCCESSFUL
+Total time: 7 seconds</programlisting>
+ <para>You may also see some output from the JBoss Application Server, in this instance it
+ is:</para>
+ <programlisting>16:27:54,703 INFO [STDOUT] message This is a text message received</programlisting>
+ <para>The application can then be undeployed by running the following command from within the
+ <literal>mdb</literal> directory.</para>
+ <programlisting>./build.sh undeploy</programlisting>
+ <para>This should so some output similar to the following:</para>
+ <programlisting>Buildfile: build.xml
+
+validate-jboss:
+
+undeploy:
+
+undeploy-misc:
+ [delete] Deleting: /home/andy/projects/jbossas5.1/build/output/jboss-5.1.0.GA
+ /server/default-with-hornetq/deploy/mdb-example.ear
+ [delete] Deleting: /home/andy/projects/jbossas5.1/build/output/jboss-5.1.0.GA
+ /server/default-with-hornetq/deploy/hornetq.sar/hornetq-queues.xml
+ [delete] Deleting: /home/andy/projects/jbossas5.1/build/output/jboss-5.1.0.GA
+ /server/default-with-hornetq/deploy/hornetq.sar/hornetq-jms.xml
+
+BUILD SUCCESSFUL
+Total time: 1 second
+</programlisting>
+ <para>You can verify that the application has been undeployed by checking the output from the
+ JBoss Application Server, in this instance it will be something like:</para>
+ <programlisting>16:36:45,277 INFO [EJBContainer] STOPPED EJB: org.jboss.javaee.example.server.MDBExample
+ ejbName: MessageMDBExample
+</programlisting>
+ <para>Congratulations! you have successfully deployed and run a Java EE example.</para>
+ </section>
+</chapter>
Added: branches/HnetQ_323_cn/docs/quickstart-guide/zh/images/hornetQ_logo_600px.png
===================================================================
(Binary files differ)
Property changes on: branches/HnetQ_323_cn/docs/quickstart-guide/zh/images/hornetQ_logo_600px.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/HnetQ_323_cn/docs/quickstart-guide/zh/installation.xml
===================================================================
--- branches/HnetQ_323_cn/docs/quickstart-guide/zh/installation.xml (rev 0)
+++ branches/HnetQ_323_cn/docs/quickstart-guide/zh/installation.xml 2010-05-10 06:09:57 UTC (rev 9214)
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ============================================================================= -->
+<!-- Copyright © 2009 Red Hat, Inc. and others. -->
+<!-- -->
+<!-- The text of and illustrations in this document are licensed by Red Hat under -->
+<!-- a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). -->
+<!-- -->
+<!-- An explanation of CC-BY-SA is available at -->
+<!-- -->
+<!-- http://creativecommons.org/licenses/by-sa/3.0/. -->
+<!-- -->
+<!-- In accordance with CC-BY-SA, if you distribute this document or an adaptation -->
+<!-- of it, you must provide the URL for the original version. -->
+<!-- -->
+<!-- Red Hat, as the licensor of this document, waives the right to enforce, -->
+<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
+<!-- permitted by applicable law. -->
+<!-- ============================================================================= -->
+<chapter id="installation">
+ <title>Installation</title>
+ <para>This section describes how to install HornetQ. </para>
+ <section id="installation.prerequisites">
+ <title>Prerequisites</title>
+ <note>
+ <para>HornetQ only runs on Java 6 or later.</para>
+ </note>
+ <para>By default, HornetQ server runs with 1GiB of memory. If your computer has less memory,
+ or you want to run it with more available RAM, modify the value in <literal
+ >bin/run.sh</literal> accordingly.</para>
+ <para>For persistence, HornetQ uses its own fast journal, which you can configure to use
+ libaio (which is the default when running on Linux) or Java NIO. In order to use the libaio
+ module on Linux, you'll need to install libaio, if it's not already installed.</para>
+ <para>If you're not running on Linux then you don't need to worry about this.</para>
+ <para>You can install libaio using the following steps as the root user:</para>
+ <para>Using yum, (e.g. on Fedora or Red Hat Enterprise Linux):</para>
+ <programlisting>yum install libaio</programlisting>
+ <para>Using aptitude, (e.g. on Ubuntu or Debian system):</para>
+ <programlisting>apt-get install libaio</programlisting>
+ </section>
+ <section id="installation.standalone">
+ <title>Stand-alone HornetQ Server</title>
+ <para>After downloading the distribution, unzip it into your chosen directory. At this point
+ it should be possible to <link linkend="running.standalone">run straight out of the
+ box</link>, the following describes the directory structure: </para>
+ <programlisting>
+ |___ bin
+ |
+ |___ config
+ | |___ jboss-as-4
+ | |___ jboss-as-5
+ | |___ stand-alone
+ |
+ |___ docs
+ | |___ api
+ | |___ quickstart-guide
+ | |___ user-manual
+ |
+ |___ examples
+ | |___ core
+ | |___ javaee
+ | |___ jms
+ |
+ |___ lib
+ |
+ |___ licenses
+ |
+ |___ schemas
+ </programlisting>
+ <itemizedlist>
+ <listitem>
+ <para><literal>bin</literal> -- binaries and scripts needed to run HornetQ.</para>
+ </listitem>
+ <listitem>
+ <para><literal>config</literal> -- configuration files needed to configure HornetQ. This
+ contains configurations to run HornetQ either in stand-alone or inside JBoss AS 4 and 5.
+ Please refer to the reference guide for details on configuration. </para>
+ </listitem>
+ <listitem>
+ <para><literal>docs</literal> -- guides and javadocs for HornetQ </para>
+ </listitem>
+ <listitem>
+ <para><literal>examples</literal> -- JMS and Java EE examples. Please refer to the
+ 'running examples' chapter for details on how to run them. </para>
+ </listitem>
+ <listitem>
+ <para><literal>lib</literal> -- jars and libraries needed to run HornetQ </para>
+ </listitem>
+ <listitem>
+ <para><literal>licenses</literal> -- licenses for HornetQ </para>
+ </listitem>
+ <listitem>
+ <para><literal>schemas</literal> -- XML Schemas used to validate HornetQ configuration
+ files</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="installation.jboss.as5">
+ <title>HornetQ In JBoss Application Server 5.x</title>
+ <para>HornetQ can also be deployed in <ulink url="http://www.jboss.org/jbossas/">JBoss AS
+ 5</ulink>. It is not currently shipped by default with the application server (it is
+ scheduled to be shipped as default JMS provider in JBoss Application Server 6.0), so you
+ will need to create new AS 5 profiles to run AS 5 with HornetQ.</para>
+ <para>To create AS 5 profiles:</para>
+ <orderedlist>
+ <listitem>
+ <para>Download JBoss AS 5</para>
+ </listitem>
+ <listitem>
+ <para>Set the environment property <literal>JBOSS_HOME</literal> to point to the
+ directory where you installed JBoss AS 5</para>
+ </listitem>
+ <listitem>
+ <para>run <literal>./build.sh</literal> (or <literal>build.bat</literal> if you are on
+ Windows) in HornetQ <literal>config/jboss-as-5</literal> directory</para>
+ </listitem>
+ </orderedlist>
+ <para>This will create 2 new profiles in <literal>$JBOSS_HOME/server</literal>:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>default-with-hornetq</literal> -- it corresponds to AS 5 <literal
+ >default</literal> profile with HornetQ as its JMS provider. In this profile,
+ HornetQ is <emphasis>non-clustered</emphasis></para>
+ </listitem>
+ <listitem>
+ <para><literal>all-with-hornetq</literal> -- it corresponds to AS 5 <literal
+ >all</literal> profile with HornetQ as its JMS provider. In this profile, HornetQ
+ is <emphasis>clustered</emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>You can then start JBoss AS 5 using one of these profiles, e.g. :</para>
+ <programlisting>$JBOSS_HOME/bin/run.sh -c default-with-hornetq</programlisting>
+ </section>
+ <section id="installation.jboss.as4">
+ <title>HornetQ In JBoss Application Server 4.x</title>
+ <para>As in AS 4, it is not shipped by default with the application server, so you will need
+ to create new AS 4 profiles to run AS 4 with HornetQ.</para>
+ <para>To create AS 4 profiles:</para>
+ <orderedlist>
+ <listitem>
+ <para>Download JBoss AS 4</para>
+ </listitem>
+ <listitem>
+ <para>Set the environment property <literal>JBOSS_HOME</literal> to point to the
+ directory where you installed JBoss AS 4</para>
+ </listitem>
+ <listitem>
+ <para>run <literal>./build.sh</literal> (or <literal>build.bat as4</literal> if you
+ are on Windows) in HornetQ <literal>config/jboss-as-4</literal>
+ directory</para>
+ </listitem>
+ </orderedlist>
+ <para>This will create 2 new profiles in <literal>$JBOSS_HOME/server</literal>:</para>
+ <itemizedlist>
+ <listitem>
+ <para><literal>default-with-hornetq</literal> -- it corresponds to AS 4 <literal
+ >default</literal> profile with HornetQ as its JMS provider. In this profile,
+ HornetQ is <emphasis>non-clustered</emphasis></para>
+ </listitem>
+ <listitem>
+ <para><literal>all-with-hornetq</literal> -- it corresponds to AS 4 <literal
+ >all</literal> profile with HornetQ as its JMS provider. In this profile, HornetQ
+ is <emphasis>clustered</emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>You can then start JBoss AS 4 using one of these profiles:</para>
+ <programlisting>$JBOSS_HOME/bin/run.sh -c default-with-hornetq</programlisting>
+ </section>
+</chapter>
Added: branches/HnetQ_323_cn/docs/quickstart-guide/zh/introduction.xml
===================================================================
--- branches/HnetQ_323_cn/docs/quickstart-guide/zh/introduction.xml (rev 0)
+++ branches/HnetQ_323_cn/docs/quickstart-guide/zh/introduction.xml 2010-05-10 06:09:57 UTC (rev 9214)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ============================================================================= -->
+<!-- Copyright © 2009 Red Hat, Inc. and others. -->
+<!-- -->
+<!-- The text of and illustrations in this document are licensed by Red Hat under -->
+<!-- a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). -->
+<!-- -->
+<!-- An explanation of CC-BY-SA is available at -->
+<!-- -->
+<!-- http://creativecommons.org/licenses/by-sa/3.0/. -->
+<!-- -->
+<!-- In accordance with CC-BY-SA, if you distribute this document or an adaptation -->
+<!-- of it, you must provide the URL for the original version. -->
+<!-- -->
+<!-- Red Hat, as the licensor of this document, waives the right to enforce, -->
+<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
+<!-- permitted by applicable law. -->
+<!-- ============================================================================= -->
+<chapter id="introduction">
+ <title>Getting Started</title>
+ <para>This short guide explains how to download, install and quickly get started with
+ HornetQ.</para>
+ <para>After downloading and installing we highly recommend you run the examples to get
+ acquainted with HornetQ. We ship with over 70 examples demonstrating most of the
+ features.</para>
+ <para>This guide is not intended to be a replacement for the user manual. The user manual goes
+ into much more depth, so please consult that for further information.</para>
+</chapter>
Added: branches/HnetQ_323_cn/docs/quickstart-guide/zh/master.xml
===================================================================
--- branches/HnetQ_323_cn/docs/quickstart-guide/zh/master.xml (rev 0)
+++ branches/HnetQ_323_cn/docs/quickstart-guide/zh/master.xml 2010-05-10 06:09:57 UTC (rev 9214)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ============================================================================= -->
+<!-- Copyright © 2009 Red Hat, Inc. and others. -->
+<!-- -->
+<!-- The text of and illustrations in this document are licensed by Red Hat under -->
+<!-- a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). -->
+<!-- -->
+<!-- An explanation of CC-BY-SA is available at -->
+<!-- -->
+<!-- http://creativecommons.org/licenses/by-sa/3.0/. -->
+<!-- -->
+<!-- In accordance with CC-BY-SA, if you distribute this document or an adaptation -->
+<!-- of it, you must provide the URL for the original version. -->
+<!-- -->
+<!-- Red Hat, as the licensor of this document, waives the right to enforce, -->
+<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
+<!-- permitted by applicable law. -->
+<!-- ============================================================================= -->
+
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+ "../../../lib/docbook-support/support/docbook-dtd/docbookx.dtd" [
+ <!ENTITY about SYSTEM "about.xml">
+ <!ENTITY download SYSTEM "download.xml">
+ <!ENTITY examples SYSTEM "examples.xml">
+ <!ENTITY installation SYSTEM "installation.xml">
+ <!ENTITY introduction SYSTEM "introduction.xml">
+ <!ENTITY notice SYSTEM "notice.xml">
+ <!ENTITY running SYSTEM "running.xml">
+ ]>
+<book lang="en">
+ <bookinfo>
+ <title>HornetQ Quickstart Guide</title>
+ <subtitle>Putting the buzz in messaging</subtitle>
+ </bookinfo>
+
+ <toc></toc>
+
+ ¬ice;
+ &about;
+ &introduction;
+ &download;
+ &installation;
+ &running;
+ &examples;
+</book>
Added: branches/HnetQ_323_cn/docs/quickstart-guide/zh/notice.xml
===================================================================
--- branches/HnetQ_323_cn/docs/quickstart-guide/zh/notice.xml (rev 0)
+++ branches/HnetQ_323_cn/docs/quickstart-guide/zh/notice.xml 2010-05-10 06:09:57 UTC (rev 9214)
@@ -0,0 +1,32 @@
+<!-- ============================================================================= -->
+<!-- Copyright © 2009 Red Hat, Inc. and others. -->
+<!-- -->
+<!-- The text of and illustrations in this document are licensed by Red Hat under -->
+<!-- a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). -->
+<!-- -->
+<!-- An explanation of CC-BY-SA is available at -->
+<!-- -->
+<!-- http://creativecommons.org/licenses/by-sa/3.0/. -->
+<!-- -->
+<!-- In accordance with CC-BY-SA, if you distribute this document or an adaptation -->
+<!-- of it, you must provide the URL for the original version. -->
+<!-- -->
+<!-- Red Hat, as the licensor of this document, waives the right to enforce, -->
+<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
+<!-- permitted by applicable law. -->
+<!-- ============================================================================= -->
+
+<chapter id="notice">
+ <title>Legal Notice</title>
+
+ <para>Copyright © 2010 Red Hat, Inc. and others.</para>
+ <para>The text of and illustrations in this document are licensed by Red Hat under
+ a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA").</para>
+ <para>An explanation of CC-BY-SA is available at
+ <ulink url="http://creativecommons.org/licenses/by-sa/3.0/">http://creativecommons.org/licenses/by-sa/3.0/</ulink>.
+ In accordance with CC-BY-SA, if you distribute this document or an adaptation
+ of it, you must provide the URL for the original version.</para>
+ <para>Red Hat, as the licensor of this document, waives the right to enforce,
+ and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent
+ permitted by applicable law.</para>
+</chapter>
\ No newline at end of file
Added: branches/HnetQ_323_cn/docs/quickstart-guide/zh/running.xml
===================================================================
--- branches/HnetQ_323_cn/docs/quickstart-guide/zh/running.xml (rev 0)
+++ branches/HnetQ_323_cn/docs/quickstart-guide/zh/running.xml 2010-05-10 06:09:57 UTC (rev 9214)
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ============================================================================= -->
+<!-- Copyright © 2009 Red Hat, Inc. and others. -->
+<!-- -->
+<!-- The text of and illustrations in this document are licensed by Red Hat under -->
+<!-- a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). -->
+<!-- -->
+<!-- An explanation of CC-BY-SA is available at -->
+<!-- -->
+<!-- http://creativecommons.org/licenses/by-sa/3.0/. -->
+<!-- -->
+<!-- In accordance with CC-BY-SA, if you distribute this document or an adaptation -->
+<!-- of it, you must provide the URL for the original version. -->
+<!-- -->
+<!-- Red Hat, as the licensor of this document, waives the right to enforce, -->
+<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
+<!-- permitted by applicable law. -->
+<!-- ============================================================================= -->
+<chapter id="running">
+ <title>Starting The Server</title>
+ <section id="running.standalone">
+ <title>Standalone HornetQ</title>
+ <para>To run a stand-alone server, open up a shell or command prompt and navigate into the
+ <literal>bin</literal> directory. Then execute <literal>./run.sh</literal> (or <literal
+ >run.bat</literal> on Windows) and you should see the following output </para>
+ <programlisting>
+ bin$ ./run.sh
+
+ 15:05:54,108 INFO @main [HornetQBootstrapServer] Starting HornetQ server
+ ...
+ 15:06:02,566 INFO @main [HornetQServerImpl] HornetQ Server version
+ 2.0.0.CR3 (yellowjacket, 111) started
+ </programlisting>
+ <para>HornetQ is now running.</para>
+ <para>Both the run and the stop scripts use the config under <literal
+ >config/stand-alone/non-clustered</literal> by default. The configuration can be changed
+ by running <literal>./run.sh ../config/stand-alone/clustered</literal> or another config of
+ your choosing. This is the same for the stop script and the windows bat files.</para>
+ </section>
+ <section id="running.jboss.as5">
+ <title>HornetQ In JBoss AS 5.x</title>
+ <para>To run HornetQ in JBoss AS 5, you need to create the <link
+ linkend="installation.jboss.as5">AS 5 profiles for HornetQ</link> first. Then run JBoss
+ AS 5 with one these profiles. For example, to run JBoss AS 5 with a
+ <emphasis>non-clustered</emphasis> HornetQ server, got to <literal
+ >$JBOSS_HOME/bin</literal> directory and type:</para>
+ <programlisting>
+ bin$ ./run.sh -c default-with-hornetq
+
+ 15:18:35,460 INFO [ServerImpl] Starting JBoss (Microcontainer)...
+ 15:18:35,462 INFO [ServerImpl] Release ID: JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=
+ JBoss_5_1_0_GA date=200905221053)
+ ...
+ 15:19:30,305 INFO [HornetQServerImpl] HornetQ Server version
+ 2.0.0.CR3 (yellowjacket, 111) started
+ ...
+ 15:19:43,601 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=
+ JBoss_5_1_0_GA date=200905221053)]Started in 1m:14s:556ms
+ </programlisting>
+ </section>
+ <section id="running.jboss.as4">
+ <title>HornetQ In JBoss AS 4.x</title>
+ <para>To run HornetQ in JBoss AS 4 you must follow the same steps described for AS5 without
+ forgetting to create the <link linkend="installation.jboss.as4">AS 4 profiles for
+ HornetQ</link> first. </para>
+ </section>
+ <section id="running.jboss.as6">
+ <title>HornetQ In JBoss AS 6.0</title>
+ <para>From JBoss AS 6.0 M3 onwards, HornetQ is the default (built-in) JMS provider in JBoss AS, so there's no need to install it - it's already there.</para>
+ </section>
+</chapter>
14 years, 10 months
JBoss hornetq SVN: r9213 - branches/HnetQ_323_cn/docs/user-manual/zh.
by do-not-reply@jboss.org
Author: gaohoward
Date: 2010-05-10 02:03:20 -0400 (Mon, 10 May 2010)
New Revision: 9213
Modified:
branches/HnetQ_323_cn/docs/user-manual/zh/paging.xml
branches/HnetQ_323_cn/docs/user-manual/zh/perf-tuning.xml
branches/HnetQ_323_cn/docs/user-manual/zh/persistence.xml
branches/HnetQ_323_cn/docs/user-manual/zh/preface.xml
branches/HnetQ_323_cn/docs/user-manual/zh/scheduled-messages.xml
branches/HnetQ_323_cn/docs/user-manual/zh/security.xml
branches/HnetQ_323_cn/docs/user-manual/zh/using-server.xml
branches/HnetQ_323_cn/docs/user-manual/zh/wildcard-routing.xml
branches/HnetQ_323_cn/docs/user-manual/zh/wildcard-syntax.xml
Log:
sync doc
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/paging.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/paging.xml 2010-05-08 16:31:59 UTC (rev 9212)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/paging.xml 2010-05-10 06:03:20 UTC (rev 9213)
@@ -70,10 +70,13 @@
</table>
</para>
</section>
-
<section id="paging.mode">
<title>分页转存模式</title>
<para>一个地址只要消息的数量超过定义的值,它就转到分页转存的模式。</para>
+ <note>
+ <para>分页转存是针对每个地址设置的。如果你为一个地址配置了一个max-size-bytes,那么每个匹配的地址
+ 都有一个最大值的限制。但是这并不表示所有匹配的地址的大小总和受这个参数的限制。</para>
+ </note>
<section>
<title>配置</title>
<para>有关分页转存的配置在主要配置文件(<literal>hornetq-configuration.xml</literal>)
@@ -113,7 +116,7 @@
<entry>10MiB (10 * 1024 * 1024 字节)</entry>
</row>
<row>
- <entry><literal>address-full-message-policy</literal></entry>
+ <entry><literal>address-full-policy</literal></entry>
<entry>要使用分页转存,这个参数必须设为PAGE。PAGE表示多余的消息会被保存到磁盘。
如果设为DROP,那么多余的消息将会被丢弃。如果设为BLOCK,当消息占满设定的最大
内存时,在客户端消息的发送者将被阻塞,不能向服务器发送更多的消息。</entry>
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/perf-tuning.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/perf-tuning.xml 2010-05-08 16:31:59 UTC (rev 9212)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/perf-tuning.xml 2010-05-10 06:03:20 UTC (rev 9213)
@@ -123,6 +123,9 @@
消息发送时不阻塞等待服务器的响应。参见 <xref linkend="send-guarantees"/>。</para>
</listitem>
<listitem>
+ <para>如果你的接收者速度很快,你可以增加consumer-window-size。这样实际上就关闭了流控制的功能。</para>
+ </listitem>
+ <listitem>
<para>套接字NIO与旧的IO对比。默认情况下HornetQ在服务器端使用套接字NIO技术,而在客户端则使用旧的(阻塞)
IO(参见传输配置一章<xref linkend="configuring-transports"/>)。NIO比旧的阻塞式IO有更
强的可扩展性,但是也会带来一些延时。如果你的服务器要同时有数千个连接,使用NIO效果比较好。但是如果
@@ -141,13 +144,6 @@
<title>传输层的优化</title>
<itemizedlist>
<listitem>
- <para>使用<ulink url="http://en.wikipedia.org/wiki/Nagle's_algorithm">Nagle's
- 算法</ulink>。如果发送的是许多小的消息,多个消息可以在一个IP包中发送,因此性能可以提高。
- 这需要将Netty传输中的<literal>tcp-no-delay</literal>设为false。参见
- <xref linkend="configuring-transports"/>中的详细说明。</para>
- <para>采用Nagle算法可以显著提高性能,如果应用程序有很多异步的发送,强烈推荐使用它。</para>
- </listitem>
- <listitem>
<para>TCP缓存大小。如果你的网络速度很快,并且你的主机也很快,你可以通过增加TCP的发送和接收缓存
来提高性能。参见<xref linkend="configuring-transports"/>中的详细说明。
</para>
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/persistence.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/persistence.xml 2010-05-08 16:31:59 UTC (rev 9212)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/persistence.xml 2010-05-10 06:03:20 UTC (rev 9213)
@@ -38,7 +38,7 @@
<itemizedlist>
<listitem>
<para>Java <ulink url="http://en.wikipedia.org/wiki/New_I/O">NIO</ulink>。</para>
- <para>第一种采用的是标准的Java NIO接口来进行文件的操作。它可以在任何安装有Java 1.5或以上的系统中运行。
+ <para>第一种采用的是标准的Java NIO接口来进行文件的操作。它可以在任何安装有Java 1.6或以上的系统中运行。
NIO的性能是很高的。</para>
</listitem>
<listitem id="aio-journal">
@@ -49,6 +49,8 @@
<para>使用AIO通常可以有比NIO更高的性能。</para>
<para>采用AIO的日志只能在运行 Linux kernel 2.6 或以上版本的内核的系统中才有。另外你需要安装libaio。
有关如何安装libaio请参见 <xref linkend="installing-aio"/>。</para>
+ <para>另外请注意AIO只在以下文件系统上能正确工作:ext2, ext3, ext4, jfs, xfs。其他文件系统如NFS,虽然
+ AIO看上去可以工作,实际上是以较慢的同步的方式在运行。所以不要在NFS上使用日志。</para>
<para>有关libaio的更多介绍参见 <xref linkend="libaio"/>。</para>
<para>libaio是Linux内核项目的一部分。</para>
</listitem>
@@ -61,6 +63,12 @@
<para>绑定日志是一个NIO型日志。与消息日志相比它的呑吐量是比较低的。</para>
</listitem>
<listitem>
+ <para>JMS日志</para>
+ <para>这个日志保存所有JMS相关的数据,包括JMS队列,话题及连接工厂,以及它们的JNDI绑定信息。</para>
+ <para>通过管理接口创建的JMS资源将被保存在这个日志中。但是通过配置文件配置的资源则不保存。只有使用JMS时JMS的日志
+ 才被创建。</para>
+ </listitem>
+ <listitem>
<para>消息日志</para>
<para>这个日志用来存贮所有消息相关的数据,包括消息本身和重复ID缓存。</para>
<para>默认情况下HornetQ总是优先使用AIO型日志。如果AIO型日志不可用(比如在非Linux平台上运行,或系统内核版本不同)
@@ -86,6 +94,10 @@
</listitem>
</itemizedlist>
</section>
+ <section id="configuring.bindings.jms">
+ <title>配置JMS日志</title>
+ <para>JMS日志的配置与绑定日志共用配置。</para>
+ </section>
<section id="configuring.message.journal">
<title>配置消息日志</title>
<para>消息日志的配置在<literal
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/preface.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/preface.xml 2010-05-08 16:31:59 UTC (rev 9212)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/preface.xml 2010-05-10 06:03:20 UTC (rev 9213)
@@ -40,7 +40,7 @@
<para>HornetQ的设计强调可用性。</para>
</listitem>
<listitem>
- <para>采用Java语言编写。可以在任何Java 5+ 的平台上运行。这几乎包括了从Windows到IBM mainframes的每个平台。</para>
+ <para>采用Java语言编写。可以在任何Java 6+ 的平台上运行。这几乎包括了从Windows到IBM mainframes的每个平台。</para>
</listitem>
<listitem>
<para>性能出众。不但对非持久化消息的处理性能达到了非常高的性能。独特高效的日志(journal)使持久消息处理接近非持久消息的性能。</para>
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/scheduled-messages.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/scheduled-messages.xml 2010-05-08 16:31:59 UTC (rev 9212)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/scheduled-messages.xml 2010-05-10 06:03:20 UTC (rev 9213)
@@ -25,7 +25,7 @@
<para>用来标识一个定期消息的参数是<literal
>"_HQ_SCHED_DELIVERY"</literal> (相当于常量<literal
>Message.HDR_SCHEDULED_DELIVERY_TIME</literal>)。</para>
- <para>这个参数的值必须是一个长整型,单位是毫秒。下面例子给出了使用JMS接口创建定期消息的方法:</para>
+ <para>这个参数的值必须是一个大于零的长整型,单位是毫秒。下面例子给出了使用JMS接口创建定期消息的方法:</para>
<programlisting>
TextMessage message =
session.createTextMessage("This is a scheduled message message which will be delivered
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/security.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/security.xml 2010-05-08 16:31:59 UTC (rev 9212)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/security.xml 2010-05-10 06:03:20 UTC (rev 9213)
@@ -39,10 +39,10 @@
<para><literal>deleteDurableQueue</literal>。允许用户在相应的地址上删除相应的持久的队列。</para>
</listitem>
<listitem>
- <para><literal>createTempQueue</literal>。允许用户在相应地址上创建临时队列。</para>
+ <para><literal>createNonDurableQueue</literal>。允许用户在相应地址上创建非持久的队列。</para>
</listitem>
<listitem>
- <para><literal>deleteTempQueue</literal>。允许用户在相应地址上删除临时队列。</para>
+ <para><literal>deleteNonDurableQueue</literal>。允许用户在相应地址上删除非持久队列。</para>
</listitem>
<listitem>
<para><literal>send</literal>。允许用户向相应地址发送消息。</para>
@@ -61,8 +61,8 @@
<security-setting match="globalqueues.europe.#">
<permission type="createDurableQueue" roles="admin"/>
<permission type="deleteDurableQueue" roles="admin"/>
- <permission type="createTempQueue" roles="admin, guest, europe-users"/>
- <permission type="deleteTempQueue" roles="admin, guest, europe-users"/>
+ <permission type="createNonDurableQueue" roles="admin, guest, europe-users"/>
+ <permission type="deleteNonDurableQueue" roles="admin, guest, europe-users"/>
<permission type="send" roles="admin, europe-users"/>
<permission type="consume" roles="admin, europe-users"/>
</security-setting>
@@ -94,8 +94,8 @@
能被采用。即角色europe-users有<literal
>send</literal>和<literal>consume</literal>权限。权限
<literal>createDurableQueue</literal>、 <literal
- >deleteDurableQueue</literal>、<literal>createTempQueue</literal>、<literal
- >deleteTempQueue</literal>不会从先前的设置中继承。</para>
+ >deleteDurableQueue</literal>、<literal>createNonDurableQueue</literal>、<literal
+ >deleteNonDurableQueue</literal>不会从先前的设置中继承。</para>
<para>由于权限的不可继承,如果我们不在更具体的security-setting设置中给出一个权限,这个权限就是没有的,不会因为继承而带来
麻烦。否则就不可能对一组地址中的部分地址进行如此的设置。</para>
</section>
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/using-server.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/using-server.xml 2010-05-08 16:31:59 UTC (rev 9212)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/using-server.xml 2010-05-10 06:03:20 UTC (rev 9213)
@@ -31,7 +31,7 @@
它被用来部署HornetQ的POJO对象。</para>
<para>要停止服务,运行其中的相应脚本:在Unix/Linux环境下,运行 <literal>stop.sh</literal>。
在Windows环境,运行 <literal>run.bat</literal>。</para>
- <para>注意HornetQ需要在Java 5及以上版本才能正常运行。我们建议使用Java 6。</para>
+ <para>注意HornetQ需要在Java 6及以上版本才能正常运行。</para>
<para>启动和停止脚本在默认条件下读取<literal>config/stand-alone/non-clustered</literal>目录下的配置文件。
如果要指向其他目录,可以在命令行实现,例如: <literal>./run.sh ../config/stand-alone/clustered</literal>。
这一方法同样适用于Windows批处理文件。</para>
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/wildcard-routing.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/wildcard-routing.xml 2010-05-08 16:31:59 UTC (rev 9212)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/wildcard-routing.xml 2010-05-10 06:03:20 UTC (rev 9213)
@@ -21,7 +21,7 @@
<chapter id="wildcard-routing">
<title>使用通配符实现消息路由</title>
<para>HornetQ支持使用带通配符的地址对消息路由。</para>
- <para>例如,当创建一个接收者(consumer)时使用了地址<literal>queue.news.#</literal>,那么它就能接收
+ <para>例如,当创建一个队列时使用了地址<literal>queue.news.#</literal>,那么它就能接收
所有和这个地址通配符相配的每一个地址的消息。这样的地址如 <literal
>queue.news.europe</literal> 或 <literal>queue.news.usa</literal> 或 <literal
>queue.news.usa.sport</literal>等。这样一个消息接收者可以接收<literal>一组</literal>相关
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/wildcard-syntax.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/wildcard-syntax.xml 2010-05-08 16:31:59 UTC (rev 9212)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/wildcard-syntax.xml 2010-05-10 06:03:20 UTC (rev 9213)
@@ -21,7 +21,7 @@
<chapter id="wildcard-syntax">
<title>了解 HornetQ 通配符的语法</title>
<para>HornetQ使用了一种专门的通配符语法来配置安全、地址及接收者(consumer)的创建。</para>
- <para>这种语法与 <ulink url="www.amqp.org">AMQP</ulink>所用的语法相似。</para>
+ <para>这种语法与 <ulink url="http://www.amqp.org">AMQP</ulink>所用的语法相似。</para>
<para>一个HornetQ的通配符表达式是由一些由“<literal
>.</literal>”分隔的单词组成。</para>
<para>特殊字符“<literal>#</literal>”和“<literal>*</literal>”在表达式中可作为一个单词,它们代表
14 years, 10 months
JBoss hornetq SVN: r9212 - branches/HnetQ_323_cn/docs/user-manual/zh.
by do-not-reply@jboss.org
Author: gaohoward
Date: 2010-05-08 12:31:59 -0400 (Sat, 08 May 2010)
New Revision: 9212
Modified:
branches/HnetQ_323_cn/docs/user-manual/zh/message-expiry.xml
Log:
sync doc
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/message-expiry.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/message-expiry.xml 2010-05-08 16:24:48 UTC (rev 9211)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/message-expiry.xml 2010-05-08 16:31:59 UTC (rev 9212)
@@ -66,7 +66,7 @@
<itemizedlist>
<listitem>
<para><literal>message-expiry-scan-period</literal></para>
- <para>过期消息的扫描间隔(单位毫秒,默认为30000ms)。</para>
+ <para>过期消息的扫描间隔(单位毫秒,默认为30000ms)。如要关闭扫描,将其设为<literal>-1</literal>。</para>
</listitem>
<listitem>
<para><literal>message-expiry-thread-priority</literal></para>
14 years, 10 months
JBoss hornetq SVN: r9211 - branches/HnetQ_323_cn/docs/user-manual/zh.
by do-not-reply@jboss.org
Author: gaohoward
Date: 2010-05-08 12:24:48 -0400 (Sat, 08 May 2010)
New Revision: 9211
Modified:
branches/HnetQ_323_cn/docs/user-manual/zh/management.xml
Log:
sync doc
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/management.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/management.xml 2010-05-08 11:07:45 UTC (rev 9210)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/management.xml 2010-05-08 16:24:48 UTC (rev 9211)
@@ -773,30 +773,22 @@
<graphic fileref="images/console1.png" align="center"/>
</para>
<para>name和JNDI name是不能改变的。如果你想改变它们,必须重新创建队列。其它选项是关于地址设置与安全设置。
-The default address settings are picked up from the servers configuration, if you change any of these
- settings or create a queue via the console a new Address Settings enrty will be added. For a full explanation on
- Address Settings see <xref linkend="queue-attributes.address-settings"/></para>
- <para>To delete a queue simply click on the delete button beside the queue name in the main JMS Queues screen.
- This will also delete any address settings or security settings previously created for the queues address</para>
- <para>The last part of the configuration options are security roles. If non are provided on creation then the
- servers default security settings will be shown. If these are changed or updated then new securty settings are
- created for the address of this queue. For more information on securuty setting see <xref linkend="security"/> </para>
- <para>It is also possible via the metrics tab to view statistics for this queue. This will show statistics such
- as message count, consumer count etc.</para>
- <para>Operations can be performed on a queue via the control tab. This will allow you to start and stop the queue,
- list,move,expire and delete messages from the queue and other useful operations. To invoke an operation click on
- the button for the operation you want, this will take you to a screen where you can parameters for the opertion can be set.
- Once set clicking the ok button will invoke the operation, results appear at the bottom of the screen.</para>
+ 默认的地址设置来自于服务器的配置。如果你通过console修改或创建一个队列,那么就会增加一条新的地址设置。有关
+ 地址设置的完整说明参见<xref linkend="queue-attributes.address-settings"/>。</para>
+ <para>要删除一个队列,只要点击队列名称旁边的“delete“按钮即可。与此队列相关的任何地址设置或安全设置也将被删除。</para>
+ <para>配置的最后一部分是安全角色。如果在创建时没有给出则默认的安全设置将会显示在屏幕上。如果它们被修改并更新则队列的安全设置
+ 将被更新。关于安全设置参见<xref linkend="security"/>。 </para>
+ <para>在console中还有一个metrics标签页,它显示了队列的各项统计数据,如消息计数,接收者计数等。</para>
+ <para>在control标签页中可以对队列进行各种操作,比如启动和停止队列,对队列中的消息进行列表,移动,变为过期,删除等。
+ 要进行一项操作只要点击相应的按钮,然后在出现的提示中输入相应的参数,再点击ok按钮即可。操作的結果会显示在屏幕的底部。</para>
</section>
<section>
- <title>JMS Topics</title>
- <para>Creating and configuring JMS Topics is almost identical to creating queues. The only difference is that the
- configuration will be applied to the queue representing a subscription.</para>
+ <title>JMS话题</title>
+ <para>创建及配置JMS话题几乎与队列的操作是一样的。唯一不同的是这些配置应用于一个代表订阅的队列。</para>
</section>
<section>
- <title>JMS Connection Factories</title>
- <para>The format for creating connection factories is the same as for JMS Queues and topics apart frm the configuration
- being different. For as list of all the connection factory settings see the configuration index </para>
+ <title>JMS连接工厂</title>
+ <para>JMS连接工厂的创建的操作过程与上述队列或话题的操作一致,只是配置具体的参数不同而已。关于连接工厂的参数参见配置索引。</para>
</section>
</section>
</chapter>
14 years, 10 months
JBoss hornetq SVN: r9210 - branches/HnetQ_323_cn/docs/user-manual/zh.
by do-not-reply@jboss.org
Author: gaohoward
Date: 2010-05-08 07:07:45 -0400 (Sat, 08 May 2010)
New Revision: 9210
Modified:
branches/HnetQ_323_cn/docs/user-manual/zh/client-classpath.xml
branches/HnetQ_323_cn/docs/user-manual/zh/client-reconnection.xml
branches/HnetQ_323_cn/docs/user-manual/zh/clusters.xml
branches/HnetQ_323_cn/docs/user-manual/zh/configuring-transports.xml
branches/HnetQ_323_cn/docs/user-manual/zh/examples.xml
branches/HnetQ_323_cn/docs/user-manual/zh/flow-control.xml
branches/HnetQ_323_cn/docs/user-manual/zh/ha.xml
branches/HnetQ_323_cn/docs/user-manual/zh/interoperability.xml
branches/HnetQ_323_cn/docs/user-manual/zh/management.xml
Log:
sync doc
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/client-classpath.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/client-classpath.xml 2010-05-08 09:04:14 UTC (rev 9209)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/client-classpath.xml 2010-05-08 11:07:45 UTC (rev 9210)
@@ -27,7 +27,7 @@
<section>
<title>使用HornetQ内核的客户端</title>
<para>如果客户端只使用HornetQ内核(非JMS客户端),需要将 <literal
- >hornetq-core-client.jar</literal>、 <literal>hornetq-transports.jar</literal> 和
+ >hornetq-core-client.jar</literal>和
<literal>netty.jar</literal> 放到classpath中。</para>
</section>
<section>
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/client-reconnection.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/client-reconnection.xml 2010-05-08 09:04:14 UTC (rev 9209)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/client-reconnection.xml 2010-05-08 11:07:45 UTC (rev 9210)
@@ -38,9 +38,9 @@
>confirmation-window-size</literal>项。如果你并不将JMS连接工厂注册到JNDI,则你需要在
<literal>HornetQConnectionFactory</literal>上使用相应的方法直接设置该参数。</para>
<para>如果使用核心服务,你可以直接在<literal>ClientSessionFactory</literal>实例上直接设置该参数。</para>
- <para>参数的单位是字节,默认值是<literal>1MiB</literal>。</para>
+ <para>参数的单位是字节。</para>
<para>如果该参数是值设为<literal>-1</literal>,则关闭缓存,即关闭了重新恢复功能,迫使进行重新连接。默认
- 值是<literal>-1</literal>。</para>
+ 值是<literal>-1</literal>(表示没有自动恢复)。</para>
</section>
<section>
<title>会话重新连接</title>
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/clusters.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/clusters.xml 2010-05-08 09:04:14 UTC (rev 9209)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/clusters.xml 2010-05-08 11:07:45 UTC (rev 9210)
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<!-- ============================================================================= -->
<!-- Copyright © 2009 Red Hat, Inc. and others. -->
<!-- -->
@@ -17,7 +16,6 @@
<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
<!-- permitted by applicable law. -->
<!-- ============================================================================= -->
-
<chapter id="clusters">
<title>集群</title>
<section>
@@ -65,10 +63,11 @@
<para>让我们来看一个<literal>hornetq-configuration.xml</literal>文件中广播组的例子:</para>
<programlisting><broadcast-groups>
<broadcast-group name="my-broadcast-group">
+ <local-bind-address>172.16.9.3</local-bind-address>
<local-bind-port>54321</local-bind-port>
<group-address>231.7.7.7</group-address>
<group-port>9876</group-port>
- <broadcast-period>1000</broadcast-period>
+ <broadcast-period>2000</broadcast-period>
<connector-ref connector-name="netty-connector"
backup-connector="backup-connector"/>
</broadcast-group>
@@ -86,7 +85,8 @@
</listitem>
<listitem>
<para><literal>local-bind-port</literal>。这个参数指定了套接字的本地绑定端口。通常情况下
- 可以使用其默认值<literal>-1</literal>,表示使用随机的端口。</para>
+ 可以使用其默认值<literal>-1</literal>,表示使用随机的端口。这个参数总是和
+ <literal>local-bind-address</literal>一起定义。</para>
</listitem>
<listitem>
<para><literal>group-address</literal>。这个参数指定的是广播地址。它是一个D类的IP地址,
@@ -131,6 +131,7 @@
在<literal>discovery-groups</literal>内定义。发现组可以定义多个。请看下面的例子:</para>
<programlisting><discovery-groups>
<discovery-group name="my-discovery-group">
+ <local-bind-address>172.16.9.7</local-bind-address>
<group-address>231.7.7.7</group-address>
<group-port>9876</group-port>
<refresh-timeout>10000</refresh-timeout>
@@ -142,6 +143,10 @@
<para><literal>name</literal>属性。每个发现组都必须有一个唯一的名字。</para>
</listitem>
<listitem>
+ <para><literal>local-bind-address</literal>。如果你的主机有多个网络接口,你可能希望发现组只监听一个指定的
+ 网络接口。这个参数就可以用于这个目的。它是一个可选参数。</para>
+ </listitem>
+ <listitem>
<para><literal>group-address</literal>。需要监听的广播地址。它需要与广播组的
<literal>group-address</literal>一致才可以收到广播组的信息。这是一个必要参数。</para>
</listitem>
@@ -188,10 +193,10 @@
Connection jmsConnection2 = jmsConnectionFactory.createConnection();</programlisting></para>
<para><literal>refresh-timeout</literal>参数可以直接在连接工厂上使用
<literal>setDiscoveryRefreshTimeout()</literal>方法设置。</literal></para>
- <para>连接工厂还有一个方法<literal>setInitialWaitTimeout()</literal>。它可以设置连接工厂的
+ <para>连接工厂还有一个方法<literal>setDiscoveryInitialWaitTimeout()</literal>。它可以设置连接工厂的
初始等待时间。当一个连接工厂被创建后立即进行用于创建连接的话,连接工厂可能没有足够的时间来接收各
个服务器发出的广播信息,也就无法建立完整的服务器列表。有了这个参数,连接工厂会在首次创建连接时
- 等待一定的时间,以接收广播。默认值是<literal>2000</literal>毫秒。</para>
+ 等待一定的时间,以接收广播。默认值是<literal>10000</literal>毫秒。</para>
</section>
<section>
<title>使用核心API的客户端的配置</title>
@@ -208,10 +213,10 @@
</para>
<para>方法<literal>setDiscoveryRefreshTimeout()</literal>可以用来直接设置参数
<literal>refresh-timeout</literal>。</para>
- <para>会话工厂还有一个方法<literal>setInitialWaitTimeout()</literal>。它可以设置会话工厂的
+ <para>会话工厂还有一个方法<literal>setDiscoveryInitialWaitTimeout()</literal>。它可以设置会话工厂的
初始等待时间。当一个会话工厂被创建后立即进行用于创建连接的话,该会话工厂可能没有足够的时间来接收各
个服务器发出的广播信息,也就无法建立完整的服务器列表。有了这个参数,会话工厂会在首次创建连接时
- 等待一定的时间,以接收广播。默认值是<literal>2000</literal>毫秒。</para>
+ 等待一定的时间,以接收广播。默认值是<literal>10000</literal>毫秒。</para>
</section>
</section>
</section>
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/configuring-transports.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/configuring-transports.xml 2010-05-08 09:04:14 UTC (rev 9209)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/configuring-transports.xml 2010-05-08 11:07:45 UTC (rev 9210)
@@ -28,7 +28,7 @@
<acceptors>
<acceptor name="netty">
<factory-class>
-org.hornetq.integration.transports.netty.NettyAcceptorFactory
+org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory
</factory-class>
<param key="port" value="5446"/>
</acceptor>
@@ -46,7 +46,7 @@
中定义的是键-值对(key-value)。这些参数用来配置某个传输实现。不同传输有不同的配置参数。</para>
<para>像IP地址、端口号等都是传输配置参数的例子。</para>
</section>
- <section id="understanding.connectors">
+ <section id="configuring-transports.connectors">
<title>连接器(Connectors)</title>
<para>接收器定义的是如何在服务器端接收连接,而连接器则是定义客户端如何连接到服务器。</para>
<para>以下是<literal>hornetq-configuration.xml</literal>文件中一个连接器配置的例子。</para>
@@ -54,7 +54,7 @@
<connectors>
<connector name="netty">
<factory-class>
- org.hornetq.integration.transports.netty.NettyConnectorFactory
+ org.hornetq.core.remoting.impl.netty.NettyConnectorFactory
</factory-class>
<param key="port" value="5446"/>
</connector>
@@ -103,12 +103,12 @@
<programlisting>
Map<String, Object> connectionParams = new HashMap<String, Object>();
-connectionParams.put(org.hornetq.integration.transports.netty.TransportConstants.PORT_PROP_NAME,
+connectionParams.put(org.hornetq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME,
5446);
TransportConfiguration transportConfiguration =
new TransportConfiguration(
- "org.hornetq.integration.transports.netty.NettyConnectorFactory",
+ "org.hornetq.core.remoting.impl.netty.NettyConnectorFactory",
connectionParams);
ClientSessionFactory sessionFactory = HornetQClient.createClientSessionFactory(transportConfiguration);
@@ -122,11 +122,11 @@
<programlisting>
Map<String, Object> connectionParams = new HashMap<String, Object>();
-connectionParams.put(org.hornetq.integration.transports.netty.TransportConstants.PORT_PROP_NAME, 5446);
+connectionParams.put(org.hornetq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME, 5446);
TransportConfiguration transportConfiguration =
new TransportConfiguration(
- "org.hornetq.integration.transports.netty.NettyConnectorFactory",
+ "org.hornetq.core.remoting.impl.netty.NettyConnectorFactory",
connectionParams);
ConnectionFactory connectionFactory = HornetQJMSClient.createConnectionFactory(transportConfiguration);
@@ -151,7 +151,7 @@
<para>如果你的应用是运行在不信任的网络上,你应该选择使用SSL或HTTPS。</para>
<para>Netty TCP的所有连接都是从客户端发起的。服务器端不向客户端发起任何连接。在有防火墙的环境中,这种方式
是比较适合的。因为防火墙只允许单方向的连接。</para>
- <para>在<literal>org.hornetq.integration.transports.netty.TransportConstants</literal>类中定义了所
+ <para>在<literal>org.hornetq.core.remoting.impl.netty.TransportConstants</literal>类中定义了所
有的配置参数的名称(key)。它们既用于配置接收器以用于配置连接器。下面列出的参数用以配置一个简单的Netty TCP:</para>
<itemizedlist>
<listitem>
@@ -296,7 +296,7 @@
<acceptor name="netty-invm">
<factory-class>
- org.hornetq.integration.transports.netty.NettyAcceptorFactory
+ org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory
</factory-class>
<param key="use-invm" value="true"/>
<param key="host" value="org.hornetq"/>
@@ -311,7 +311,7 @@
<connector name="netty-servlet">
<factory-class>
- org.hornetq.integration.transports.netty.NettyConnectorFactory
+ org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory
</factory-class>
<param key="host" value="localhost"/>
<param key="port" value="8080"/>
@@ -332,7 +332,7 @@
<para>在<literal>web.xml</literal>中定义的servlet的URL形式与在连接器配置文件中定义的
<literal>servlet-path</literal>值应该相匹配。</para>
<para>servlet可以与SSL一起使用。只需要在连接器配置中加上下面的配置即可:<programlisting> <connector name="netty-servlet">
- <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="host" value="localhost"/>
<param key="port" value="8443"/>
<param key="use-servlet" value="true"/>
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/examples.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/examples.xml 2010-05-08 09:04:14 UTC (rev 9209)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/examples.xml 2010-05-08 11:07:45 UTC (rev 9210)
@@ -313,6 +313,11 @@
<para><literal>stomp</literal>例子展示了如何配置HornetQ来发送与接收Stomp消息。</para>
</section>
<section>
+ <title>Stomp与Web Sockets</title>
+ <para><literal>stomp-websockets</literal>例子给出了如何配置一个HornetQ服务器直接从Web浏览器
+ 中(需要支持Web Socket)发送和接收Stomp消息。</para>
+ </section>
+ <section>
<title>对称型集群</title>
<para><literal>symmetric-cluster</literal>例子展示如何设置一个HornetQ的对称型集群。</para>
<para>HornetQ的集群配置是非常灵活的。你可以根据需要设置不同的集群结构。最常用的就是对称型的集群了。这是在应用
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/flow-control.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/flow-control.xml 2010-05-08 09:04:14 UTC (rev 9209)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/flow-control.xml 2010-05-08 11:07:45 UTC (rev 9210)
@@ -197,14 +197,14 @@
<address-settings>
<address-setting match="jms.queue.exampleQueue">
<max-size-bytes>100000</max-size-bytes>
- <address-full-policy>DROP</address-full-policy>
+ <address-full-policy>BLOCK</address-full-policy>
</address-setting>
</address-settings></programlisting>
<para>上面的例子将JMS队列"exampleQueue"的最大内存值设为
100000 字节并且阻塞发送者以防止消息量超过这个值。</para>
- <para>注意必须设置 <literal>DROP</literal>的策略才能打开限定发送者窗口控制。</para>
+ <para>注意必须设置 <literal>BLOCK</literal>的策略才能打开限定发送者窗口控制。</para>
<para>请注意默认的<literal>address-full-policy</literal> 是
- <literal>PAGE</literal>。请参阅分页转存(paging)的相关章节作进一步的了解。</para>
+ <literal>PAGE</literal>。请参阅分页转存(<xref linkend="paging" />)的相关章节作进一步的了解。</para>
</section>
</section>
<section>
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/ha.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/ha.xml 2010-05-08 09:04:14 UTC (rev 9209)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/ha.xml 2010-05-08 11:07:45 UTC (rev 9210)
@@ -60,7 +60,7 @@
<!-- 这个连接器用于连接备份服务喝咖啡 -->
<!-- 备份服务器在主机"192.168.0.11"上,端口"5445" -->
<connector name="backup-connector">
- <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="192.168.0.11"/>
<param key="port" value="5445"/>
</connector>
@@ -74,7 +74,7 @@
<acceptors>
<acceptor name="acceptor">
- <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="host" value="192.168.0.11"/>
<param key="port" value="5445"/>
</acceptor>
@@ -118,6 +118,10 @@
<programlisting>
<shared-store>true<shared-store>
</programlisting>
+ <para>此外,备份服务器必须显式地指定:</para>
+ <programlisting>
+ <backup>true</backup>
+ </programlisting>
<para>另外,需要将主服务器和备份服务器的日志文件位置指向<emphasis>同一个共享位置</emphasis>。
(参见<xref linkend="configuring.message.journal"/>)</para>
<para>如果客户端使用JMS自动失效备援,主服务器除了要配置一个连接器以连接到备份服务器外,还要在
@@ -166,7 +170,7 @@
<para>有时你需要在主服务器正常关机的情况下仍然进行失效备援。如果使用JMS,你需要将<literal
>HornetQConnectionFactory</literal>的<literal
>FailoverOnServerShutdown</literal>属性设为true,或者是在<literal
- >hornetq-jms.xml</literal>文件中进行相应的配置。如果使用的是核心接口,可以在创建
+ >hornetq-jms.xml</literal>(参数为failover-on-server-shutdown)文件中进行相应的配置。如果使用的是核心接口,可以在创建
<literal>ClientSessionFactoryImpl</literal>实例时将上述同名属性设置为true。
这个属性的默认值是false。这表示如果主服务器是正常关机,<emphasis>客户端将不会进行失效备援</emphasis>。</para>
<para>
@@ -178,6 +182,14 @@
设为true。</para>
</note>
</para>
+ <para>默认情况下至少创建了一个与主服务器的连接后失效备援才会发生。换句话说,如果客户端每一次创建与
+ 主服务器的连接失败,它会根据参数reconnection-attempts的设置进行连接重试,而不是进行失效备援。
+ 如果重试次数超过的该参数的值,则连接失败。</para>
+ <para>在有些情况下,你可能希望在初始连接失败和情况下自动连接到备份服务器,那么你可以直接在
+ <literal>ClientSessionFactoryImpl</literal>或<literal
+ >HornetQConnectionFactory</literal>上设置<literal>FailoverOnInitialConnection</literal>
+ 参数,或者在配置文件中设置<literal
+ >failover-on-initial-connection</literal>。默认的值是<literal>false</literal>。</para>
<para>有关事务性及非事务性JMS会话的自动失效备援的例子,请参见
<xref linkend="examples.transaction-failover"/>及<xref
linkend="examples.non-transaction-failover"/>。</para>
@@ -222,7 +234,8 @@
>javax.jms.TransactionRolledBackException</literal>异常(如果是JMS),或者是一
个<literal>HornetQException</literal>的异常,错误代码为<literal
>HornetQException.TRANSACTION_ROLLED_BACK</literal>(如果是核心接口)。</para>
- <para>客户端需要自行处理这些异常,进行必要的回滚处理。用户可以通过同一个会话重试该事务操作。</para>
+ <para>客户端需要自行处理这些异常,进行必要的回滚处理。注意这里不需要人工将会话进行回滚-此时它已经
+ 被回滚了。用户可以通过同一个会话重试该事务操作。</para>
<para>HornetQ发布包中包括了一个完整的例子来展示如何处理这种情况。参见
<xref linkend="examples.transaction-failover"/></para>
<para>如果是在提交过程中发生了失效备援,服务器将这个阻塞调用解除。这种情况下客户端很难确定在事故发生
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/interoperability.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/interoperability.xml 2010-05-08 09:04:14 UTC (rev 9209)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/interoperability.xml 2010-05-08 11:07:45 UTC (rev 9210)
@@ -30,8 +30,7 @@
其中的<literal>protocol</literal>参数值应设为<literal>stomp</literal>:</para>
<programlisting>
<acceptor name="stomp-acceptor">
- <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
- <param key="protocol" value="stomp"/>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class> <param key="protocol" value="stomp"/>
<param key="port" value="61613"/>
</acceptor>
</programlisting>
@@ -43,20 +42,6 @@
属性,它将被忽略)。</para>
</section>
</section>
- <section id="stompconnect">
- <title>StompConnect</title>
- <para><ulink url="http://stomp.codehaus.org/StompConnect">StompConnect</ulink>是一个Stomp代理服务器,
- 它可以将Stomp协议转换为标准的JMS接口调用。因此,通过StompConnect的作用HornetQ可以作为一个Stomp代理,
- 与任何一个Stomp客户端通迅。这些客户端可以由C、C++、C#及.net等语言实现。</para>
- <para>要运行StompConnect首先要启动HornetQ服务以及JNDI服务。</para>
- <para>Stomp需要<literal>jndi.properties</literal>文件要在classpath中。该文件
- 应有如下类似的内容:</para>
- <programlisting>java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces</programlisting>
- <para>要确保该文件与StompConnect的jar包以及HornetQ的jar文件都在classpath中。最后,运行
- <literal>java org.codehaus.stomp.jms.Main</literal>。</para>
- </section>
<section>
<title>Stomp目标与HornetQ的地址和队列的映射</title>
<para>Stomp客户端在消息发送和订阅中使用的是<emphasis>目标(destination)</emphasis>。目标名称是简单的字符串,对应的是服务
@@ -98,24 +83,53 @@
</section>
<section>
- <title>使用Stomp通过JMS发送和接收Stomp消息</title>
- <para>如果要通过JMS目标来传送Stomp消息,可以使用<literal>BytesMessage</literal>将Stomp的消息封装后进行传送。</para>
- <para>如果Stomp消息中含有UTF-8字符串,则可以用以下代码将其读入到JMS的BytesMessage:</para>
- <programlisting>
-BytesMessage message = (BytesMessage)consumer.receive();
-byte[] data = new byte[1024];
-int size = message.readBytes(data);
-String text = new String(data, 0, size, "UTF-8");
- </programlisting>
- <para>相反地,要将一个UTF-8字符串的消息发给Stomp客户端,可以作用以下代码:</para>
- <programlisting>
-String text = ...
-BytesMessage message = session.createBytesMessage();
-message.writeBytes(text.getBytes("UTF-8"));
-producer.send(message);
- </programlisting>
+ <title>使用JMS或核心接口发送和接收Stomp消息</title>
+ <para>Stomp基本上是一个基于文本的协议。为了使用更简单,我们的Stomp实现通过检查<literal>content-length</literal>的值
+ 来决定如何将一个Stomp消息映射成一个JMS消息或核心消息。
+ </para>
+ <para>如果在Stomp消息中有<literal>content-length</literal>头,它将被映射为一个JMS的
+ <emphasis>TextMessage</emphasis>,或者是一个核心消息,其消息体的缓存是一个SimpleString。</para>
+ <para>如果Stomp消息中没有<literal>content-length</literal>,则它被映射为一个JMS的
+ <emphasis>BytesMessage</emphasis>,或者是一个核心消息,其消息体缓存中是一个字节数组byte[]。</para>
+ <para>从一个JMS消息或核心消息映射为Stomp消息时遵从同样的逻辑。一个Stomp客户端可以通过检查
+ <literal>content-length</literal>来决定消息体的类型(UTF-8字符串或字节)。</para>
</section>
</section>
+ <section id="stomp.websockets">
+ <title>通过Web Sockets使用Stomp</title>
+ <para>HornetQ还支持通过<ulink url="http://dev.w3.org/html5/websockets/">Web Sockets</ulink>使用Stomp。任何支持
+ Web Socket的浏览器中可以利用HornetQ来发送和接收Stomp消息。</para>
+ <para>要使用些功能,必须配置一个<literal>NettyAcceptor</literal>,并设置<literal>protocol</literal>
+ 的值为<literal>stomp_ws</literal>:</para>
+ <programlisting>
+<acceptor name="stomp-ws-acceptor">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="protocol" value="stomp_ws"/>
+ <param key="port" value="61614"/>
+</acceptor>
+ </programlisting>
+ <para>使用上面配置,HornetQ在URL路径<literal>/stomp</literal>下端口<literal>61614</literal>接收Stomp连接。
+ 浏览器然后就可以连接到<literal>ws://<server>:61614/stomp</literal>,使用Web Socket来发送和接收
+ Stomp消息了。</para>
+ <para>为了简化客户端的开发,在<ulink url="http://github.com/jmesnil/stomp-websocket">GitHub</ulink>
+ 上提供了一个JavaScript库(参见<ulink url="http://jmesnil.net/stomp-websocket/doc/">文档</ulink>)。</para>
+ <para><literal>stomp-websockets</literal>例子给出一如何配置HornetQ服务器以使浏览器和Java应用程序通过一个JMS话题
+ 进行消息的传递。</para>
+ </section>
+ <section id="stompconnect">
+ <title>StompConnect</title>
+ <para><ulink url="http://stomp.codehaus.org/StompConnect">StompConnect</ulink>是一个Stomp代理服务器,
+ 它可以将Stomp协议转换为标准的JMS接口调用。因此,通过StompConnect的作用HornetQ可以作为一个Stomp代理,
+ 与任何一个Stomp客户端通迅。这些客户端可以由C、C++、C#及.net等语言实现。</para>
+ <para>要运行StompConnect首先要启动HornetQ服务以及JNDI服务。</para>
+ <para>Stomp需要<literal>jndi.properties</literal>文件要在classpath中。该文件
+ 应有如下类似的内容:</para>
+ <programlisting>java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces</programlisting>
+ <para>要确保该文件与StompConnect的jar包以及HornetQ的jar文件都在classpath中。最后,运行
+ <literal>java org.codehaus.stomp.jms.Main</literal>。</para>
+ </section>
</section>
<section>
<title>REST</title>
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/management.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/management.xml 2010-05-08 09:04:14 UTC (rev 9209)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/management.xml 2010-05-08 11:07:45 UTC (rev 9210)
@@ -429,8 +429,10 @@
<jmx-management-enabled>false</jmx-management-enabled>
</programlisting>
<para>如果JMX功能是打开的,则使用<literal>jconsole</literal>可以管理本地的HornetQ。
- 出于安全考虑,默认情况下JMX远程连接是关闭的。参见<ulink url="http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#remote"
+ <note>
+ <para>出于安全考虑,默认情况下JMX远程连接是关闭的。参见<ulink url="http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#remote"
>Java管理指南</ulink>来配置服务器的远程管理(系统变量必须在<literal>run.sh</literal>或<literal>run.bat</literal>中定义)。</para>
+ </note>
<para>HornetQ默认使用JMX域名"org.hornetq"。如果要用一个MBeanServer管理多个HornetQ服务器,可以将每个HornetQ
服务器配置成不同的JMX域。方法就是在<literal>hornetq-configuration.xml</literal>文件中设置<literal>jmx-domain</literal>:</para>
<programlisting>
@@ -638,13 +640,16 @@
<section>
<title>JMS消息通知</title>
<para>HornetQ还可以通过JMS消息的方式发送通知。</para>
- <para>这种方式与核心消息通知相似,但是有一个重要的不同:JMS消息需要一个JMS的目标(通常是一个Topic):</para>
+ <para>这种方式与核心消息通知相似,但是有一个重要的不同:JMS消息需要一个JMS的目标(通常是一个Topic)。</para>
+ <para>要通过一个JMS目标来接收管理通知,必须将服务器的管理通知地址修改为以<literal>jms.queue</literal>开头(如果是一个
+ JMS队列)或者<literal>jms.topic</literal>(如果是一个话题):</para>
<programlisting>
- Topic notificationsTopic = HornetQJMSClient.createHornetQTopic("hornetq.notifications", "hornetq.notifications");
+ <!-- 通知将从JMS话题 "notificationsTopic"上接收 -->
+ <management-notification-address>jms.topic.notificationsTopic</management-notification-address>
</programlisting>
<para>这个通知话题一旦被创建,就可以接收消息了(或者使用<literal>MessageListener</literal>):</para>
<programlisting>
- Topic notificationsTopic = HornetQJMSClient.createHornetQTopic("hornetq.notifications", "hornetq.notifications");
+ Topic notificationsTopic = HornetQJMSClient.createTopic("notificationsTopic");
Session session = ...
MessageConsumer notificationConsumer = session.createConsumer(notificationsTopic);
@@ -751,4 +756,47 @@
<para>参见<xref linkend="examples.message-counters"/>。这个例子使用消息计数器来获得一个JMS队列的相关数据。</para>
</section>
</section>
+ <section>
+ <title>通过JBoss应用服务器的Admin Console来管理HornetQ的资源</title>
+ <para>通过JBoss应用服务器的Admin Console可以创建与配置HornetQ的各种资源。</para>
+ <para>Admin Console允许你创建各种目标(JMS话题与队列)和JMS的连接工厂。</para>
+ <para>登录admin console后你在左边的树中会看到JMS Manager节点。所有HornetQ的资源都属于这个节点。在它的下面有JMS Queues、
+ Topics以及Connection Factories。分别点击它们将会看到相应的资源。下面将解释如何创建并配置它们。</para>
+ <section>
+ <title>JMS队列</title>
+ <para>要创建一个新的JMS队列,点击JMS Queues将列出当前的队列。在右边的窗口中有一个“add a new resource“按钮,点击这个按钮
+ 并选择默认(JMS 队列)模板。点击“continue“。填入相应的队列名称与JNDI名称。其它的参数值都给出了合理的默认值,通常情况下
+ 不用改动它们。在底部可以配置安全角色,如果你不提供将使用默认的配置。当这个队列成功创建后这些配置将会显示出来。除了队列的名字
+ 和JNDI名字外,其它参数都可以在contiguration标签页下进行修改。下面就对它们分别解释。</para>
+ <para>点击 configuration后你将看到如下显示:</para>
+ <para>
+ <graphic fileref="images/console1.png" align="center"/>
+ </para>
+ <para>name和JNDI name是不能改变的。如果你想改变它们,必须重新创建队列。其它选项是关于地址设置与安全设置。
+The default address settings are picked up from the servers configuration, if you change any of these
+ settings or create a queue via the console a new Address Settings enrty will be added. For a full explanation on
+ Address Settings see <xref linkend="queue-attributes.address-settings"/></para>
+ <para>To delete a queue simply click on the delete button beside the queue name in the main JMS Queues screen.
+ This will also delete any address settings or security settings previously created for the queues address</para>
+ <para>The last part of the configuration options are security roles. If non are provided on creation then the
+ servers default security settings will be shown. If these are changed or updated then new securty settings are
+ created for the address of this queue. For more information on securuty setting see <xref linkend="security"/> </para>
+ <para>It is also possible via the metrics tab to view statistics for this queue. This will show statistics such
+ as message count, consumer count etc.</para>
+ <para>Operations can be performed on a queue via the control tab. This will allow you to start and stop the queue,
+ list,move,expire and delete messages from the queue and other useful operations. To invoke an operation click on
+ the button for the operation you want, this will take you to a screen where you can parameters for the opertion can be set.
+ Once set clicking the ok button will invoke the operation, results appear at the bottom of the screen.</para>
+ </section>
+ <section>
+ <title>JMS Topics</title>
+ <para>Creating and configuring JMS Topics is almost identical to creating queues. The only difference is that the
+ configuration will be applied to the queue representing a subscription.</para>
+ </section>
+ <section>
+ <title>JMS Connection Factories</title>
+ <para>The format for creating connection factories is the same as for JMS Queues and topics apart frm the configuration
+ being different. For as list of all the connection factory settings see the configuration index </para>
+ </section>
+ </section>
</chapter>
14 years, 10 months
JBoss hornetq SVN: r9209 - branches/HnetQ_323_cn/docs/user-manual/zh.
by do-not-reply@jboss.org
Author: gaohoward
Date: 2010-05-08 05:04:14 -0400 (Sat, 08 May 2010)
New Revision: 9209
Modified:
branches/HnetQ_323_cn/docs/user-manual/zh/appserver-integration.xml
Log:
sync doc
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/appserver-integration.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/appserver-integration.xml 2010-05-08 05:09:23 UTC (rev 9208)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/appserver-integration.xml 2010-05-08 09:04:14 UTC (rev 9209)
@@ -43,16 +43,21 @@
<para>上例中配置了MDB从一个队列中接收消息,它的JNDI绑定名为<literal>queue/testQueue</literal>。
这个队列必须事先在HornetQ服务器配置文件中配置并部署好的。</para>
<para><literal>ResourceAdapter</literal> annotation用来指出使用哪个适配器。要使用它必须要引入
- <literal>org.jboss.ejb3.annotation.ResourceAdapter</literal>。这个类在
+ <literal>org.jboss.ejb3.annotation.ResourceAdapter</literal> (JBoss AS 5.x或以上)。
+ 这个类在
<literal>jboss-ejb3-ext-api.jar</literal>文件中。该文件可以在JBoss的repository中找到。
另外一个方法是使用部署描述文件(deployment descriptor),即在文件<literal
>jboss.xml</literal>中加入类似以下的内容:
<programlisting><message-driven>
<ejb-name>ExampleMDB</ejb-name>
- <resource-adapter-name>quartz-ra.rar</resource-adapter-name>
+ <resource-adapter-name>hornetq-ra.rar</resource-adapter-name>
</message-driven>
</programlisting>你还可以将hornetq-ra.rar改名为jms-ra.rar而不需要任何annotation或额外的部署描述信息。但是你需要
编辑<literal>jms-ds.xml</literal>文件,将其中的<literal>rar-name</literal>项改成相应的值。</para>
+ <note>
+ <para>HornetQ是JBoss AS 6默认的JMS提供者。从这个版本开始HornetQ的资源适配器名字是
+ <literal>jms-ra.rar</literal>,并且你不需要在MDB的annotation中指定它。</para>
+ </note>
<para>HornetQ发布包中的所有例子都使用annotation方法。</para>
<section>
<title>使用容器管理事务(CMT)</title>
@@ -79,7 +84,7 @@
<para>如果要回滚事务,可以调用<literal>MessageDrivenContext</literal>的
<literal>setRollbackOnly</literal>方法。如下面的代码所示:</para>
<programlisting> @Resource
- MessageDrivenContext ctx;
+ MessageDrivenContextContext ctx;
public void onMessage(Message message)
{
@@ -148,6 +153,7 @@
tx.begin();
//do some stuff within the transaction
+
tx.commit();
}
@@ -333,10 +339,10 @@
<title>适配器的全局参数</title>
<para>首先看到的第一个参数是<literal>resourceadapter-class</literal>。这是HornetQ
的适配器类。此参数不可更改。</para>
- <para>在此之后是可配置的参数。前两个配置适配器所使用的传输。其余的用来配置连接工厂。
+ <para>在此之后是可配置的参数。前两个配置适配器所使用的传输。其余的用来配置连接工厂。</para>
<note><para>所有连接工厂的参数在没有定义时使用默认值。参数<literal>reconnectAttempts</literal>
的默认值取-1,表示如果连接失败,HornetQ会不停地尝试重新连接。这个参数只适用于创建远程
- 连接的情况。如果是InVm连接器,则永远不可能发生连接故障。</para></note></para>
+ 连接的情况。如果是InVm连接器,则永远不可能发生连接故障。</para></note>
<para>下面给出了每个参数的说明:</para>
<table frame="topbot" border="2">
<title>全局配置参数</title>
@@ -362,7 +368,7 @@
<entry>ConnectionParameters</entry>
<entry>String</entry>
<entry>传输配置参数。它的值必须是采用
- key=val;key=val;的形式。不同连接器有不同的参数。</entry>
+ <literal>key1=val1;key2=val2;</literal>的形式。不同连接器有不同的参数。</entry>
</row>
<row>
<entry>useLocalTx</entry>
@@ -370,11 +376,6 @@
<entry>设为True,则进行本地事务优化。</entry>
</row>
<row>
- <entry>UseXA</entry>
- <entry>boolean</entry>
- <entry>是否使用XA</entry>
- </row>
- <row>
<entry>UserName</entry>
<entry>String</entry>
<entry>用于创建连接时使用的用户名</entry>
@@ -385,150 +386,217 @@
<entry>用于创建连接时使用的用户密码</entry>
</row>
<row>
- <entry>BackUpTransportType</entry>
+ <entry>BackupConnectorClassName</entry>
<entry>String</entry>
<entry>发生故障是使用的备份传输</entry>
</row>
<row>
- <entry>TransportConfiguration</entry>
+ <entry>BackupConnectionParameters</entry>
<entry>String</entry>
- <entry>备份传输的配置</entry>
+ <entry>备份传输的配置参数</entry>
</row>
<row>
- <entry>DiscoveryGroupAddress</entry>
+ <link linkend="configuration.discovery-group.group-address">DiscoveryAddress</link></entry>
<entry>String</entry>
<entry>服务器自动检测所使用的发现组(discovery group)地址</entry>
</row>
<row>
- <entry>DiscoveryGroupPort</entry>
- <entry>integer</entry>
+ <link linkend="configuration.discovery-group.group-port">DiscoveryPort</link></entry>
+ <entry>Integer</entry>
<entry>检测所使用的端口号</entry>
</row>
<row>
- <entry>DiscoveryRefreshTimeout</entry>
- <entry>long</entry>
+ <entry><link linkend="configuration.discovery-group.refresh-timeout">DiscoveryRefreshTimeout</link></entry></entry>
+ <entry>Long</entry>
<entry>刷新的时间(timeout)。单位为毫秒</entry>
</row>
<row>
- <entry>DiscoveryInitialWaitTimeout</entry>
- <entry>long</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.discovery-initial-wait-timeout">
+ DiscoveryInitialWaitTimeout
+ </link>
+ </entry>
+ <entry>Long</entry>
<entry>检测之前所需等待的时间</entry>
</row>
<row>
- <entry>LoadBalancingPolicyClassName</entry>
- <entry>String</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.connection-load-balancing-policy-class-name">
+ ConnectionLoadBalancingPolicyClassName</link>
+ </entry>
+ <entry>String</entry>
<entry>负载均衡策略使用的类</entry>
</row>
<row>
- <entry>PingPeriod</entry>
- <entry>long</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.discovery-initial-wait-timeout">
+ DiscoveryInitialWaitTimeout
+ </link>
+ </entry>
+ <entry>Long</entry>
<entry>向服务器发送ping的周期,单位毫秒</entry>
</row>
<row>
- <entry>ConnectionTTL</entry>
- <entry>long</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.connection-ttl">ConnectionTTL</link>
+ </entry>
+ <entry>Long</entry>
<entry>连接的存活时间(TTL)</entry>
</row>
<row>
- <entry>CallTimeout</entry>
- <entry>long</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.call-timeout">CallTimeout</link>
+ </entry>
+ <entry>Long</entry>
<entry>每个数据包的调用超时。单位毫秒</entry>
</row>
<row>
- <entry>DupsOKBatchSize</entry>
- <entry>integer</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.dups-ok-batch-size">DupsOKBatchSize</link>
+ </entry>
+ <entry>Integer</entry>
<entry>Dups OK的情况下消息批量的大小。</entry>
</row>
- </tbody>
- </tgroup>
- </table>
- <para>继续..</para>
- <informaltable frame="topbot">
- <tgroup cols="3">
- <colspec colname="c1" colnum="1"/>
- <colspec colname="c2" colnum="2"/>
- <colspec colname="c3" colnum="3"/>
- <tbody>
<row>
- <entry>TransactionBatchSize</entry>
- <entry>integer</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.transaction-batch-size">TransactionBatchSize</link>
+ </entry>
+ <entry>Integer</entry>
<entry>在事务中发送消息的批量大小</entry>
</row>
<row>
- <entry>ConsumerWindowSize</entry>
- <entry>integer</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.consumer-window-size">ConsumerWindowSize</link>
+ </entry>
+ <entry>Integer</entry>
<entry>接收者内部缓存的窗口大小</entry>
</row>
<row>
- <entry>ConsumerMaxRate</entry>
- <entry>integer</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.consumer-max-rate">ConsumerMaxRate</link>
+ </entry>
+ <entry>Integer</entry>
<entry>接收者接收消息的最大速度</entry>
</row>
<row>
- <entry>ConfirmationWindowSize</entry>
- <entry>integer</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.confirmation-window-size">ConfirmationWindowSize</link>
+ </entry>
+ <entry>Integer</entry>
<entry>用于确认的窗口大小</entry>
</row>
<row>
- <entry>ProducerMaxRate</entry>
- <entry>integer</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.producer-max-rate">ProducerMaxRate</link>
+ </entry>
+ <entry>Integer</entry>
<entry>发送者发送消息的最大速度</entry>
</row>
<row>
- <entry>MinLargeMessageSize</entry>
- <entry>integer</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.min-large-message-size">MinLargeMessageSize</link>
+ </entry>
+ <entry>Integer</entry>
<entry>大消息的最小数值,单位字节。</entry>
</row>
<row>
- <entry>BlockOnAcknowledge</entry>
- <entry>boolean</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.block-on-acknowledge">BlockOnAcknowledge</link>
+ </entry>
+ <entry>Boolean</entry>
<entry>如果为true,表示以阻塞方法发送消息通知。</entry>
</row>
<row>
- <entry>BlockOnNonDurableSend</entry>
- <entry>boolean</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.block-on-non-durable-send">BlockOnNonDurableSend</link>
+ </entry>
+ <entry>Boolean</entry>
<entry>如果为true,表示以阻塞方式发送非持久消息</entry>
</row>
<row>
- <entry>BlockOnDurableSend</entry>
- <entry>boolean</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.block-on-durable-send">BlockOnDurableSend</link>
+ </entry>
+ <entry>Boolean</entry>
<entry>如果为true,表示以阻塞方式发送持久消息</entry>
</row>
<row>
- <entry>AutoGroup</entry>
- <entry>boolean</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.auto-group">AutoGroup</link>
+ </entry>
+ <entry>Boolean</entry>
<entry>如果为true,表示自动消息分组</entry>
</row>
<row>
- <entry>PreAcknowledge</entry>
- <entry>boolean</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.pre-acknowledge">PreAcknowledge</link>
+ </entry>
+ <entry>Boolean</entry>
<entry>决定是否进行消息的预先通知(pre-acknowledge)。</entry>
</row>
<row>
- <entry>reconnectAttempts</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.reconnect-attempts">ReconnectAttempts</link>
+ </entry>
<entry>Integer</entry>
<entry>连接重试的次数,默认为 -1</entry>
</row>
<row>
- <entry>RetryInterval</entry>
- <entry>long</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.retry-interval">RetryInterval</link>
+ </entry>
+ <entry>Long</entry>
<entry>每次连接重试前等待的时间,单位毫秒。</entry>
</row>
<row>
- <entry>RetryIntervalMultiplier</entry>
- <entry>double</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.retry-interval-multiplier">RetryIntervalMultiplier</link>
+ </entry>
+ <entry>Double</entry>
<entry>用于计算重试间隔</entry>
</row>
<row>
- <entry>FailoverOnServerShutdown</entry>
- <entry>boolean</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.failover-on-server-shutdown">FailoverOnServerShutdown</link>
+ </entry>
+ <entry>Boolean</entry>
<entry>如果设为true表示尝试连接其它的服务器</entry>
</row>
<row>
- <entry>ClientID</entry>
+ <entry>
+ <link linkend="configuration.connection-factory.client-id">ClientID</link>
+ </entry>
<entry>String</entry>
<entry>连接的客户端ID</entry>
</row>
+ <row>
+ <entry>
+ <link linkend="configuration.connection-factory.client-failure-check-period">ClientFailureCheckPeriod</link>
+ </entry>
+ <entry>Long</entry>
+ <entry>客户端如果在这个时间内没有收到服务器数据包,将认为连接出现故障。</entry>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuration.connection-factory.use-global-pools">UseGlobalPools</link>
+ </entry>
+ <entry>Boolean</entry>
+ <entry>是否使用全局线程池</entry>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuration.connection-factory.scheduled-thread-pool-max-size">ScheduledThreadPoolMaxSize</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry><emphasis>可计划线程池</emphasis>的最大线程数</entry>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuration.connection-factory.thread-pool-max-size">ThreadPoolMaxSize</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>线程池的大小</entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
@@ -540,8 +608,10 @@
<literal>hornetq.sar</literal>下有一个默认的配置文件<literal>jms-ds.xml</literal>。
在这个文件中的连接工厂的配置从主要的配置文件<literal>ra.xml</literal>中继承,
但是可以在这里重新定义。下面的例子中给出了重新定义的方法。</para>
+ <note>
<para>请注意这里的配置只适用于在JBoss应用服务器中安装的HornetQ。如果要在其它JEE应用服务器中
使用并配置HornetQ,请参照相应的应用服务器手册。</para>
+ </note>
<programlisting><tx-connection-factory>
<jndi-name>RemoteJmsXA</jndi-name>
<xa-transaction/>
@@ -551,7 +621,7 @@
<config-property name="SessionDefaultType" type="String">javax.jms.Topic
</config-property>
<config-property name="ConnectorClassName" type="String">
- org.hornetq.integration.transports.netty.NettyConnectorFactory
+ org.hornetq.core.remoting.impl.netty.NettyConnectorFactory
</config-property>
<config-property name="ConnectionParameters" type="String">
port=5445</config-property>
@@ -563,12 +633,107 @@
private ConnectionFactory connectionFactory;</programlisting>
<para><literal>config-property</literal>覆盖了<literal>ra.xml</literal>文件中的配置。
以此类推,其它有关连接工厂的参数也可以在此覆盖。</para>
+ <para>除了全局的配置参数外,外部的配置还定义了其它一些参数。</para>
+
+ <table frame="topbot" border="2">
+ <title>外部配置参数</title>
+ <tgroup cols="3">
+ <colspec colname="c1" colnum="1"/>
+ <colspec colname="c2" colnum="2"/>
+ <colspec colname="c3" colnum="3"/>
+ <thead>
+ <row>
+ <entry>参数名</entry>
+ <entry>参数类型</entry>
+ <entry>说明</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>SessionDefaultType</entry>
+ <entry>String</entry>
+ <entry>默认的会话类型</entry>
+ </row>
+ <row>
+ <entry>UseTryLock</entry>
+ <entry>Integer</entry>
+ <entry>在规定的秒数内获得锁。如果不想使用这个功能,将它设为0或负数</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
</section>
<section>
<title>适配器内部(inbound)配置</title>
<para>内部配置参数也应该保持不变。它们控制向MDB转发消息的各种属性。通过在MDB上添加相应的激活配置
(activation configuration)可以覆盖这些参数的值。它可以用来配置一个MDB从另外一个服务器
- 接收消息。下一节将讲述如何覆盖这些配置。</para>
+ 接收消息。</para>
+ <para>除了全局的配置参数外,内部的配置还定义了其它一些参数。</para>
+
+ <table frame="topbot" border="2">
+ <title>Inbound Configuration Properties</title>
+ <tgroup cols="3">
+ <colspec colname="c1" colnum="1"/>
+ <colspec colname="c2" colnum="2"/>
+ <colspec colname="c3" colnum="3"/>
+ <thead>
+ <row>
+ <entry>参数名</entry>
+ <entry>参数类型</entry>
+ <entry>说明</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Destination</entry>
+ <entry>String</entry>
+ <entry>目标的JNDI名字</entry>
+ </row>
+ <row>
+ <entry>DestinationType</entry>
+ <entry>String</entry>
+ <entry>目标的类型,<literal>javax.jms.Queue</literal>或者<literal>javax.jms.Topic</literal>
+ (默认是javax.jms.Queue)</entry>
+ </row>
+ <row>
+ <entry>AcknowledgeMode</entry>
+ <entry>String</entry>
+ <entry>通知模式,<literal>Auto-acknowledge</literal> 或 <literal>Dups-ok-acknowledge</literal>
+ (默认值是Auto-acknowledge). <literal>AUTO_ACKNOWLEDGE</literal>和<literal>DUPS_OK_ACKNOWLEDGE</literal>也是有效值</entry>
+ </row>
+ <row>
+ <entry>MaxSession</entry>
+ <entry>Integer</entry>
+ <entry>内部配置创建的最大会话数(默认是5)</entry>
+ </row>
+ <row>
+ <entry>MessageSelector</entry>
+ <entry>String</entry>
+ <entry>接收者的消息选择器</entry>
+ </row>
+ <row>
+ <entry>SubscriptionDurability</entry>
+ <entry>String</entry>
+ <entry>订阅的类型,<literal>Durable</literal>或者<literal>NonDurable</literal></entry>
+ </row>
+ <row>
+ <entry>SubscriptionName</entry>
+ <entry>String</entry>
+ <entry>订阅的名字</entry>
+ </row>
+ <row>
+ <entry>TransactionTimeout</entry>
+ <entry>Long</entry>
+ <entry>事务超时(毫秒,默认是0,表示事务不会超时)</entry>
+ </row>
+ <row>
+ <entry>UseJNDI</entry>
+ <entry>Boolean</entry>
+ <entry>是否使用JNDI来查找目标(默认是true)</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
</section>
</section>
<section>
@@ -618,7 +783,7 @@
的类名,用来连接HornetQ服务器。其值可以是<literal
>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</literal> 或
<literal
- >org.hornetq.integration.transports.netty.NettyConnectorFactory</literal></para>
+ >org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</literal></para>
</listitem>
<listitem>
<para><literal>[用户名]</literal>是用于创建客户会话的用户名。是可选项。</para>
@@ -651,7 +816,7 @@
<para>如果配置了一个netty接受器,并且端口不是默认的:</para>
<programlisting>
<acceptor name="netty">
- <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="port" value="8888"/>
</acceptor>
</programlisting>
@@ -659,7 +824,7 @@
>conf/jbossts-properties.xml</literal>文件中:</para>
<programlisting>
<property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.HORNETQ1"
- value="org.hornetq.jms.server.recovery.HornetQXAResourceRecovery;org.hornetq.integration.transports.netty.NettyConnectorFactory, , , port=8888"/>
+ value="org.hornetq.jms.server.recovery.HornetQXAResourceRecovery;org.hornetq.core.remoting.impl.netty.NettyConnectorFactory, , , port=8888"/>
</programlisting>
<note>
<para>注意在没有用户名和密码时,逗号是不能省略的。</para>
@@ -668,7 +833,7 @@
应为如下所示:</para>
<programlisting>
<property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.HORNETQ1"
- value="org.hornetq.jms.server.recovery.HornetQXAResourceRecovery;org.hornetq.integration.transports.netty.NettyConnectorFactory, admin, adminpass, port=8888"/>
+ value="org.hornetq.jms.server.recovery.HornetQXAResourceRecovery;org.hornetq.core.remoting.impl.netty.NettyConnectorFactory, admin, adminpass, port=8888"/>
</programlisting>
<para>推荐在XA恢复中,将HornetQ配置一个invm接受器,并配置恢复管理器使用invm连接器。</para>
</section>
14 years, 10 months
JBoss hornetq SVN: r9208 - branches/HnetQ_323_cn/docs/user-manual/zh.
by do-not-reply@jboss.org
Author: gaohoward
Date: 2010-05-08 01:09:23 -0400 (Sat, 08 May 2010)
New Revision: 9208
Modified:
branches/HnetQ_323_cn/docs/user-manual/zh/configuration-index.xml
Log:
done
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/configuration-index.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/configuration-index.xml 2010-05-07 09:03:55 UTC (rev 9207)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/configuration-index.xml 2010-05-08 05:09:23 UTC (rev 9208)
@@ -17,16 +17,15 @@
<!-- permitted by applicable law. a -->
<!-- ============================================================================= -->
<chapter id="configuration-index">
- <title>Configuration Reference</title>
- <para>This section is a quick index for looking up configuration. Click on the element name to
- go to the specific chapter.</para>
+ <title>配置参数索引</title>
+ <para>本章给出了HornetQ配置参数的索引,以便查阅。点击任意一个配置参数可以转到其所属的章节。</para>
<section id="server.configuration">
- <title>Server Configuration</title>
+ <title>服务器配置</title>
<section>
<title>hornetq-configuration.xml</title>
- <para>This is the main core server configuration file.</para>
+ <para>HornetQ主要核心服务器配置文件</para>
<table frame="topbot" border="2">
- <title>Server Configuration</title>
+ <title>服务器配置</title>
<tgroup cols="4">
<colspec colname="c1" colnum="1"/>
<colspec colname="c2" colnum="2"/>
@@ -34,76 +33,71 @@
<colspec colname="c4" colnum="4"/>
<thead>
<row>
- <entry>Element Name</entry>
- <entry>Element Type</entry>
- <entry>Description</entry>
- <entry>Default</entry>
+ <entry>名称</entry>
+ <entry>类型</entry>
+ <entry>说明</entry>
+ <entry>默认值</entry>
</row>
</thead>
<tbody>
<row>
<entry><link linkend="configuring.live.backup">backup</link></entry>
<entry>Boolean</entry>
- <entry>true means that this server is a backup to another node in the
- cluster</entry>
+ <entry>true表示本服务器是集群中另一个服务器的备份服务器</entry>
<entry>false</entry>
</row>
<row>
<entry><link linkend="configuring.live.backup"
>backup-connector-ref</link></entry>
<entry>String</entry>
- <entry>the name of the remoting connector to connect to the backup
- node</entry>
+ <entry>用于连接备份服务器的连接器</entry>
<entry/>
</row>
<row>
<entry><link linkend="configuring.bindings.journal"
>bindings-directory</link></entry>
<entry>String</entry>
- <entry>the directory to store the persisted bindings to</entry>
+ <entry>保存持久绑定的目录the directory to store the persisted bindings to</entry>
<entry>data/bindings</entry>
</row>
<row>
<entry><link linkend="clusters">clustered</link></entry>
<entry>Boolean</entry>
- <entry>true means that the server is clustered</entry>
+ <entry>true表示服务器是集群中的节点</entry>
<entry>false</entry>
</row>
<row>
<entry><link linkend="connection-ttl"
>connection-ttl-override</link></entry>
<entry>Long</entry>
- <entry>if set, this will override how long (in ms) to keep a connection
- alive without receiving a ping. </entry>
+ <entry>表示在接收到一个ping之前连接保持有效的时间(单位毫秒)</entry>
<entry>-1</entry>
</row>
<row>
<entry><link linkend="configuring.bindings.journal"
>create-bindings-dir</link></entry>
<entry>Boolean</entry>
- <entry>true means that the server will create the bindings directory on
- start up</entry>
+ <entry>true表示服务器在启动时创建绑定的目录</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="configuring.message.journal.create-journal-dir"
>create-journal-dir</link></entry>
<entry>Boolean</entry>
- <entry>true means that the journal directory will be created</entry>
+ <entry>true表示创建日志目录</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="using-server.configuration"
>file-deployment-enabled</link></entry>
<entry>Boolean</entry>
- <entry>true means that the server will load configuration from the
- configuration files</entry>
+ <entry>true表示服务器从配置文件中读取配置</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="duplicate.id.cache">id-cache-size</link></entry>
<entry>Integer</entry>
- <entry>the size of the cache for pre creating message id's</entry>
+ <entry>预先生成的消息id的缓存大小</entry>
<entry>2000</entry>
</row>
<row>
@@ -111,7 +105,7 @@
linkend="configuring.message.journal.journal-buffer-size"
>journal-buffer-size</link></entry>
<entry>Long</entry>
- <entry>The size of the internal buffer on the journal.</entry>
+ <entry>日志内部缓存的大小</entry>
<entry>128 KiB</entry>
</row>
<row>
@@ -119,8 +113,7 @@
linkend="configuring.message.journal.journal-buffer-timeout"
>journal-buffer-timeout</link></entry>
<entry>Long</entry>
- <entry>The timeout (in nanoseconds) used to flush internal
- buffers on the journal.</entry>
+ <entry>T将日志缓冲数据刷新的等待时间(纳秒)</entry>
<entry>20000</entry>
</row>
<row>
@@ -128,8 +121,7 @@
linkend="configuring.message.journal.journal-compact-min-files"
>journal-compact-min-files</link></entry>
<entry>Integer</entry>
- <entry>The minimal number of data files before we can start
- compacting</entry>
+ <entry>开始整理数据的最小数据文件数。</entry>
<entry>10</entry>
</row>
<row>
@@ -137,37 +129,35 @@
linkend="configuring.message.journal.journal-compact-percentage"
>journal-compact-percentage</link></entry>
<entry>Integer</entry>
- <entry>The percentage of live data on which we consider compacting the
- journal</entry>
+ <entry>开始压缩日志时的有效数据百分比。</entry>
<entry>30</entry>
</row>
<row>
<entry><link linkend="configuring.message.journal.journal-directory"
>journal-directory</link></entry>
<entry>String</entry>
- <entry>the directory to store the journal files in</entry>
+ <entry>日志文件所在的位置</entry>
<entry>data/journal</entry>
</row>
<row>
<entry><link linkend="configuring.message.journal.journal-file-size"
>journal-file-size</link></entry>
<entry>Long</entry>
- <entry>the size (in bytes) of each journal file</entry>
+ <entry>每个日志文件的大小(字节)</entry>
<entry>128 * 1024</entry>
</row>
<row>
<entry><link linkend="configuring.message.journal.journal-max-io"
>journal-max-io</link></entry>
<entry>Integer</entry>
- <entry>the maximum number of write requests that can be in the AIO queue
- at any one time</entry>
+ <entry>某一时刻保存在AIO队列中的最大写请求数</entry>
<entry>500</entry>
</row>
<row>
<entry><link linkend="configuring.message.journal.journal-min-files"
>journal-min-files</link></entry>
<entry>Integer</entry>
- <entry>how many journal files to pre-create</entry>
+ <entry>预先创建的日志文件数</entry>
<entry>2</entry>
</row>
<row>
@@ -175,8 +165,7 @@
linkend="configuring.message.journal.journal-sync-transactional"
>journal-sync-transactional</link></entry>
<entry>Boolean</entry>
- <entry>if true wait for transaction data to be synchronized to the
- journal before returning response to client</entry>
+ <entry>如果是true,等事务数据同步到日志后再向客户端返回</entry>
<entry>true</entry>
</row>
<row>
@@ -184,595 +173,751 @@
linkend="configuring.message.journal.journal-sync-non-transactional"
>journal-sync-non-transactional</link></entry>
<entry>Boolean</entry>
- <entry>if true wait for non transaction data to be synced to the journal
- before returning response to client.</entry>
+ <entry>如果是true,等非事务数据到日志后再向客户端返回</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="configuring.message.journal.journal-type"
>journal-type</link></entry>
<entry>ASYNCIO|NIO</entry>
- <entry>the type of journal to use</entry>
+ <entry>日志存取的方式</entry>
<entry>ASYNCIO</entry>
</row>
<row>
<entry><link linkend="management.jmx.configuration"
>jmx-management-enabled</link></entry>
<entry>Boolean</entry>
- <entry>true means that the management API is available via JMX</entry>
+ <entry>true表示通过JMX可以使用管理接口</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="management.jmx.configuration"
>jmx-domain</link></entry>
<entry>String</entry>
- <entry>the JMX domain used to registered HornetQ MBeans in the
- MBeanServer</entry>
+ <entry>用于HornetQ MBean注册到MBeanServer的JMX域名</entry>
<entry>org.hornetq</entry>
</row>
<row>
<entry><link linkend="large.message.configuring"
>large-messages-directory</link></entry>
<entry>String</entry>
- <entry>the directory to store large messages</entry>
+ <entry>存放大消息的目录</entry>
<entry>data/largemessages</entry>
</row>
<row>
<entry><link linkend="management.core.configuration"
>management-address</link></entry>
<entry>String</entry>
- <entry>the name of the management address to send management messages
- to</entry>
+ <entry>管理消息发送的地址</entry>
<entry>jms.queue.hornetq.management</entry>
</row>
<row>
<entry><link linkend="clusters.clusteruser"
>cluster-user</link></entry>
<entry>String</entry>
- <entry>the user used by cluster connections to communicate between the
- clustered nodes</entry>
+ <entry>集群连接的用户名</entry>
<entry>HORNETQ.CLUSTER.ADMIN.USER</entry>
</row>
<row>
<entry><link linkend="clusters.clusteruser"
>cluster-password</link></entry>
<entry>String</entry>
- <entry>the password used by cluster connections to communicate between the
- clustered nodes</entry>
+ <entry>集群连接的用户密码</entry>
<entry>CHANGE ME!!</entry>
</row>
<row>
<entry><link linkend="management.notifications.core.configuration"
>management-notification-address</link></entry>
<entry>String</entry>
- <entry>the name of the address that consumers bind to receive management
- notifications</entry>
+ <entry>用于接收管理通知的地址</entry>
<entry>hornetq.notifications</entry>
</row>
<row>
<entry><link linkend="configuring.message.counters"
>message-counter-enabled</link></entry>
<entry>Boolean</entry>
- <entry>true means that message counters are enabled</entry>
+ <entry>true表示使用消息计数器</entry>
<entry>false</entry>
</row>
<row>
<entry><link linkend="configuring.message.counters"
>message-counter-max-day-history</link></entry>
<entry>Integer</entry>
- <entry>how many days to keep message counter history</entry>
+ <entry>消息计数器历史保存的天数</entry>
<entry>10</entry>
</row>
<row>
<entry><link linkend="configuring.message.counters"
>message-counter-sample-period</link></entry>
<entry>Long</entry>
- <entry>the sample period (in ms) to use for message counters</entry>
+ <entry>消息计数器取样的间隔(毫秒)</entry>
<entry>10000</entry>
</row>
<row>
<entry><link linkend="configuring.expiry.reaper"
>message-expiry-scan-period</link></entry>
<entry>Long</entry>
- <entry>how often (in ms) to scan for expired messages</entry>
+ <entry>过期消息扫描周期(毫秒)</entry>
<entry>30000</entry>
</row>
<row>
<entry><link linkend="configuring.expiry.reaper"
>message-expiry-thread-priority</link></entry>
<entry>Integer</entry>
- <entry>the priority of the thread expiring messages</entry>
+ <entry>过期消息线程的优先级</entry>
<entry>3</entry>
</row>
<row>
<entry><link linkend="paging.main.config"
>paging-directory</link></entry>
<entry>String</entry>
- <entry>the directory to store paged messages in</entry>
+ <entry>分页转存消息的保存目录</entry>
<entry>data/paging</entry>
</row>
<row>
<entry><link linkend="configuring.delivery.count.persistence">
persist-delivery-count-before-delivery</link></entry>
<entry>Boolean</entry>
- <entry>true means that the delivery count is persisted before delivery.
- False means that this only happens after a message has been
- cancelled.</entry>
+ <entry>true表示传递计数在传递之前保存。false表示只有当消息被取消时才保存。</entry>
<entry>false</entry>
</row>
<row>
<entry><link linkend="persistence.enabled"
>persistence-enabled</link></entry>
<entry>Boolean</entry>
- <entry>true means that the server will use the file based journal for
- persistence.</entry>
+ <entry>true表示服务器使用基于文件的日志做持久化</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="duplicate.id.cache"
>persist-id-cache</link></entry>
<entry>Boolean</entry>
- <entry>true means that id's are persisted to the journal</entry>
+ <entry>true表示id被保存到日志中</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="server.scheduled.thread.pool"
>scheduled-thread-pool-max-size</link></entry>
<entry>Integer</entry>
- <entry>the number of threads that the main scheduled thread pool
- has.</entry>
+ <entry>可计划线程池的线程数。</entry>
<entry>5</entry>
</row>
<row>
<entry><link linkend="security">security-enabled</link></entry>
<entry>Boolean</entry>
- <entry>true means that security is enabled</entry>
+ <entry>true表示使用安全功能</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="security"
>security-invalidation-interval</link></entry>
<entry>Long</entry>
- <entry>how long (in ms) to wait before invalidating the security
- cache</entry>
+ <entry>安全缓存的有效时间(毫秒)</entry>
<entry>10000</entry>
</row>
<row>
<entry><link linkend="server.scheduled.thread.pool"
>thread-pool-max-size</link></entry>
<entry>Integer</entry>
- <entry>the number of threads that the main thread pool has. -1 means no
- limit</entry>
+ <entry>主线程池的线程数。-1表示数量不限</entry>
<entry>-1</entry>
</row>
<row>
<entry><link linkend="connection-ttl.async-connection-execution"
>async-connection-execution-enabled</link></entry>
<entry>Boolean</entry>
- <entry>Should incoming packets on the server be handed off to a thread
- from the thread pool for processing or should they be handled on the
- remoting thread?</entry>
+ <entry>接收的数据包是否由线程池的线程来处理</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="transaction-config"
>transaction-timeout</link></entry>
<entry>Long</entry>
- <entry>how long (in ms) before a transaction can be removed from the
- resource manager after create time</entry>
+ <entry>事务在建立后经过多长时间后可以从资源管理器(resource manager)删除(毫秒)</entry>
<entry>60000</entry>
</row>
<row>
<entry><link linkend="transaction-config"
>transaction-timeout-scan-period</link></entry>
<entry>Long</entry>
- <entry>how often (in ms) to scan for timeout transactions</entry>
+ <entry>扫描超时事务的间隔(毫秒)</entry>
<entry>1000</entry>
</row>
<row>
<entry><link linkend="wildcard-routing"
>wild-card-routing-enabled</link></entry>
<entry>Boolean</entry>
- <entry>true means that the server supports wild card routing</entry>
+ <entry>true表示服务器支持通配符路由</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="perf-tuning.memory"
>memory-measure-interval</link></entry>
<entry>Long</entry>
- <entry>frequency to sample JVM memory in ms (or -1 to disable memory sampling)</entry>
+ <entry>采样JVM内存的周期(毫秒,-1表示不采样)</entry>
<entry>-1</entry>
</row>
<row>
<entry><link linkend="perf-tuning.memory"
>memory-warning-threshold</link></entry>
<entry>Integer</entry>
- <entry>Percentage of available memory which threshold a warning log</entry>
+ <entry>可用内存达到这个百分比时,给出警告信息</entry>
<entry>25</entry>
</row>
<row>
- <entry><link linkend="configuring-transports.acceptors"
- >acceptors</link></entry>
+ <entry><link linkend="configuring-transports.connectors"
+ >connectors</link></entry>
+ <entry>Connector</entry>
+ <entry>连接器的配置</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuring-transports.acceptors">connector.name (attribute)</link></entry>
+ <entry>String</entry>
+ <entry>连接器的名字-必需指定的参数</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuring-transports.connectors">connector.factory-class</link></entry>
+ <entry>String</entry>
+ <entry>连接工厂的实现类名-必需指定的参数</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuring-transports.connectors">connector.param</link></entry>
+ <entry>连接器的配置参数</entry>
+ <entry>一个键-值对,表示一个连接器的参数配置。一个连接器可以有多个这样的参数</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuring-transports.connectors">connector.param.key (属性)</link></entry>
+ <entry>String</entry>
+ <entry>参数的键 - 必需指定的参数</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuring-transports.connectors">connector.param.value (attribute)</link></entry>
+ <entry>String</entry>
+ <entry>参数的值 - 必需指定的参数</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuring-transports.acceptors">acceptors</link></entry>
<entry>Acceptor</entry>
- <entry>a list of remoting acceptors to create</entry>
+ <entry>一组接收器</entry>
<entry/>
</row>
<row>
+ <entry>
+ <link linkend="configuring-transports.acceptors">acceptor.name (属性)</link></entry>
+ <entry>String</entry>
+ <entry>接收器的名字 - 可选</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuring-transports.acceptors">acceptor.factory-class</link></entry>
+ <entry>String</entry>
+ <entry>接收器工厂实现类名 - 必需指定的参数</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuring-transports.acceptors">acceptor.param</link></entry>
+ <entry>一个接收器的配置参数</entry>
+ <entry>用来配置接收器的键-值对。一个接收器可以有多个参数。</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuring-transports.acceptors">acceptor.param.key (属性)</link></entry>
+ <entry>String</entry>
+ <entry>参数的键 - 必需指定的参数</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="configuring-transports.acceptors">acceptor.param.value (attribute)</link></entry>
+ <entry>String</entry>
+ <entry>参数的值 - 必需指定的参数</entry>
+ <entry/>
+ </row>
+ <row>
<entry><link linkend="clusters.broadcast-groups"
>broadcast-groups</link></entry>
<entry>BroadcastGroup</entry>
- <entry>a list of broadcast groups to create</entry>
+ <entry>一组广播组</entry>
<entry/>
</row>
<row>
- <entry><link linkend="understanding.connectors"
- >connectors</link></entry>
- <entry>Connector</entry>
- <entry>a list of remoting connectors configurations to create</entry>
+ <entry>
+ <link linkend="clusters.broadcast-groups">broadcast-group.name (attribute)</link>
+ </entry>
+ <entry>String</entry>
+ <entry>广播组的名字(必需是唯一的)- 必需指定的参数</entry>
<entry/>
</row>
<row>
+ <entry>
+ <link linkend="clusters.broadcast-groups">broadcast-group.local-bind-address</link>
+ </entry>
+ <entry>String</entry>
+ <entry>数据报文套接字的本地绑定地址</entry>
+ <entry>内系统内核选择的IP地址</entry>
+ </row>
+ <row>
+ <entry>
+ <link linkend="clusters.broadcast-groups">broadcast-group.local-bind-port</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>数据报文套接字的本地绑定端口</entry>
+ <entry>-1 (匿名端口)</entry>
+ </row>
+ <row>
+ <entry>
+ <link linkend="clusters.broadcast-groups">broadcast-group.group-address</link>
+ </entry>
+ <entry>String</entry>
+ <entry>广播地址 - 必需指定的参数</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="clusters.broadcast-groups">broadcast-group.group-port</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>广播使用的UDP端口 - 必需指定的参数</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="clusters.broadcast-groups">broadcast-group.broadcast-period</link>
+ </entry>
+ <entry>Long</entry>
+ <entry>广播的时间间隔(毫秒)</entry>
+ <entry>2000</entry>
+ </row>
+ <row>
+ <entry>
+ <link linkend="clusters.broadcast-groups">broadcast-group.connector-ref</link>
+ </entry>
+ <entry>一个连接器对</entry>
+ <entry>广播的一个连接器和一个可选的备份连接器。一个广播组可以有多个这样的连接器对</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="clusters.broadcast-groups">broadcast-group.connector-ref.connector-name (attribute)</link>
+ </entry>
+ <entry>String</entry>
+ <entry>主连接器名 - 必需指定的参数</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="clusters.broadcast-groups">broadcast-group.connector-ref.backup-connector-name (attribute)</link>
+ </entry>
+ <entry>String</entry>
+ <entry>备份连接器名 - 可选的参数</entry>
+ <entry/>
+ </row>
+ <row>
<entry><link linkend="clusters.discovery-groups"
>discovery-groups</link></entry>
<entry>DiscoveryGroup</entry>
- <entry>a list of discovery groups to create</entry>
+ <entry>一组发现组</entry>
<entry/>
</row>
<row>
+ <entry><link linkend="clusters.discovery-groups"
+ >discovery-group.name (属性)</link></entry>
+ <entry>String</entry>
+ <entry>发现组的名字(具有唯一性) - 必需指定的参数</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>
+ <link linkend="clusters.discovery-groups">discovery-group.local-bind-address</link>
+ </entry>
+ <entry>String</entry>
+ <entry>发现组所绑定的本地地址</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry id="configuration.discovery-group.group-address">
+ <link linkend="clusters.discovery-groups">discovery-group.group-address</link>
+ </entry>
+ <entry>String</entry>
+ <entry>发现组监听的广播IP地址 - 必需指定的参数</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry id="configuration.discovery-group.group-port">
+ <link linkend="clusters.discovery-groups">discovery-group.group-port</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>广播组监听的UDP端口 - 必需指定的参数</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry id="configuration.discovery-group.refresh-timeout">
+ <link linkend="clusters.discovery-groups">discovery-group.refresh-timeout</link>
+ </entry>
+ <entry>Integer</entry>
+ <entry>发现组等待更新的时间。如果某个服务器上次广播到达后经过这个时间后还没有收到下次广播,那么
+ 该服务器的连接器对将从列表中删除</entry>
+ <entry>5000 (毫秒)</entry>
+ </row>
+ <row>
<entry><link linkend="diverts">diverts</link></entry>
<entry>Divert</entry>
- <entry>a list of diverts to use</entry>
+ <entry>一组转发器</entry>
<entry/>
</row>
<row>
<entry><link linkend="diverts">divert.name (attribute)</link></entry>
<entry>String</entry>
- <entry>a unique name for the divert - mandatory</entry>
+ <entry>转发器的名字(必需是唯一的) - 必需指定的参数</entry>
<entry/>
</row>
<row>
<entry><link linkend="diverts">divert.routing-name</link></entry>
<entry>String</entry>
- <entry>the routing name for the divert - mandatory</entry>
+ <entry>转发器的路由名称 - 必需指定的参数</entry>
<entry/>
</row>
<row>
<entry><link linkend="diverts">divert.address</link></entry>
<entry>String</entry>
- <entry>the address this divert will divert from - mandatory</entry>
+ <entry>转发器的源地址 - 必需指定的参数</entry>
<entry/>
</row>
<row>
<entry><link linkend="diverts">divert.forwarding-address</link></entry>
<entry>String</entry>
- <entry>the forwarding address for the divert - mandatory</entry>
+ <entry>转发器的转发地址 - 必需指定的参数</entry>
<entry/>
</row>
<row>
<entry><link linkend="diverts">divert.exclusive</link></entry>
<entry>Boolean</entry>
- <entry>is this divert exclusive?</entry>
+ <entry>转发器是否是唯一的</entry>
<entry>false</entry>
</row>
<row>
<entry><link linkend="diverts">divert.filter</link></entry>
<entry>String</entry>
- <entry>an optional core filter expression</entry>
+ <entry>可选的核心过滤器表达式</entry>
<entry>null</entry>
</row>
<row>
<entry><link linkend="diverts"
>divert.transformer-class-name</link></entry>
<entry>String</entry>
- <entry>an optional class name of a transformer</entry>
+ <entry>可选的转换器的名字</entry>
<entry/>
</row>
<row>
<entry><link linkend="predefined.queues">queues</link></entry>
<entry>Queue</entry>
- <entry>a list of pre configured queues to create</entry>
+ <entry>一组预先配置的队列</entry>
<entry/>
</row>
<row>
<entry><link linkend="predefined.queues">queues.name
- (attribute)</link></entry>
+ (属性)</link></entry>
<entry>String</entry>
- <entry>unique name of this queue</entry>
+ <entry>队列独特的名字</entry>
<entry/>
</row>
<row>
<entry><link linkend="predefined.queues">queues.address</link></entry>
<entry>String</entry>
- <entry>address for this queue - mandatory</entry>
+ <entry>队列的地址 - 必需指定的参数</entry>
<entry/>
</row>
<row>
<entry><link linkend="predefined.queues">queues.filter</link></entry>
<entry>String</entry>
- <entry>optional core filter expression for this queue</entry>
+ <entry>队列可选的核心过滤器表达式</entry>
<entry>null</entry>
</row>
<row>
<entry><link linkend="predefined.queues">queues.durable</link></entry>
<entry>Boolean</entry>
- <entry>is this queue durable?</entry>
+ <entry>是否持久队列</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="core-bridges">bridges</link></entry>
<entry>Bridge</entry>
- <entry>a list of bridges to create</entry>
+ <entry>一组桥</entry>
<entry/>
</row>
<row>
<entry><link linkend="core-bridges">bridges.name
- (attribute)</link></entry>
+ (属性)</link></entry>
<entry>String</entry>
- <entry>unique name for this bridge</entry>
+ <entry>桥的独特名字</entry>
<entry/>
</row>
<row>
<entry><link linkend="core-bridges">bridges.queue-name</link></entry>
<entry>String</entry>
- <entry>name of queue that this bridge consumes from - mandatory</entry>
+ <entry>桥接收消息的源队列名 - 必需指定的参数</entry>
<entry/>
</row>
<row>
<entry><link linkend="core-bridges"
>bridges.forwarding-address</link></entry>
<entry>String</entry>
- <entry>address to forward to. If omitted original address is
- used</entry>
+ <entry>桥要转发的地址。如果没有指定则使用原始的地址</entry>
<entry>null</entry>
</row>
<row>
<entry><link linkend="core-bridges">bridges.filter</link></entry>
<entry>String</entry>
- <entry>optional core filter expression</entry>
+ <entry>可选的核心过滤器表达式</entry>
<entry>null</entry>
</row>
<row>
<entry><link linkend="core-bridges"
>bridges.transformer-class-name</link></entry>
<entry>String</entry>
- <entry>optional name of transformer class</entry>
+ <entry>可选的转换器类名</entry>
<entry>null</entry>
</row>
<row>
<entry><link linkend="core-bridges"
>bridges.retry-interval</link></entry>
<entry>Long</entry>
- <entry>period (in ms) between successive retries</entry>
+ <entry>重试的时间间隔(毫秒)</entry>
<entry>2000 ms</entry>
</row>
<row>
<entry><link linkend="core-bridges"
>bridges.retry-interval-multiplier</link></entry>
<entry>Double</entry>
- <entry>multiplier to apply to successive retry intervals</entry>
+ <entry>重试间隔的递增系数</entry>
<entry>1.0</entry>
</row>
<row>
<entry><link linkend="core-bridges"
>bridges.reconnect-attempts</link></entry>
<entry>Integer</entry>
- <entry>maximum number of retry attempts, -1 signifies infinite</entry>
+ <entry>最大重试次数,-1代表无限次</entry>
<entry>-1</entry>
</row>
<row>
<entry><link linkend="core-bridges"
>bridges.failover-on-server-shutdown</link></entry>
<entry>Boolean</entry>
- <entry>should failover be prompted if target server is cleanly
- shutdown?</entry>
+ <entry>如果目标服务器正常关机是否仍进行失效备援</entry>
<entry>false</entry>
</row>
<row>
<entry><link linkend="core-bridges"
>bridges.use-duplicate-detection</link></entry>
<entry>Boolean</entry>
- <entry>should duplicate detection headers be inserted in forwarded
- messages?</entry>
+ <entry>是否在转发的消息中添加重复检测的头</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="core-bridges"
>bridges.discovery-group-ref</link></entry>
<entry>String</entry>
- <entry>name of discovery group used by this bridge</entry>
+ <entry>桥使用的发现组名</entry>
<entry>null</entry>
</row>
<row>
<entry><link linkend="core-bridges">bridges.connector-ref.connector-name
- (attribute)</link></entry>
+ (属性)</link></entry>
<entry>String</entry>
- <entry>name of connector to use for live connection</entry>
+ <entry>主连接的连接器名</entry>
<entry/>
</row>
<row>
<entry><link linkend="core-bridges"
>bridges.connector-ref.backup-connector-name
- (attribute)</link></entry>
+ (属性)</link></entry>
<entry>String</entry>
- <entry>optional name of connector to use for backup connection</entry>
+ <entry>备份连接的连接器名(可选)</entry>
<entry>null</entry>
</row>
<row>
<entry><link linkend="clusters.cluster-connections"
>cluster-connections</link></entry>
<entry>ClusterConnection</entry>
- <entry>a list of cluster connections</entry>
+ <entry>一组集群连接</entry>
<entry/>
</row>
<row>
<entry><link linkend="clusters.cluster-connections"
>cluster-connections.name (attribute)</link></entry>
<entry>String</entry>
- <entry>unique name for this cluster connection</entry>
+ <entry>集群连接的独特名字</entry>
<entry/>
</row>
<row>
<entry><link linkend="clusters.cluster-connections"
>cluster-connections.address</link></entry>
<entry>String</entry>
- <entry>name of address this cluster connection applies to</entry>
+ <entry>集群连接的地址名</entry>
<entry/>
</row>
<row>
<entry><link linkend="clusters.cluster-connections"
>cluster-connections.forward-when-no-consumers</link></entry>
<entry>Boolean</entry>
- <entry>should messages be load balanced if there are no matching
- consumers on target?</entry>
+ <entry>如果目标没有合适的接收者,是否仍然向它分配消息?</entry>
<entry>false</entry>
</row>
<row>
<entry><link linkend="clusters.cluster-connections"
>cluster-connections.max-hops</link></entry>
<entry>Integer</entry>
- <entry>maximum number of hops cluster topology is propagated</entry>
+ <entry>集群拓扑中的最大跳数(hops)</entry>
<entry>1</entry>
</row>
<row>
<entry><link linkend="clusters.cluster-connections"
>cluster-connections.retry-interval</link></entry>
<entry>Long</entry>
- <entry>period (in ms) between successive retries</entry>
+ <entry>集群连接重试的间隔(毫秒)</entry>
<entry>2000</entry>
</row>
<row>
<entry><link linkend="clusters.cluster-connections"
>cluster-connections.use-duplicate-detection</link></entry>
<entry>Boolean</entry>
- <entry>should duplicate detection headers be inserted in forwarded
- messages?</entry>
+ <entry>是否在转发的消息中添加重复检测的消息头</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="clusters.cluster-connections"
>cluster-connections.discovery-group-ref</link></entry>
<entry>String</entry>
- <entry>name of discovery group used by this bridge</entry>
+ <entry>桥所使用的发现组的名字</entry>
<entry>null</entry>
</row>
<row>
<entry><link linkend="clusters.cluster-connections"
>cluster-connections.connector-ref.connector-name
- (attribute)</link></entry>
+ (属性)</link></entry>
<entry>String</entry>
- <entry>name of connector to use for live connection</entry>
+ <entry>主连接的连接器名字</entry>
<entry/>
</row>
<row>
<entry><link linkend="clusters.cluster-connections"
>cluster-connections.connector-ref.backup-connector-name
- (attribute)</link></entry>
+ (属性)</link></entry>
<entry>String</entry>
- <entry>optional name of connector to use for backup connection</entry>
+ <entry>可选的备份连接所使用的连接器名字</entry>
<entry>null</entry>
</row>
<row>
<entry><link linkend="security.settings.roles"
>security-settings</link></entry>
<entry>SecuritySetting</entry>
- <entry>a list of security settings</entry>
+ <entry>一组安全设置</entry>
<entry/>
</row>
<row>
<entry><link linkend="security.settings.roles">security-settings.match
- (attribute)</link></entry>
+ (属性)</link></entry>
<entry>String</entry>
- <entry>the string to use for matching security against an
- address</entry>
+ <entry>安全所应用的地址匹配字符串</entry>
<entry/>
</row>
<row>
<entry><link linkend="security.settings.roles"
>security-settings.permission</link></entry>
- <entry>Security Permission</entry>
- <entry>a permision to add to the address</entry>
+ <entry>安全许可</entry>
+ <entry>地址的一个许可</entry>
<entry/>
</row>
<row>
<entry><link linkend="security.settings.roles"
>security-settings.permission.type (attribute)</link></entry>
- <entry>Permission Type</entry>
- <entry>the type of permission</entry>
+ <entry>许可类型</entry>
+ <entry>许可的类型</entry>
<entry/>
</row>
<row>
<entry><link linkend="security.settings.roles"
>security-settings.permission.roles (attribute)</link></entry>
<entry>Roles</entry>
- <entry>a comma-separated list of roles to apply the permission
- to</entry>
+ <entry>以逗号分隔的一组角色,这些角色将拥有相应的许可</entry>
<entry/>
</row>
<row>
<entry><link linkend="queue-attributes.address-settings"
>address-settings</link></entry>
<entry>AddressSetting</entry>
- <entry>a list of address settings</entry>
+ <entry>一组地址设置</entry>
<entry/>
</row>
<row>
<entry><link linkend="undelivered-messages.configuring"
>address-settings.dead-letter-address</link></entry>
<entry>String</entry>
- <entry>the address to send dead messages too</entry>
+ <entry>死消息所发往的地址</entry>
<entry/>
</row>
<row>
<entry><link linkend="undelivered-messages.configuring"
>address-settings.max-delivery-attempts</link></entry>
<entry>Integer</entry>
- <entry>how many times to attempt to deliver a message before sending to
- dead letter address</entry>
+ <entry>发往死信地址之前所尝试的传递次数</entry>
<entry>10</entry>
</row>
<row>
<entry><link linkend="message-expiry.configuring"
>address-settings.expiry-address</link></entry>
<entry>String</entry>
- <entry>the address to send expired messages too</entry>
+ <entry>过期消息所发往的地址</entry>
<entry/>
</row>
<row>
<entry><link linkend="undelivered-messages.delay"
>address-settings.redelivery-delay</link></entry>
<entry>Long</entry>
- <entry>the time (in ms) to wait before redelivering a cancelled
- message.</entry>
+ <entry>重新传递一个取消的消息前所等待的时间(毫秒)</entry>
<entry>0</entry>
</row>
<row>
<entry><link linkend="last-value-queues"
>address-settings.last-value-queue</link></entry>
<entry>boolean</entry>
- <entry>whether to treat the queue as a last value queue</entry>
+ <entry>队列是否是一个最新值队列</entry>
<entry>false</entry>
</row>
<row>
<entry><link linkend="paging"
>address-settings.page-size-bytes</link></entry>
<entry>Long</entry>
- <entry>the page size (in bytes) to use for an address</entry>
+ <entry>一个地址的分页的大小(字节)</entry>
<entry>10 * 1024 * 1024</entry>
</row>
<row>
<entry><link linkend="paging"
>address-settings.max-size-bytes</link></entry>
<entry>Long</entry>
- <entry>the maximum size (in bytes) to use in paging for an
- address</entry>
+ <entry>地址的分页转存的最大值(字节)</entry>
<entry>-1</entry>
</row>
<row>
<entry><link linkend="clusters.message-redistribution"
>address-settings.redistribution-delay</link></entry>
<entry>Long</entry>
- <entry>how long (in ms) to wait after the last consumer is closed on a
- queue before redistributing messages.</entry>
+ <entry>队列最后一个接收者关闭后需要等待多长时间再将消息重新分配(毫秒)</entry>
<entry>-1</entry>
</row>
</tbody>
@@ -781,10 +926,9 @@
</section>
<section>
<title>hornetq-jms.xml</title>
- <para>This is the configuration file used by the server side JMS service to load JMS
- Queues, Topics and Connection Factories.</para>
+ <para>该文件是服务器端JMS服务所使用的,用来装载JMS队列,话题和连接工厂。</para>
<table frame="topbot" border="2">
- <title>JMS Server Configuration</title>
+ <title>JMS服务器配置</title>
<tgroup cols="4">
<colspec colname="c1" colnum="1"/>
<colspec colname="c2" colnum="2"/>
@@ -792,308 +936,328 @@
<colspec colname="c4" colnum="4"/>
<thead>
<row>
- <entry>Element Name</entry>
- <entry>Element Type</entry>
- <entry>Description</entry>
- <entry>Default</entry>
+ <entry>名称</entry>
+ <entry>类型</entry>
+ <entry>说明</entry>
+ <entry>默认值</entry>
</row>
</thead>
<tbody>
<row>
- <entry><link linkend="using-jms.server.configuration"
- >connection-factory</link></entry>
+ <entry>
+ <link linkend="using-jms.server.configuration">connection-factory</link>
+ </entry>
<entry>ConnectionFactory</entry>
- <entry>a list of connection factories to create and add to JNDI</entry>
+ <entry>一组注册到JNDI的连接工厂</entry>
<entry/>
</row>
<row>
- <entry><link linkend="message-grouping.jmsconfigure"
- >connection-factory.auto-group</link></entry>
+ <entry id="configuration.connection-factory.auto-group">
+ <link linkend="message-grouping.jmsconfigure">connection-factory.auto-group</link>
+ </entry>
<entry>Boolean</entry>
- <entry>whether or not message grouping is automatically used</entry>
+ <entry>是否自动使用消息组</entry>
<entry>false</entry>
</row>
<row>
- <entry><link linkend="clusters.static.servers"
- >connection-factory.connectors</link></entry>
+ <entry><link linkend="clusters.static.servers">connection-factory.connectors</link>
+ </entry>
<entry>String</entry>
- <entry>A list of connectors used bu the connection factory</entry>
+ <entry>一组供连接工厂使用的连接器</entry>
<entry />
</row>
<row>
<entry><link linkend="clusters.static.servers"
- >connection-factory.connectors.connector-ref.connector-name (attribute)</link></entry>
+ >connection-factory.connectors.connector-ref.connector-name (属性)</link>
+ </entry>
<entry>String</entry>
- <entry>Name of the connector to connect to the live server</entry>
+ <entry>连接主服务器的连接器名</entry>
<entry />
</row>
<row>
<entry><link linkend="clusters.static.servers"
- >connection-factory.connectors.connector-ref.backup-connector-name (attribute)</link></entry>
+ >connection-factory.connectors.connector-ref.backup-connector-name (attribute)</link>
+ </entry>
<entry>String</entry>
- <entry>Name of the connector to connect to the backup server</entry>
+ <entry>连接备份服务器的连接器名</entry>
<entry />
</row>
<row>
<entry><link linkend="clusters-discovery.groups.clientside"
- >connection-factory.discovery-group-ref.discovery-group-name (attribute)</link></entry>
+ >connection-factory.discovery-group-ref.discovery-group-name (属性)</link>
+ </entry>
<entry>String</entry>
- <entry>Name of discovery group used by this connection factory</entry>
+ <entry>连接工厂的发现组名</entry>
<entry />
</row>
<row>
- <entry><link linkend="clusters-discovery.groups.clientside"
- >connection-factory.discovery-initial-wait-timeout</link></entry>
+ <entry id="configuration.connection-factory.discovery-initial-wait-timeout">
+ <link linkend="clusters-discovery.groups.clientside"
+ >connection-factory.discovery-initial-wait-timeout</link>
+ </entry>
<entry>Long</entry>
- <entry>the initial time to wait (in ms) for discovery groups to wait for
- broadcasts</entry>
- <entry>2000</entry>
- </row>
+ <entry>发现组首次等待广播的时间</entry>
+ <entry>10000</entry>
+ </row>
<row>
- <entry><link linkend="send-guarantees.nontrans.acks"
- >connection-factory.block-on-acknowledge</link></entry>
+ <entry id="configuration.connection-factory.block-on-acknowledge">
+ <link linkend="send-guarantees.nontrans.acks">connection-factory.block-on-acknowledge</link>
+ </entry>
<entry>Boolean</entry>
- <entry>whether or not messages are acknowledged synchronously</entry>
+ <entry>消息是否以同步方式通知</entry>
<entry>false</entry>
</row>
<row>
- <entry><link linkend="non-transactional-sends"
- >connection-factory.block-on-non-durable-send</link></entry>
+ <entry id="configuration.connection-factory.block-on-non-durable-send">
+ <link linkend="non-transactional-sends">connection-factory.block-on-non-durable-send</link>
+ </entry>
<entry>Boolean</entry>
- <entry>whether or not non-durable messages are sent
- synchronously</entry>
+ <entry>是否以同步方式发送非持久消息</entry>
<entry>false</entry>
</row>
<row>
- <entry><link linkend="non-transactional-sends"
- >connection-factory.block-on-durable-send</link></entry>
+ <entry id="configuration.connection-factory.block-on-durable-send">
+ <link linkend="non-transactional-sends">connection-factory.block-on-durable-send</link>
+ </entry>
<entry>Boolean</entry>
- <entry>whether or not durable messages are sent synchronously</entry>
+ <entry>是否以同步方式发送持久消息</entry>
<entry>true</entry>
</row>
<row>
- <entry>connection-factory.call-timeout</entry>
+ <entry id="configuration.connection-factory.call-timeout">connection-factory.call-timeout</entry>
<entry>Long</entry>
- <entry>the timeout (in ms) for remote calls</entry>
+ <entry>远程调用超时时间(毫秒)</entry>
<entry>30000</entry>
</row>
<row>
- <entry><link linkend="dead.connections"
- >connection-factory.client-failure-check-period</link></entry>
+ <entry id="configuration.connection-factory.client-failure-check-period">
+ <link linkend="dead.connections">connection-factory.client-failure-check-period</link>
+ </entry>
<entry>Long</entry>
- <entry>the period (in ms) after which the client will consider the
- connection failed after not receiving packets from the
- server</entry>
+ <entry>客户端如果在这个时间内没有收到服务器数据包,将认为连接出现故障。</entry>
<entry>5000</entry>
</row>
<row>
- <entry><link linkend="using-jms.clientid"
- >connection-factory.client-id</link></entry>
+ <entry id="configuration.connection-factory.client-id">
+ <link linkend="using-jms.clientid">connection-factory.client-id</link>
+ </entry>
<entry>String</entry>
- <entry>the pre-configured client ID for the connection factory</entry>
+ <entry>连接工厂预先配置的客户ID</entry>
<entry>null</entry>
</row>
<row>
- <entry><link linkend="clusters.client.loadbalancing"
- >connection-factory.connection-load-balancing-policy-class-name</link></entry>
+ <entry id="configuration.connection-factory.connection-load-balancing-policy-class-name">
+ <link linkend="clusters.client.loadbalancing">
+ connection-factory.connection-load-balancing-policy-class-name</link>
+ </entry>
<entry>String</entry>
- <entry>the name of the load balancing class</entry>
+ <entry>负载均衡类名</entry>
<entry>org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy</entry>
</row>
<row>
- <entry><link linkend="dead.connections"
- >connection-factory.connection-ttl</link></entry>
+ <entry id="configuration.connection-factory.connection-ttl">
+ <link linkend="dead.connections">connection-factory.connection-ttl</link>
+ </entry>
<entry>Long</entry>
- <entry>the time to live (in ms) for connections</entry>
+ <entry>连接的存活时间(毫秒)</entry>
<entry>1 * 60000</entry>
</row>
<row>
- <entry><link linkend="flow-control.rate.core.api"
- >connection-factory.consumer-max-rate</link></entry>
+ <entry id="configuration.connection-factory.consumer-max-rate">
+ <link linkend="flow-control.rate.core.api">connection-factory.consumer-max-rate</link></entry>
<entry>Integer</entry>
- <entry>the fastest rate a consumer may consume messages per
- second</entry>
+ <entry>接收者每秒钟接收消息的最快速度</entry>
<entry>-1</entry>
</row>
<row>
- <entry><link linkend="flow-control.core.api"
- >connection-factory.consumer-window-size</link></entry>
+ <entry id="configuration.connection-factory.consumer-window-size">
+ <link linkend="flow-control.core.api">connection-factory.consumer-window-size</link></entry>
<entry>Integer</entry>
- <entry>the window size (in bytes) for consumer flow control</entry>
+ <entry>接收者流控制容器大小(字节)</entry>
<entry>1024 * 1024</entry>
</row>
<row>
- <entry><link linkend="using-jms.dupsokbatchsize"
- >connection-factory.dups-ok-batch-size</link></entry>
+ <entry id="configuration.connection-factory.dups-ok-batch-size">
+ <link linkend="using-jms.dupsokbatchsize">connection-factory.dups-ok-batch-size</link></entry>
<entry>Integer</entry>
- <entry>the batch size (in bytes) between acknowledgements when using
- DUPS_OK_ACKNOWLEDGE mode</entry>
+ <entry>在DUPS_OK_ACKNOWLEDGE模式下批量通知的大小(字节)</entry>
<entry>1024 * 1024</entry>
</row>
<row>
<entry><link linkend="ha.automatic.failover"
- >connection-factory.failover-on-server-shutdown</link></entry>
+ >connection-factory.failover-on-initial-connection</link></entry>
<entry>Boolean</entry>
- <entry>whether or not to failover on server shutdown</entry>
+ <entry>如果首次连接主服务器失败是否失效备援连接到备份服务器</entry>
<entry>false</entry>
</row>
<row>
- <entry><link linkend="large-messages.core.config"
- >connection-factory.min-large-message-size</link></entry>
+ <entry id="configuration.connection-factory.failover-on-server-shutdown">
+ <link linkend="ha.automatic.failover">connection-factory.failover-on-server-shutdown</link></entry>
+ <entry>Boolean</entry>
+ <entry>在服务器停机时是否进行失效备援</entry>
+ <entry>false</entry>
+ </row>
+ <row>
+ <entry id="configuration.connection-factory.min-large-message-size">
+ <link linkend="large-messages.core.config">connection-factory.min-large-message-size</link></entry>
<entry>Integer</entry>
- <entry>the size (in bytes) before a message is treated as large </entry>
+ <entry>大消息的最小值,大小超过该值的按大消息处理</entry>
<entry>100 * 1024</entry>
</row>
<row>
<entry><link linkend="large-messages.cache.client"
>connection-factory.cache-large-message-client</link></entry>
<entry>Boolean</entry>
- <entry>If true clients using this connection factory will hold the large
- message body on temporary files.</entry>
+ <entry>true表示这个连接工厂会将大消息保存在临时文件中</entry>
<entry>false</entry>
</row>
<row>
- <entry><link linkend="pre-acknowledge.configure"
- >connection-factory.pre-acknowledge</link></entry>
+ <entry id="configuration.connection-factory.pre-acknowledge">
+ <link linkend="pre-acknowledge.configure">connection-factory.pre-acknowledge</link></entry>
<entry>Boolean</entry>
- <entry>whether messages are pre acknowledged by the server before
- sending</entry>
+ <entry>是否在消息发送之前提前通知</entry>
<entry>false</entry>
</row>
<row>
- <entry><link linkend="flow-control.producer.rate.core.api"
- >connection-factory.producer-max-rate</link></entry>
+ <entry id="configuration.connection-factory.producer-max-rate">
+ <link linkend="flow-control.producer.rate.core.api">connection-factory.producer-max-rate</link></entry>
<entry>Integer</entry>
- <entry>the maximum rate of messages per second that can be sent</entry>
+ <entry>发送消息的最大速度</entry>
<entry>-1</entry>
</row>
<row>
<entry><link linkend="client-reconnection"
>connection-factory.producer-window-size</link></entry>
<entry>Integer</entry>
- <entry>the window size in bytes for producers sending messages</entry>
+ <entry>发送者发送消息的窗口大小</entry>
<entry>1024 * 1024</entry>
</row>
<row>
- <entry><link linkend="client-reconnection"
- >connection-factory.confirmation-window-size</link></entry>
+ <entry id="configuration.connection-factory.confirmation-window-size">
+ <link linkend="client-reconnection">connection-factory.confirmation-window-size</link>
+ </entry>
<entry>Integer</entry>
- <entry>the window size (in bytes) for reattachment confirmations</entry>
+ <entry>会话恢复的确认窗口大小(字节)</entry>
<entry>1024 * 1024</entry>
</row>
<row>
- <entry><link linkend="client-reconnection"
- >connection-factory.reconnect-attempts</link></entry>
+ <entry id="configuration.connection-factory.reconnect-attempts">
+ <link linkend="client-reconnection">connection-factory.reconnect-attempts</link>
+ </entry>
<entry>Integer</entry>
- <entry>maximum number of retry attempts, -1 signifies infinite</entry>
+ <entry>重试的最大次数, -1 表示无限次</entry>
<entry>0</entry>
</row>
<row>
- <entry><link linkend="client-reconnection"
- >connection-factory.retry-interval</link></entry>
+ <entry id="configuration.connection-factory.retry-interval">
+ <link linkend="client-reconnection">connection-factory.retry-interval</link>
+ </entry>
<entry>Long</entry>
- <entry>the time (in ms) to retry a connection after failing</entry>
+ <entry>每次重试的时间间隔(毫秒)</entry>
<entry>2000</entry>
</row>
<row>
- <entry><link linkend="client-reconnection"
- >connection-factory.retry-interval-multiplier</link></entry>
+ <entry id="configuration.connection-factory.retry-interval-multiplier">
+ <link linkend="client-reconnection">connection-factory.retry-interval-multiplier</link>
+ </entry>
<entry>Double</entry>
- <entry>multiplier to apply to successive retry intervals</entry>
- <entry>1d</entry>
+ <entry>重试间隔时间的递增系数</entry>
+ <entry>1.0</entry>
</row>
<row>
<entry><link linkend="client-reconnection"
>connection-factory.max-retry-interval</link></entry>
<entry>Integer</entry>
- <entry>The maximum retry interval in the case a retry-interval-multiplier has been specified</entry>
+ <entry>最大重试间隔。</entry>
<entry>2000</entry>
</row>
<row>
- <entry><link linkend="thread-pooling.client.side"
- >connection-factory.scheduled-thread-pool-max-size</link></entry>
+ <entry id="configuration.connection-factory.scheduled-thread-pool-max-size">
+ <link linkend="thread-pooling.client.side">connection-factory.scheduled-thread-pool-max-size</link>
+ </entry>
<entry>Integer</entry>
- <entry>the size of the scheduled thread pool</entry>
+ <entry><emphasis>可计划线程</emphasis>池的大小</entry>
<entry>5</entry>
</row>
<row>
- <entry><link linkend="thread-pooling.client.side"
- >connection-factory.thread-pool-max-size</link></entry>
+ <entry id="configuration.connection-factory.thread-pool-max-size">
+ <link linkend="thread-pooling.client.side">connection-factory.thread-pool-max-size</link>
+ </entry>
<entry>Integer</entry>
- <entry>the size of the thread pool</entry>
+ <entry>线程池大小</entry>
<entry>-1</entry>
</row>
<row>
- <entry><link linkend="using-jms.txbatchsize"
- >connection-factory.transaction-batch-size</link></entry>
+ <entry id="configuration.connection-factory.transaction-batch-size">
+ <link linkend="using-jms.txbatchsize">
+ connection-factory.transaction-batch-size</link>
+ </entry>
<entry>Integer</entry>
- <entry>the batch size (in bytes) between acknowledgements when using a
- transactional session</entry>
+ <entry>使用事务性会话时发送通知的批量大小(字节)</entry>
<entry>1024 * 1024</entry>
</row>
<row>
- <entry><link linkend="thread-pooling.client.side"
- >connection-factory.use-global-pools</link></entry>
+ <entry id="configuration.connection-factory.use-global-pools">
+ <link linkend="thread-pooling.client.side">connection-factory.use-global-pools</link>
+ </entry>
<entry>Boolean</entry>
- <entry>whether or not to use a global thread pool for threads</entry>
+ <entry>是否使用全局线程池</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="using-jms.server.configuration"
>queue</link></entry>
<entry>Queue</entry>
- <entry>a queue to create and add to JNDI</entry>
+ <entry>创建并注册到JNDI的队列</entry>
<entry/>
</row>
<row>
<entry><link linkend="using-jms.server.configuration">queue.name
- (attribute)</link></entry>
+ (属性)</link></entry>
<entry>String</entry>
- <entry>unique name of the queue</entry>
+ <entry>队列的唯一名字</entry>
<entry/>
</row>
<row>
<entry><link linkend="using-jms.server.configuration"
>queue.entry</link></entry>
<entry>String</entry>
- <entry>context where the queue will be bound in JNDI (there can be
- many)</entry>
+ <entry>队列的JNDI的上下文(context)。一个队列可以有多个JNDI的上下文</entry>
<entry/>
</row>
<row>
<entry><link linkend="using-jms.server.configuration"
>queue.durable</link></entry>
<entry>Boolean</entry>
- <entry>is the queue durable?</entry>
+ <entry>是否持久队列</entry>
<entry>true</entry>
</row>
<row>
<entry><link linkend="using-jms.server.configuration"
>queue.filter</link></entry>
<entry>String</entry>
- <entry>optional filter expression for the queue</entry>
+ <entry>可选的队列过滤器表达式</entry>
<entry/>
</row>
<row>
<entry><link linkend="using-jms.server.configuration"
>topic</link></entry>
<entry>Topic</entry>
- <entry>a topic to create and add to JNDI</entry>
+ <entry>创建并注册到JNDI的话题</entry>
<entry/>
</row>
<row>
<entry><link linkend="using-jms.server.configuration">topic.name
- (attribute)</link></entry>
+ (属性)</link></entry>
<entry>String</entry>
- <entry>unique name of the topic</entry>
+ <entry>话题的唯一名</entry>
<entry/>
</row>
<row>
<entry><link linkend="using-jms.server.configuration"
>topic.entry</link></entry>
<entry>String</entry>
- <entry>context where the topic will be bound in JNDI (there can be
- many)</entry>
+ <entry>话题的JNDI上下文(context)。一个话题可以有多个上下文。</entry>
<entry/>
</row>
</tbody>
14 years, 10 months
JBoss hornetq SVN: r9207 - trunk/src/main/org/hornetq/core/cluster/impl.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2010-05-07 05:03:55 -0400 (Fri, 07 May 2010)
New Revision: 9207
Modified:
trunk/src/main/org/hornetq/core/cluster/impl/DiscoveryGroupImpl.java
Log:
https://jira.jboss.org/jira/browse/HORNETQ-383: Unreachable network prevents HornetQ server with discovery group to start
* log an error if the discovery group can not be started
Modified: trunk/src/main/org/hornetq/core/cluster/impl/DiscoveryGroupImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/cluster/impl/DiscoveryGroupImpl.java 2010-05-07 05:58:16 UTC (rev 9206)
+++ trunk/src/main/org/hornetq/core/cluster/impl/DiscoveryGroupImpl.java 2010-05-07 09:03:55 UTC (rev 9207)
@@ -13,10 +13,10 @@
package org.hornetq.core.cluster.impl;
+import java.io.IOException;
import java.io.InterruptedIOException;
import java.net.DatagramPacket;
import java.net.InetAddress;
-import java.net.InetSocketAddress;
import java.net.MulticastSocket;
import java.util.ArrayList;
import java.util.HashMap;
@@ -114,17 +114,25 @@
return;
}
- socket = new MulticastSocket(groupPort);
+ try {
+ socket = new MulticastSocket(groupPort);
- if (localBindAddress != null)
+ if (localBindAddress != null)
+ {
+ socket.setInterface(localBindAddress);
+ }
+
+ socket.joinGroup(groupAddress);
+
+ socket.setSoTimeout(DiscoveryGroupImpl.SOCKET_TIMEOUT);
+ }
+ catch (IOException e)
{
- socket.setInterface(localBindAddress);
+ log.error("Failed to create discovery group socket", e);
+
+ return;
}
-
- socket.joinGroup(groupAddress);
-
- socket.setSoTimeout(DiscoveryGroupImpl.SOCKET_TIMEOUT);
-
+
started = true;
thread = new Thread(this, "hornetq-discovery-group-thread-" + name);
14 years, 10 months
JBoss hornetq SVN: r9206 - branches/HnetQ_323_cn/docs/user-manual/zh.
by do-not-reply@jboss.org
Author: gaohoward
Date: 2010-05-07 01:58:16 -0400 (Fri, 07 May 2010)
New Revision: 9206
Modified:
branches/HnetQ_323_cn/docs/user-manual/zh/duplicate-detection.xml
Log:
done
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/duplicate-detection.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/duplicate-detection.xml 2010-05-06 16:18:59 UTC (rev 9205)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/duplicate-detection.xml 2010-05-07 05:58:16 UTC (rev 9206)
@@ -19,58 +19,39 @@
<!-- ============================================================================= -->
<chapter id="duplicate-detection">
- <title>Duplicate Message Detection</title>
- <para>HornetQ includes powerful automatic duplicate message detection, filtering out
- duplicate messages without you having to code your own fiddly duplicate detection logic at
- the application level. This chapter will explain what duplicate detection is, how HornetQ
- uses it and how and where to configure it.</para>
- <para>When sending messages from a client to a server, or indeed from a server to another
- server, if the target server or connection fails sometime after sending the message, but
- before the sender receives a response that the send (or commit) was processed successfully
- then the sender cannot know for sure if the message was sent successfully to the
- address.</para>
- <para>If the target server or connection failed after the send was received and processed but
- before the response was sent back then the message will have been sent to the address
- successfully, but if the target server or connection failed before the send was received and
- finished processing then it will not have been sent to the address successfully. From the
- senders point of view it's not possible to distinguish these two cases.</para>
- <para>When the server recovers this leaves the client in a difficult situation. It knows the
- target server failed, but it does not know if the last message reached its destination ok.
- If it decides to resend the last message, then that could result in a duplicate message
- being sent to the address. If each message was an order or a trade then this could result in
- the order being fulfilled twice or the trade being double booked. This is clearly not a
- desirable situation.</para>
- <para>Sending the message(s) in a transaction does not help out either. If the server or
- connection fails while the transaction commit is being processed it is also indeterminate
- whether the transaction was successfully committed or not!</para>
- <para>To solve these issues HornetQ provides automatic duplicate messages detection for
- messages sent to addresses.</para>
+ <title>重复消息检测</title>
+ <para>HornetQ具有强大的自动检测重复消息的功能。应用层无需实现复杂的重复检测。本章解释了什么是重复检测,它
+ 在HornetQ中如何工作的,以及如何进行配置。</para>
+ <para>当客户端向服务器端发送消息时,或者从一个服务器向另一个服务器传递消息时,如果消息发送后目标服务器或者
+ 连接出现故障,导致发送一方没有收到发送成功的确认信息,发送方因此就无法确定消息是否已经成功发送到了目标地
+ 址。</para>
+ <para>如果上述的故障发生在消息被成功接收并处理后,但是在向发送方返回功能确认信息之前,那么消息实际上可以到达
+ 其目的地址;如果故障发生在消息的接收及处理过程中,则消息不会到达其目的地址。从发送方的角度看,它无法区分
+ 这两种情况。</para>
+ <para>当服务器恢复后,客户端面临的困难的选择。它知道服务器出了故障,但是不知道刚刚发送的消息是否成功到达目的
+ 地址。如果它重新发送这个消息,就有可能造成消息的重复。如果这个消息是一个订单的话,重复发送消息就会产生两
+ 个相同的订单,这当然不是所希望的結果。</para>
+ <para>将消息的发送放到一个事务中也不能解决这个问题。如果在事务提交的过程中发生故障,同样不能确定这个事务是否提交
+ 成功!</para>
+ <para>为了解决这个问题,HornetQ提供了自动消息重复检测功能。</para>
<section>
- <title>Using Duplicate Detection for Message Sending</title>
- <para>Enabling duplicate message detection for sent messages is simple: you just need to set
- a special property on the message to a unique value. You can create the value however
- you like, as long as it is unique. When the target server receives the message it will
- check if that property is set, if it is, then it will check in its in memory cache if it
- has already received a message with that value of the header. If it has received a
- message with the same value before then it will ignore the message.</para>
+ <title>在消息发送中应用重复检测</title>
+ <para>在消息发送中启用重复检测功能十分简单:你只需将消息的一个特殊属性设置一个唯一值。你可以用任意方法来
+ 计算这个值,但是要保证它的唯一性。当目标服务器接收到这个消息时,它会检查这个属性是否被设置,如果设置了,
+ 就检查内存缓存中是否已经接收到了相同值的消息。如果发现已经接收过具有相同属性值的消息,它将忽略这个消息。</para>
<note>
- <para>Using duplicate detection to move messages between nodes can give you the same
- <emphasis>once and only once</emphasis> delivery guarantees as if you were using
- an XA transaction to consume messages from source and send them to the target, but
- with less overhead and much easier configuration than using XA.</para>
+ <para>在节点之间的消息传递使用重复消息检测可以保证<emphasis>一次且只一次</emphasis>的传递,和使用
+ XA事务接收消息的效果一样,但是比XA消耗的资源要少,并且更容易。</para>
</note>
- <para>If you're sending messages in a transaction then you don't have to set the property
- for <emphasis>every</emphasis> message you send in that transaction, you only need to
- set it once in the transaction. If the server detects a duplicate message for any
- message in the transaction, then it will ignore the entire transaction.</para>
- <para>The name of the property that you set is given by the value of <literal
- >org.hornetq.core.message.impl.HDR_DUPLICATE_DETECTION_ID</literal>, which
- is <literal>_HQ_DUPL_ID</literal></para>
- <para>The value of the property can be of type <literal>byte[]</literal> or <literal
- >SimpleString</literal> if you're using the core API. If you're using JMS it must be
- a <literal>String</literal>, and its value should be unique. An easy way of generating
- a unique id is by generating a UUID.</para>
- <para>Here's an example of setting the property using the core API:</para>
+ <para>如果是在一个事务中发送消息,则只需要设置其中一个消息的属性值。在服务器端如果服务器检测到一个事务中某一个
+ 消息重复,则会忽略整个事务。</para>
+ <para>这个属性的名称由<literal
+ >org.hornetq.api.core.HDR_DUPLICATE_DETECTION_ID</literal>定义,即:
+ <literal>_HQ_DUPL_ID</literal>。</para>
+ <para>该属性的值可以是<literal>byte[]</literal>类型或<literal
+ >SimpleString</literal>类型(核心接口)。如果使用JMS,它必须是<literal>String</literal>
+ 类型。它的值一定是唯一的。一个简单的方法是使用UUID。</para>
+ <para>下面是一个使用核心接口设置这个属性的例子:</para>
<programlisting>
...
@@ -82,7 +63,7 @@
...
</programlisting>
- <para>And here's an example using the JMS API:</para>
+ <para>下面则是一个使用JMS的例子:</para>
<programlisting>
...
@@ -96,59 +77,44 @@
</programlisting>
</section>
<section id="duplicate.id.cache">
- <title>Configuring the Duplicate ID Cache</title>
- <para>The server maintains caches of received values of the <literal
- >org.hornetq.core.message.impl.HDR_DUPLICATE_DETECTION_ID</literal> property
- sent to each address. Each address has its own distinct cache.</para>
- <para>The cache is a circular fixed size cache. If the cache has a maximum size of <literal
- >n</literal> elements, then the <literal>n + 1</literal>th id stored will overwrite
- the <literal>0</literal>th element in the cache.</para>
- <para>The maximum size of the cache is configured by the parameter <literal
- >id-cache-size</literal> in <literal>hornetq-configuration.xml</literal>, the default
- value is <literal>2000</literal> elements.</para>
- <para>The caches can also be configured to persist to disk or not. This is configured by the
- parameter <literal>persist-id-cache</literal>, also in <literal
- >hornetq-configuration.xml</literal>. If this is set to <literal>true</literal> then
- each id will be persisted to permanent storage as they are received. The default value
- for this parameter is <literal>true</literal>.</para>
+ <title>配置重复ID缓存</title>
+ <para>服务器缓存中保存接收到的消息的<literal
+ >org.hornetq.core.message.impl.HDR_DUPLICATE_DETECTION_ID</literal>属性值。每个地址有
+ 单独的缓存。</para>
+ <para>缓存的大小是固定的,循环使用。如果缓存的最大可以存放<literal
+ >n</literal>条记录,那么<literal>n + 1</literal>条记录将会覆盖缓存中的第<literal>0</literal>
+ 条记录。</para>
+ <para>缓存的最大容量在文件<literal>hornetq-configuration.xml</literal>中配置,参数是<literal
+ >id-cache-size</literal>。默认值是<literal>2000</literal>条记录。</para>
+ <para>在文件<literal>hornetq-configuration.xml</literal>中还可以配置将缓存持久化到磁盘。相应的参数
+ 是<literal>persist-id-cache</literal>。如果设为<literal>true</literal>,则每加入一个id就将
+ 它同时保存到磁盘中。默认值是<literal>true</literal>。</para>
<note>
- <para>When choosing a size of the duplicate id cache be sure to set it to a larger
- enough size so if you resend messages all the previously sent ones are in the cache
- not having been overwritten.</para>
+ <para>注意在设置缓存大小时,一定要保证缓存能保存足夠数量的记录,当消息被重新发送时,之前发送的ID不被
+ 覆盖掉。</para>
</note>
</section>
<section>
- <title>Duplicate Detection and Bridges</title>
- <para>Core bridges can be configured to automatically add a unique duplicate id value (if there
- isn't already one in the message) before forwarding the message to it's target. This
- ensures that if the target server crashes or the connection is interrupted and the
- bridge resends the message, then if it has already been received by the target server,
- it will be ignored.</para>
- <para>To configure a core bridge to add the duplicate id header, simply set the <parameter
- >use-duplicate-detection</parameter> to <literal>true</literal> when configuring a
- bridge in <literal>hornetq-configuration.xml</literal>.</para>
- <para>The default value for this parameter is <literal>true</literal>.</para>
- <para>For more information on core bridges and how to configure them, please see
- <xref linkend="core-bridges" />.</para>
+ <title>桥与重复检测</title>
+ <para>核心桥可以通过配置在将消息发向目的服务器之前自动向消息中添加唯一的id(如果消息中还没有的话)。这样
+ 如果目的服务器发生故障,核心桥在重新发送消息时,目的服务器就可以自动检测重复的消息,发现重复消息即丢弃。</para>
+ <para>要配置核心桥的自动添加id的功能,需要在<literal>hornetq-configuration.xml</literal>中桥的配置
+ 里将<parameter>use-duplicate-detection</parameter>参数设为<literal>true</literal>。</para>
+ <para>这个参数的默认值是<literal>true</literal>。</para>
+ <para>关于核心桥的配置和使用,参见<xref linkend="core-bridges" />。</para>
</section>
<section>
- <title>Duplicate Detection and Cluster Connections</title>
- <para>Cluster connections internally use core bridges to move messages reliable between
- nodes of the cluster. Consequently they can also be configured to insert the duplicate
- id header for each message they move using their internal bridges.</para>
- <para>To configure a cluster connection to add the duplicate id header, simply set the
- <parameter>use-duplicate-detection</parameter> to <literal>true</literal> when
- configuring a cluster connection in <literal>hornetq-configuration.xml</literal>.</para>
- <para>The default value for this parameter is <literal>true</literal>.</para>
- <para>For more information on cluster connections and how to configure them, please see <xref
- linkend="clusters"/>.</para>
+ <title>重复检测与集群连接</title>
+ <para>集群连接内部使用核心桥在节点间可靠地移动消息,因此它们的核心桥也可以配置自动添加id的功能。</para>
+ <para>配置的方法是在<literal>hornetq-configuration.xml</literal>文件中将集群连接的
+ <parameter>use-duplicate-detection</parameter>参数设为<literal>true</literal>。</para>
+ <para>这个参数的默认值是<literal>true</literal>。</para>
+ <para>有关集群连接配置的更多信息,请参见<xref linkend="clusters"/>。</para>
</section>
<section>
- <title>Duplicate Detection and Paging</title>
- <para>HornetQ also uses duplicate detection when paging messages to storage. This is
- so when a message is depaged from storage and server failure occurs, we do not end up
- depaging the message more than once which could result in duplicate delivery.</para>
- <para>For more information on paging and how to configure it, please see <xref
- linkend="paging" />.</para>
+ <title>分页转存与重复检测</title>
+ <para>HornetQ在将消息进行分页转存中也使用了重复检测。当分页转存消息被从磁盘中读回到内存时,如果服务器发生故障,
+ 重复检测可以避免在这一过程中有消息被重复读入,即避免了消息的重复传递。</para>
+ <para>关于分页转存的配置信息请参见<xref linkend="paging" />。</para>
</section>
</chapter>
14 years, 10 months
JBoss hornetq SVN: r9205 - trunk/docs/user-manual/en.
by do-not-reply@jboss.org
Author: timfox
Date: 2010-05-06 12:18:59 -0400 (Thu, 06 May 2010)
New Revision: 9205
Modified:
trunk/docs/user-manual/en/perf-tuning.xml
trunk/docs/user-manual/en/wildcard-routing.xml
Log:
a couple of tweaks to docs
Modified: trunk/docs/user-manual/en/perf-tuning.xml
===================================================================
--- trunk/docs/user-manual/en/perf-tuning.xml 2010-05-06 15:45:35 UTC (rev 9204)
+++ trunk/docs/user-manual/en/perf-tuning.xml 2010-05-06 16:18:59 UTC (rev 9205)
@@ -154,6 +154,9 @@
for more information.</para>
</listitem>
<listitem>
+ <para>If you have very fast consumers, you can increase consumer-window-size. This effectively disables consumer flow control.</para>
+ </listitem>
+ <listitem>
<para>Socket NIO vs Socket Old IO. By default HornetQ uses Socket NIO on the server
and old (blocking) IO on the client side (see the chapter on configuring
transports for more information <xref linkend="configuring-transports"/>). NIO
@@ -177,18 +180,8 @@
</section>
<section>
<title>Tuning Transport Settings</title>
- <itemizedlist>
+ <itemizedlist>
<listitem>
- <para>Enable <ulink url="http://en.wikipedia.org/wiki/Nagle's_algorithm">Nagle's
- algorithm</ulink>. If you are sending many small messages, such that more
- than one can fit in a single IP packet thus providing better performance. This
- is done by setting <literal>tcp-no-delay</literal> to false with the Netty
- transports. See <xref linkend="configuring-transports"/> for more information on
- this. </para>
- <para>Enabling Nagle's algorithm can make a very big difference in performance and
- is highly recommended if you're sending a lot of asynchronous traffice.</para>
- </listitem>
- <listitem>
<para>TCP buffer sizes. If you have a fast network and fast machines you may get a
performance boost by increasing the TCP send and receive buffer sizes. See the
<xref linkend="configuring-transports"/> for more information on this.
Modified: trunk/docs/user-manual/en/wildcard-routing.xml
===================================================================
--- trunk/docs/user-manual/en/wildcard-routing.xml 2010-05-06 15:45:35 UTC (rev 9204)
+++ trunk/docs/user-manual/en/wildcard-routing.xml 2010-05-06 16:18:59 UTC (rev 9205)
@@ -21,12 +21,11 @@
<chapter id="wildcard-routing">
<title>Routing Messages With Wild Cards</title>
<para>HornetQ allows the routing of messages via wildcard addresses.</para>
- <para>If a consumer is created with an address of say <literal>queue.news.#</literal> then it
+ <para>If a queue is created with an address of say <literal>queue.news.#</literal> then it
will receive any messages sent to addresses that match this, for instance <literal
>queue.news.europe</literal> or <literal>queue.news.usa</literal> or <literal
- >queue.news.usa.sport</literal>. This allows a consumer to consume messages which are
- sent to a <emphasis>hierarchy</emphasis> of addresses, rather than the consumer having to
- specify a specific address.</para>
+ >queue.news.usa.sport</literal>. If you create a consumer on this queue, this allows a consumer to consume messages which are
+ sent to a <emphasis>hierarchy</emphasis> of addresses.</para>
<note>
<para>In JMS terminology this allows "topic hierarchies" to be created.</para>
</note>
14 years, 10 months