From 569cd523376d4e7c27d3149faad96cae472aaecd Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Wed, 19 Jan 2011 03:14:13 +0000 Subject: Added a new section titled "Configuring the JMS Client". Most of the properties added here are applicable to the 0-10 client. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1060667 13f79535-47bb-0310-9956-ffa450edef68 --- doc/book/src/Programming-In-Apache-Qpid.xml | 388 +++++++++++++++++++++++++++- 1 file changed, 387 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/book/src/Programming-In-Apache-Qpid.xml b/doc/book/src/Programming-In-Apache-Qpid.xml index 51d5ea179c..f4c82ac748 100644 --- a/doc/book/src/Programming-In-Apache-Qpid.xml +++ b/doc/book/src/Programming-In-Apache-Qpid.xml @@ -2909,7 +2909,7 @@ destination.topicExchange = amq.topic -
+
Connection URLs In JNDI properties, a Connection URL specifies properties for a connection. The format for a Connection URL is: @@ -3403,6 +3403,392 @@ log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n
+
+ Configuring the JMS Client + + The Qpid JMS Client allows several configuration options to customize it's behaviour at different levels of granualarity. + + + + + JVM level using JVM arguments : Configuration that affects all connections, sessions, consumers and producers created within that JVM. + + Ex. -Dmax_prefetch=1000 property specifies the message credits to use. + + + + + Connection level using Connection/Broker properties : Affects the respective connection and sessions, consumers and produces created by that connection. + + Ex. amqp://guest:guest@test/test?max_prefetch='1000' + &brokerlist='tcp://localhost:5672' + property specifies the message credits to use. This overrides any value specified via the JVM argument max_prefetch. + Please refer to the section for a complete list of all properties and how to use them. + + + + + Destination level using Addressing options : Affects the producer(s) and consumer(s) created using the respective destination. + + Ex. my-queue; {create: always, link:{capacity: 10}}, where capacity option specifies the message credits to use. This overrides any connection level configuration. + Please refer to the section for a complete understanding of addressing and it's various options. + + + +Some of these config options are available at all three levels (Ex. max_prefetch), while others are available only at JVM or connection level. + +
+ Qpid JVM Arguments + + + Config Options For Connection Behaviour + + + + Property Name + Type + Default Value + Description + + + + + qpid.amqp.version + string + 0-10 + Sets the AMQP version to be used - currently supports one of {0-8,0-9,0-91,0-10} + + + + qpid.heartbeat + int + 120 (secs) + The heartbeat interval in seconds. Two consective misssed heartbeats will result in the connection timing out.This could also be set per connection as well (see connection paramters). + + + + ignore_setclientID + boolean + false + If a client ID is specified in the connection URL it's used or else an ID is generated. If an ID is specified after it's been set Qpid will throw an exception. Setting this property to 'true' will disable that check and allow you to set a client ID of your choice later on. + + + +
+ + + + Config Options For Session Behaviour + + + + Property Name + Type + Default Value + Description + + + + + qpid.session.command_limit + int + 65536 + Limits the # of unacked commands + + + + qpid.session.byte_limit + int + 1048576 + Limits the # of unacked commands in terms of bytes + + + + qpid.use_legacy_map_message + boolean + false + If set will use the old map message encoding. By default the Map messages are encoded using the 0-10 map encoding.This could also be set per connection as well (see connection paramters). + + + +
+ + + Config Options For Consumer Behaviour + + + + Property Name + Type + Default Value + Description + + + + + max_prefetch + int + 500 + Maximum number of messages to credits. This could also be set per connection (see connection paramters) or per destination (see the capacity option under link properties in addressing). + + + + qpid.session.max_ack_delay + long + 1000 (ms) + Timer interval to flush message acks in buffer when using AUTO_ACK and DUPS_OK. When using the above ack modes, message acks are batched and sent if one of the following conditions are met (which ever happens first). + + When the ack timer fires. + if un_acked_msg_count > max_prefetch/2. + + + The ack timer can be disabled by setting it to 0. + + + + + sync_ack + boolean + false + If set, each message will be acknowledged synchronously. When using AUTO_ACK mode, you need to set this to "true", in order to get the correct behaviour as described by the JMS spec.This is set to false by default for performance reasons, therefore by default AUTO_ACK behaves similar to DUPS_OK.This could also be set per connection as well (see connection paramters). + + + +
+ + + Config Options For Producer Behaviour + + + + Property Name + Type + Default Value + Description + + + + + sync_publish + string + "" (disabled) + If one of {persistent|all} is set then persistent messages or all messages will be sent synchronously.This could also be set per connection as well (see connection paramters). + + + +
+ + + Config Options For Threading + + + + Property Name + Type + Default Value + Description + + + + + qpid.thread_factory + string + org.apache.qpid.thread.DefaultThreadFactory + Specifies the thread factory to use.If using a real time JVM, you need to set the above property to org.apache.qpid.thread.RealtimeThreadFactory. + + + + qpid.rt_thread_priority + int + 20 + Specifies the priority (1-99) for Real time threads created by the real time thread factory. + + + +
+ + + Config Options For I/O + + + + Property Name + Type + Default Value + Description + + + + + qpid.transport + string + org.apache.qpid.transport.network.io.IoNetworkTransport + The transport implementation to be used.A user could specify an alternative transport mechanism that implements the org.apache.qpid.transport.network.NetworkTransport interface. + + + + amqj.tcp_nodelay + boolean + false + Sets the TCP_NODELAY property of the underlying socket.This could also be set per connection as well (see connection paramters). + + + +
+ + + Config Options For Security + + + + Property Name + Type + Default Value + Description + + + + + qpid.sasl_mechs + string + PLAIN + The SASL mechanism to be used. More than one could be specified as a comma separated list.We currently support the following mechanisms {PLAIN | GSSAPI | EXTERNAL}.This could also be set per connection as well (see connection paramters). + + + + qpid.sasl_protocol + string + AMQP + When using GSSAPI as the SASL mechanism, sasl_protocol must be set to the principal for the qpidd broker, e.g. qpidd.This could also be set per connection as well (see connection paramters). + + + + qpid.sasl_server_name + string + localhost + When using GSSAPI as the SASL mechanism, sasl_server must be set to the host for the SASL server, e.g. example.com.This could also be set per connection as well (see connection paramters). + + + +
+ + + Config Options For Security - Standard JVM properties needed when using GSSAPI as the SASL mechanism.<footnote>Please refer to the Java security documentation for a complete understanding of the above properties.</footnote> + + + + Property Name + Type + Default Value + Description + + + + + javax.security.auth.useSubjectCredsOnly + boolean + true + If set to 'false', forces the SASL GASSPI client to obtain the kerberos credentials explicitly instead of obtaining from the "subject" that owns the current thread. + + + + java.security.auth.login.config + string + + Specifies the jass configuration file.Ex-Djava.security.auth.login.config=myjas.conf +Here is the sample myjas.conf JASS configuration file: + + + +
+ + + Config Options For Security - Using SSL for securing connections or using EXTERNAL as the SASL mechanism. + + + + Property Name + Type + Default Value + Description + + + + + qpid.ssl_timeout + long + 60000 + Timeout value used by the Java SSL engine when waiting on operations. + + + + qpid.ssl.keyStoreCertType + string + SunX509 + The certificate type.This could also be set per connection as well (see connection paramters). + + + + qpid.ssl.trustStoreCertType + string + SunX509 + The certificate type.This could also be set per connection as well (see connection paramters). + + + +
+ + + Config Options For Security - Standard JVM properties needed when Using SSL for securing connections or using EXTERNAL as the SASL mechanism.<footnote>Qpid allows you to have per connection key and trust stores if required. If specified per connection, the JVM arguments are ignored.</footnote> + + + + Property Name + Type + Default Value + Description + + + + + javax.net.ssl.keyStore + string + jvm default + Specifies the key store path.This could also be set per connection as well (see connection paramters). + + + + javax.net.ssl.keyStorePassword + string + jvm default + Specifies the key store password.This could also be set per connection as well (see connection paramters). + + + + javax.net.ssl.trustStore + string + jvm default + Specifies the trust store path.This could also be set per connection as well (see connection paramters). + + + + javax.net.ssl.trustStorePassword + string + jvm default + Specifies the trust store password.This could also be set per connection as well (see connection paramters). + + + +
+
+
+ -- cgit v1.2.1