From 87a7db353c15df8fb742ebdffbee7bd09bf9966f Mon Sep 17 00:00:00 2001 From: Keith Wall Date: Thu, 1 Dec 2011 22:32:47 +0000 Subject: QPID-3631: Document missing broker properties git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1209282 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/doc/book/src/Programming-In-Apache-Qpid.xml | 133 ++++++++++++++++------- 1 file changed, 94 insertions(+), 39 deletions(-) diff --git a/qpid/doc/book/src/Programming-In-Apache-Qpid.xml b/qpid/doc/book/src/Programming-In-Apache-Qpid.xml index 4992f03f3b..7094ada16c 100644 --- a/qpid/doc/book/src/Programming-In-Apache-Qpid.xml +++ b/qpid/doc/book/src/Programming-In-Apache-Qpid.xml @@ -3009,7 +3009,7 @@ destination.topicExchange = amq.topic see below - The broker to use for this connection. In the current release, precisely one broker must be specified. + List of one or more broker addresses. @@ -3061,11 +3061,25 @@ destination.topicExchange = amq.topic failover - {'roundrobin' | 'failover_exchange'} + {'singlebroker' | 'roundrobin' | 'failover_exchange' | 'nofailover' | '<class>'} - If roundrobin is selected it will try each broker given in the broker list. - If failover_exchange is selected it connects to the initial broker given in the broker URL and will receive membership updates via the failover exchange. + + This option controls failover behaviour. The method singlebroker uses only the first broker in the list, + roundrobin will try each broker given in the broker list until a connection is established, + failover_exchange connects to the initial broker given in the broker URL and will receive membership updates + via the failover exchange. nofailover disables all retry and failover logic. Any other value is interpreted as a + classname which must implement the org.apache.qpid.jms.failover.FailoverMethod interface. + + + The broker list options retries and connectdelay (described below) determine the number of times a + connection to a broker will be retried and the the length of time to wait between successive connection attempts before moving on to + the next broker in the list. The failover option cyclecount controls the number of times to loop through the list of + available brokers before finally giving up. + + + Defaults to roundrobin if the brokerlist contains multiple brokers, or singlebroker otherwise. + @@ -3075,7 +3089,7 @@ destination.topicExchange = amq.topic Broker lists are specified using a URL in this format: - brokerlist=<transport>://<host>[:<port>](?<param>=<value>)?(&<param>=<value>)* + brokerlist=<transport>://<host>[:<port>](?<param>='<value>')(&<param>='<value>')* For instance, this is a typical broker list: @@ -3092,14 +3106,25 @@ destination.topicExchange = amq.topic A broker list can specify properties to be used when connecting to the broker, such as security options. This broker list specifies options for a Kerberos connection using GSSAPI: This broker list specifies SSL options: + + + This broker list specifies two brokers using the connectdelay and retries broker options. It also illustrates the failover connection URL + property. + + + @@ -3164,29 +3189,6 @@ amqp://guest:guest@test/test?sync_ack='true' If sasl_encryption='true', the JMS client attempts to negotiate a security layer with the broker using GSSAPI to encrypt the connection. Note that for this to happen, GSSAPI must be selected as the sasl_mech. - - - ssl - - - Boolean - - - If ssl='true', the JMS client will encrypt the connection using SSL. - - - - - tcp_nodelay - - - Boolean - - - If tcp_nodelay='true', TCP packet - batching is disabled. - - sasl_protocol @@ -3222,7 +3224,7 @@ amqp://guest:guest@test/test?sync_ack='true' -- - path to Keberos trust store + path to trust store @@ -3232,7 +3234,7 @@ amqp://guest:guest@test/test?sync_ack='true' - Kerberos trust store password + Trust store password @@ -3242,7 +3244,7 @@ amqp://guest:guest@test/test?sync_ack='true' - path to Kerberos key store + path to key store @@ -3253,7 +3255,18 @@ amqp://guest:guest@test/test?sync_ack='true' -- - Kerberos key store password + key store password + + + + + ssl + + + Boolean + + + If ssl='true', the JMS client will encrypt the connection using SSL. @@ -3265,7 +3278,7 @@ amqp://guest:guest@test/test?sync_ack='true' When using SSL you can enable hostname verification - by using "ssl_verify_hostname=true" in the broker + by using ssl_verify_hostname='true' in the broker URL. @@ -3280,6 +3293,51 @@ amqp://guest:guest@test/test?sync_ack='true' If multiple certificates are present in the keystore, the alias will be used to extract the correct certificate. + + + retries + + + integer + + + The number of times to retry connection to each broker in the broker list. Defaults to 1. + + + + + connectdelay + + + integer + + + Length of time to wait before attempting to reconnect (in milliseconds). Defaults to 0. + + + + + connecttimeout + + + integer + + + Length of time to wait for the connection to succeed (in milliseconds). Defaults to 30000. + + + + + tcp_nodelay + + + Boolean + + + If tcp_nodelay='true', TCP packet + batching is disabled. + + @@ -3367,10 +3425,7 @@ import javax.jms.MapMessage; import javax.jms.MessageProducer; import javax.jms.Session; -import org.apache.qpid.client.AMQAnyDestination; -import org.apache.qpid.client.AMQConnection; - -import edu.emory.mathcs.backport.java.util.Arrays; +import java.util.Arrays; // !!! SNIP !!! -- cgit v1.2.1