blob: 5d670f175021b2574318c9c77fcd0bb4c6758ddd [file] [log] [blame]
<div class="docbook"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">2.3.&#160;JVM Properties</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="JMS-Client-0-10-Configuring-JNDI.html">Prev</a>&#160;</td><th align="center" width="60%">Chapter&#160;2.&#160;Configuring the Client</th><td align="right" width="20%">&#160;<a accesskey="n" href="JMS-Client-0-10-Configuring-Addresses.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="JMS-Client-0-10-Configuring-JVM-Properties"></a>2.3.&#160;JVM Properties</h2></div></div></div><div class="table"><a id="d0e585"></a><p class="title"><strong>Table&#160;2.4.&#160;Config Options For Connection Behaviour</strong></p><div class="table-contents"><table border="1" summary="Config Options For Connection Behaviour"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>qpid.amqp.version</td><td>string</td><td>0-10</td><td><p>Sets the AMQP version to be used - currently supports one of {0-8,0-9,0-91,0-10}.</p><p>The client will begin negotiation at the specified version and only negotiate downwards if the Broker does not support the specified version.</p></td></tr><tr><td>qpid.heartbeat</td><td>int</td><td><p>When using the 0-10 protocol, the default is 120 (secs)</p><p>When using protocols 0-8...0-91, the default is the broker-supplied value.</p></td><td>Frequency of heartbeat messages (in seconds). A value of 0 disables heartbeating. <p>Two consective misssed heartbeats will result in the connection timing out.</p><p>This can also be set per connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">Connection URL</a> options.</p><p>For compatibility with old client configuration, the synonym <code class="varname">amqj.heartbeat.delay</code> is supported.</p></td></tr><tr><td>ignore_setclientID</td><td>boolean</td><td>false</td><td>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. <p>Setting this property to 'true' will disable that check and allow you to set a client ID of your choice later on.</p></td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="d0e647"></a><p class="title"><strong>Table&#160;2.5.&#160;Config Options For Session Behaviour</strong></p><div class="table-contents"><table border="1" summary="Config Options For Session Behaviour"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>qpid.session.command_limit</td><td>int</td><td>65536</td><td>Limits the # of unacked commands</td></tr><tr><td>qpid.session.byte_limit</td><td>int</td><td>1048576</td><td>Limits the # of unacked commands in terms of bytes</td></tr><tr><td>qpid.use_legacy_map_message</td><td>boolean</td><td>false</td><td><p>If set will use the old map message encoding. By default the Map messages are encoded using the 0-10 map encoding.</p><p>This can also be set per connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">Connection URL</a> options.</p></td></tr><tr><td>qpid.jms.daemon.dispatcher</td><td>boolean</td><td>false</td><td><p>Controls whether the Session dispatcher thread is a daemon thread or not. If this system property is set to true then the Session dispatcher threads will be created as daemon threads. This setting is introduced in version 0.16.</p></td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="d0e705"></a><p class="title"><strong>Table&#160;2.6.&#160;Config Options For Consumer Behaviour</strong></p><div class="table-contents"><table border="1" summary="Config Options For Consumer Behaviour"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>max_prefetch</td><td>int</td><td>500</td><td>Maximum number of pre-fetched messages per consumer. <p>This can also be defaulted for consumers created on a particular connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">Connection URL</a> options, or per destination (see the <code class="varname">capacity</code> option under link properties in addressing)</p></td></tr><tr><td>qpid.session.max_ack_delay</td><td>long</td><td>1000 (ms)</td><td><p>Timer interval to flush message acks in buffer when using AUTO_ACK and DUPS_OK.</p> <p>When using the above ack modes, message acks are batched and sent if one of the following conditions are met (which ever happens first).
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>When the ack timer fires.</p></li><li class="listitem"><p>if un_acked_msg_count &gt; max_prefetch/2.</p></li></ul></div><p>
</p>
<p>The ack timer can be disabled by setting it to 0.</p>
</td></tr><tr><td>sync_ack</td><td>boolean</td><td>false</td><td><p>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.</p><p>This is set to false by default for performance reasons, therefore by default AUTO_ACK behaves similar to DUPS_OK.</p><p>This can also be set per connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">Connection URL</a> options.</p></td></tr><tr><td>sync_client_ack</td><td>boolean</td><td>true</td><td>
<p>
If set <code class="literal">true</code>, for sessions using <a class="link" href="http://docs.oracle.com/javaee/6/api/javax/jms/Session.html#CLIENT_ACKNOWLEDGE" target="_top">Session#CLIENT_ACKNOWLEDGE</a>,
a sync command is sent after every message <a class="link" href="http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#acknowledge()" target="_top">Message#acknowledge()</a>.
This ensure that the client awaits the successful processing of the acknowledgement by server before continuing.
</p>
<p>If <code class="literal">false</code>, the sync is not performed. This will improve performance but will mean
duplicate messages are more likely to be received following a failure.
</p>
<p>This can also be set per connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">
Connection URL</a> options.</p>
</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="d0e812"></a><p class="title"><strong>Table&#160;2.7.&#160;Config Options For Producer Behaviour</strong></p><div class="table-contents"><table border="1" summary="Config Options For Producer Behaviour"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>sync_publish</td><td>string</td><td>"" (disabled)</td><td><p>If one of {persistent|all} is set then persistent messages or all messages will be sent synchronously.</p><p>This can also be set per connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">Connection URL</a> options.</p></td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="d0e842"></a><p class="title"><strong>Table&#160;2.8.&#160;Config Options For Threading</strong></p><div class="table-contents"><table border="1" summary="Config Options For Threading"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>qpid.thread_factory</td><td>string</td><td>org.apache.qpid.thread.DefaultThreadFactory</td><td><p>Specifies the thread factory to use.</p><p>If using a real time JVM, you need to set the above property to <code class="varname">org.apache.qpid.thread.RealtimeThreadFactory</code>.</p></td></tr><tr><td>qpid.rt_thread_priority</td><td>int</td><td>20</td><td><p>Specifies the priority (1-99) for Real time threads created by the real time thread factory.</p></td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="d0e882"></a><p class="title"><strong>Table&#160;2.9.&#160;Config Options For I/O</strong></p><div class="table-contents"><table border="1" summary="Config Options For I/O"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>qpid.transport</td><td>string</td><td>org.apache.qpid.transport.network.io.IoNetworkTransport</td><td><p>The transport implementation to be used.</p><p>A user could specify an alternative transport mechanism that implements the interface <code class="varname">org.apache.qpid.transport.network.OutgoingNetworkTransport</code>.</p></td></tr><tr><td>qpid.sync_op_timeout</td><td>long</td><td>60000</td><td><p>The length of time (in milliseconds) to wait for a synchronous operation to complete.</p><p>For compatibility with older clients, the synonym <code class="varname">amqj.default_syncwrite_timeout</code> is supported.</p></td></tr><tr><td>qpid.tcp_nodelay</td><td>boolean</td><td>true</td><td>
<p>Sets the TCP_NODELAY property of the underlying socket. The default was changed to true as of Qpid 0.14.</p>
<p>This can also be set per connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">Connection URL</a> options.</p>
<p>For compatibility with older clients, the synonym <code class="varname">amqj.tcp_nodelay</code> is supported.</p>
</td></tr><tr><td>qpid.send_buffer_size</td><td>integer</td><td>65535</td><td>
<p>Sets the SO_SNDBUF property of the underlying socket. Added in Qpid 0.16.</p>
<p>For compatibility with older clients, the synonym <code class="varname">amqj.sendBufferSize</code> is supported.</p>
</td></tr><tr><td>qpid.receive_buffer_size</td><td>integer</td><td>65535</td><td>
<p>Sets the SO_RCVBUF property of the underlying socket. Added in Qpid 0.16.</p>
<p>For compatibility with older clients, the synonym <code class="varname">amqj.receiveBufferSize</code> is supported.</p>
</td></tr><tr><td>qpid.failover_method_timeout</td><td>long</td><td>60000</td><td>
<p>During failover, this is the timeout for each attempt to try to re-establish the connection.
If a reconnection attempt exceeds the timeout, the entire failover process is aborted.</p>
<p>It is only applicable for AMQP 0-8/0-9/0-9-1 clients.</p>
</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="d0e1002"></a><p class="title"><strong>Table&#160;2.10.&#160;Config Options For Security</strong></p><div class="table-contents"><table border="1" summary="Config Options For Security"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>qpid.sasl_mechs</td><td>string</td><td>PLAIN</td><td><p>The SASL mechanism to be used. More than one could be specified as a comma separated list.</p><p>We currently support the following mechanisms {PLAIN | GSSAPI | EXTERNAL}.</p><p>This can also be set per connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">Connection URL</a> options.</p></td></tr><tr><td>qpid.sasl_protocol</td><td>string</td><td>AMQP</td><td><p>When using GSSAPI as the SASL mechanism, <code class="varname">sasl_protocol</code> must be set to the principal for the qpidd broker, e.g. <code class="varname">qpidd</code>.</p><p>This can also be set per connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">Connection URL</a> options.</p></td></tr><tr><td>qpid.sasl_server_name</td><td>string</td><td>localhost</td><td><p>When using GSSAPI as the SASL mechanism, <code class="varname">sasl_server</code> must be set to the host for the SASL server, e.g. <code class="varname">example.com</code>.</p><p>This can also be set per connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">Connection URL</a> options.</p></td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="d0e1076"></a><p class="title"><strong>Table&#160;2.11.&#160;Config Options For Security - Standard JVM properties needed when using GSSAPI as the SASL mechanism.<a class="footnote" href="#ftn.d0e1079" id="d0e1079"><sup class="footnote">[a]</sup></a></strong></p><div class="table-contents"><table border="1" summary="Config Options For Security - Standard JVM properties needed when using GSSAPI as the SASL mechanism.Please refer to the Java security documentation for a complete understanding of the above properties."><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>javax.security.auth.useSubjectCredsOnly</td><td>boolean</td><td>true</td><td><p>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.</p></td></tr><tr><td>java.security.auth.login.config</td><td>string</td><td>&#160;</td><td><p>Specifies the jass configuration file.</p><p><code class="varname">Ex-Djava.security.auth.login.config=myjas.conf</code>
</p><p>Here is the sample myjas.conf JASS configuration file: </p><pre class="programlisting">
com.sun.security.jgss.initiate {
com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true;
};
</pre></td></tr></tbody><tbody class="footnotes"><tr><td colspan="4"><div class="footnote" id="ftn.d0e1079"><p><a class="para" href="#d0e1079"><sup class="para">[a] </sup></a>Please refer to the Java security documentation for a complete understanding of the above properties.</p></div></td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="d0e1121"></a><p class="title"><strong>Table&#160;2.12.&#160;Config Options For Security - Using SSL for securing connections or using EXTERNAL as the SASL mechanism.</strong></p><div class="table-contents"><table border="1" summary="Config Options For Security - Using SSL for securing connections or using EXTERNAL as the SASL mechanism."><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>qpid.ssl_timeout</td><td>long</td><td>60000</td><td><p>Timeout value used by the Java SSL engine when waiting on operations.</p></td></tr><tr><td>qpid.ssl.KeyManagerFactory.algorithm</td><td>string</td><td>-</td><td>
<p>The key manager factory algorithm name. If not set, defaults to the value returned from the Java runtime call <code class="literal">KeyManagerFactory.getDefaultAlgorithm()</code></p>
<p>For compatibility with older clients, the synonym <code class="varname">qpid.ssl.keyStoreCertType</code> is supported.</p>
</td></tr><tr><td>qpid.ssl.TrustManagerFactory.algorithm</td><td>string</td><td>-</td><td>
<p>The trust manager factory algorithm name. If not set, defaults to the value returned from the Java runtime call <code class="literal">TrustManagerFactory.getDefaultAlgorithm()</code></p>
<p>For compatibility with older clients, the synonym <code class="varname">qpid.ssl.trustStoreCertType</code> is supported.</p>
</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="d0e1186"></a><p class="title"><strong>Table&#160;2.13.&#160;Config Options For Security - Standard JVM properties needed when Using SSL for securing connections or using EXTERNAL as the SASL mechanism.<a class="footnote" href="#ftn.d0e1189" id="d0e1189"><sup class="footnote">[a]</sup></a></strong></p><div class="table-contents"><table border="1" summary="Config Options For Security - Standard JVM properties needed when Using SSL for securing connections or using EXTERNAL as the SASL mechanism.Qpid allows you to have per connection key and trust stores if required. If specified per connection, the JVM arguments are ignored."><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Property Name</th><th>Type</th><th>Default Value</th><th>Description</th></tr></thead><tbody><tr><td>javax.net.ssl.keyStore</td><td>string</td><td>jvm default</td><td><p>Specifies the key store path.</p><p>This can also be set per connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">Connection URL</a> options.</p></td></tr><tr><td>javax.net.ssl.keyStorePassword</td><td>string</td><td>jvm default</td><td><p>Specifies the key store password.</p><p>This can also be set per connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">Connection URL</a> options.</p></td></tr><tr><td>javax.net.ssl.trustStore</td><td>string</td><td>jvm default</td><td><p>Specifies the trust store path.</p><p>This can also be set per connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">Connection URL</a> options.</p></td></tr><tr><td>javax.net.ssl.trustStorePassword</td><td>string</td><td>jvm default</td><td><p>Specifies the trust store password.</p><p>This can also be set per connection using the <a class="link" href="JMS-Client-0-10-Configuring-JNDI.html#JMS-Client-0-10-Configuring-JNDI-Connection-URL" title="2.2.2.&#160;Connection URLs">Connection URL</a> options.</p></td></tr></tbody><tbody class="footnotes"><tr><td colspan="4"><div class="footnote" id="ftn.d0e1189"><p><a class="para" href="#d0e1189"><sup class="para">[a] </sup></a>Qpid allows you to have per connection key and trust stores if required. If specified per connection, the JVM arguments are ignored.</p></div></td></tr></tbody></table></div></div><br class="table-break" /></div><div class="navfooter"><hr /><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="JMS-Client-0-10-Configuring-JNDI.html">Prev</a>&#160;</td><td align="center" width="20%"><a accesskey="u" href="JMS-Client-0-10-Configuring.html">Up</a></td><td align="right" width="40%">&#160;<a accesskey="n" href="JMS-Client-0-10-Configuring-Addresses.html">Next</a></td></tr><tr><td align="left" valign="top" width="40%">2.2.&#160;JNDI Properties&#160;</td><td align="center" width="20%"><a accesskey="h" href="JMS-Client-0-10-Book.html">Home</a></td><td align="right" valign="top" width="40%">&#160;2.4.&#160;Addresses</td></tr></table></div></div>