You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2013/07/09 16:21:00 UTC

svn commit: r868917 [2/2] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache camel-2120-release.html netty.html

Modified: websites/production/camel/content/netty.html
==============================================================================
--- websites/production/camel/content/netty.html (original)
+++ websites/production/camel/content/netty.html Tue Jul  9 14:21:00 2013
@@ -125,7 +125,7 @@ netty:udp://remotehost:99999/[?options]
 
 <h3><a shape="rect" name="Netty-Options"></a>Options</h3>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>keepAlive</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Setting to ensure socket is not closed due to inactivity </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>tcpNoDelay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Setting to improve TCP protocol performance </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>backlog</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9.6/2.10.4/2.11:</b> Allows to configure 
 a backlog for netty consumer (server). Note the backlog is just a best effort depending on the OS. Setting this option to a value such as <tt>200</tt>, <tt>500</tt> or <tt>1000</tt>, tells the TCP stack how long the "accept" queue can be. If this option is not configured, then the backlog depends on OS setting. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>broadcast</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Setting to choose Multicast over UDP </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>connectTimeout</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>10000</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Time to wait for a socket connection to be available. Value is in millis. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>reuseAddress</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</t
 t> </td><td colspan="1" rowspan="1" class="confluenceTd"> Setting to facilitate socket multiplexing </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>sync</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Setting to set endpoint as one-way or request-response </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>synchronous</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.10:</b> Whether <a shape="rect" href="asynchronous-routing-engine.html" title="Asynchronous Routing Engine">Asynchronous Routing Engine</a> is not in use. <tt>false</tt> then the <a shape="rect" href="asynchronous-routing-engine.html" title="Asynchronous Routing Engine">Asynchronous Routing Engine</a> is used, <tt>true</tt> to force processing synchronous. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceT
 d"> <tt>ssl</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Setting to specify whether SSL encryption is applied to this endpoint </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>sendBufferSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>65536 bytes</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The TCP/UDP buffer sizes to be used during outbound communication. Size is bytes. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>receiveBufferSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>65536 bytes</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The TCP/UDP buffer sizes to be used during inbound communication. Size is bytes. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>option.XXX</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan
 ="1" class="confluenceTd"> <b>Camel 2.11/2.10.4:</b> Allows to configure additional netty options using "option." as prefix. For example "option.child.keepAlive=false" to set the netty option "child.keepAlive=false". See the Netty documentation for possible options that can be used. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>corePoolSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>10</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The number of allocated threads at component startup. Defaults to 10. <b>Note:</b> This option is removed from Camel 2.9.2 onwards. As we rely on Nettys default settings. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>maxPoolSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>100</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The maximum number of threads that may be allocated to this endpoint. Defaults to 100. <b>Note:</b> This option is removed fro
 m Camel 2.9.2 onwards. As we rely on Nettys default settings. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>disconnect</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>lazyChannelCreation</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Channels can be lazily created to avoid exceptions, if the remote server is not up and running when the Camel producer is started. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transferExchange</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only used for TCP. You can transfer the exchang
 e over the wire instead of just the body. The following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>disconnectOnNoReply</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If sync is enabled then this option dictates NettyConsumer if it should disconnect where there is no reply to send back. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>noReplyLogLevel</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>WARN</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If sync is enabled this option dictates NettyConsumer which logging level to use when logging a there is no reply to send back. Val
 ues are: <tt>FATAL, ERROR, INFO, DEBUG, OFF</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>serverExceptionCaughtLogLevel</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>WARN</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11.1:</b> If the server (NettyConsumer) catches an exception then its logged using this logging level. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>serverClosedChannelExceptionCaughtLogLevel</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>DEBUG</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11.1:</b> If the server (NettyConsumer) catches an <tt>java.nio.channels.ClosedChannelException</tt> then its logged using this logging level. This is used to avoid logging the closed channel exceptions, as clients can disconnect abruptly and then cause a flod of closed exceptions in the Netty server. </td></tr><tr><td colspan="1" rowspan="1" class="co
 nfluenceTd"> <tt>allowDefaultCodec</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> The netty component installs a default codec if both, encoder/deocder is null and textline is false. Setting allowDefaultCodec to false prevents the netty component from installing a default codec as the first element in the filter chain. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>textline</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> Only used for TCP. If no codec is specified, you can use this flag to indicate a text line based codec; if not specified or the value is false, then Object Serialization is assumed over TCP. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>delimiter</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>LINE</tt> </td><td
  colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> The delimiter to use for the textline codec. Possible values are <tt>LINE</tt> and <tt>NULL</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>decoderMaxLineLength</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>1024</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> The max line length to use for the textline codec. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>autoAppendDelimiter</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> Whether or not to auto append missing end delimiter when sending using the textline codec. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>encoding</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</
 b> The encoding (a charset name) to use for the textline codec. If not provided, Camel will use the JVM default Charset. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>workerCount</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9:</b> When netty works on nio mode, it uses default workerCount parameter from Netty, which is cpu_core_threads*2. User can use this operation to override the default workerCount from Netty </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>sslContextParametersRef</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9:</b> Reference to a <tt>org.apache.camel.util.jsse.SSLContextParameters</tt> in the <a shape="rect" href="registry.html" title="Registry">Registry</a>.&#160; This reference overrides any configured SSLContextParameters at the compo
 nent level.&#160; See <a shape="rect" href="#Netty-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</a>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>receiveBufferSizePredictor</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9:</b> Configures the buffer size predictor. See details at Jetty documentation and this <a shape="rect" class="external-link" href="http://lists.jboss.org/pipermail/netty-users/2010-January/001958.html" rel="nofollow">mail thread</a>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>requestTimeout</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11.1:</b> Allows to use a timeout for the Netty producer when calling a remote server. By default no timeout is in use. The value is in milli seconds, so eg <tt>30000</tt> is 30 s
 econds. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>needClientAuth</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"><tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> Configures whether the server needs client authentication when using SSL. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>orderedThreadPoolExecutor</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.10.2:</b> Whether to use ordered thread pool, to ensure events are processed orderly on the same channel. See details at the netty javadoc of <tt>org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor</tt> for more details. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>maximumPoolSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>16</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
  <b>Camel 2.10.2:</b> The core pool size for the ordered thread pool, if its in use. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>producerPoolEnabled</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.10.4/Camel 2.11:</b> Producer only. Whether producer pool is enabled or not. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>producerPoolMaxActive</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>-1</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.10.3:</b> Producer only. Sets the cap on the number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time. Use a negative value for no limit. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>producerPoolMinIdle</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1
 " rowspan="1" class="confluenceTd"> <b>Camel 2.10.3:</b> Producer only. Sets the minimum number of instances allowed in the producer pool before the evictor thread (if active) spawns new objects. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>producerPoolMaxIdle</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>100</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.10.3:</b> Producer only. Sets the cap on the number of "idle" instances in the pool. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>producerPoolMinEvictableIdle</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>30000</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.10.3:</b> Producer only. Sets the minimum amount of time (value in millis) an object may sit idle in the pool before it is eligible for eviction by the idle object evictor. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>bootstrapC
 onfiguration</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> Consumer only. Allows to configure the Netty ServerBootstrap options using a <tt>org.apache.camel.component.netty.NettyServerBootstrapConfiguration</tt> instance. This can be used to reuse the same configuration for multiple consumers, to align their configuration more easily. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>bossPoll</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> Consumer only. To use a explicit <tt>org.jboss.netty.channel.socket.nio.BossPool</tt> as the boss thread pool. For example to share a thread pool with multiple consumers. By default each consumer has their own boss pool with 1 core thread. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>workerPool</tt> </td><td 
 colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> Consumer only. To use a explicit <tt>org.jboss.netty.channel.socket.nio.WorkerPool</tt> as the worker thread pool. For example to share a thread pool with multiple consumers. By default each consumer has their own worker pool with 2 x cpu count core threads. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"> Name </th><th colspan="1" rowspan="1" class="confluenceTh"> Default Value </th><th colspan="1" rowspan="1" class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>keepAlive</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Setting to ensure socket is not closed due to inactivity </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>tcpNoDelay</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Setting to improve TCP protocol performance </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>backlog</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9.6/2.10.4/2.11:</b> Allows to configure 
 a backlog for netty consumer (server). Note the backlog is just a best effort depending on the OS. Setting this option to a value such as <tt>200</tt>, <tt>500</tt> or <tt>1000</tt>, tells the TCP stack how long the "accept" queue can be. If this option is not configured, then the backlog depends on OS setting. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>broadcast</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Setting to choose Multicast over UDP </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>connectTimeout</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>10000</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Time to wait for a socket connection to be available. Value is in millis. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>reuseAddress</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</t
 t> </td><td colspan="1" rowspan="1" class="confluenceTd"> Setting to facilitate socket multiplexing </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>sync</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Setting to set endpoint as one-way or request-response </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>synchronous</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.10:</b> Whether <a shape="rect" href="asynchronous-routing-engine.html" title="Asynchronous Routing Engine">Asynchronous Routing Engine</a> is not in use. <tt>false</tt> then the <a shape="rect" href="asynchronous-routing-engine.html" title="Asynchronous Routing Engine">Asynchronous Routing Engine</a> is used, <tt>true</tt> to force processing synchronous. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceT
 d"> <tt>ssl</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Setting to specify whether SSL encryption is applied to this endpoint </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>sendBufferSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>65536 bytes</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The TCP/UDP buffer sizes to be used during outbound communication. Size is bytes. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>receiveBufferSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>65536 bytes</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The TCP/UDP buffer sizes to be used during inbound communication. Size is bytes. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>option.XXX</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan
 ="1" class="confluenceTd"> <b>Camel 2.11/2.10.4:</b> Allows to configure additional netty options using "option." as prefix. For example "option.child.keepAlive=false" to set the netty option "child.keepAlive=false". See the Netty documentation for possible options that can be used. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>corePoolSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>10</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The number of allocated threads at component startup. Defaults to 10. <b>Note:</b> This option is removed from Camel 2.9.2 onwards. As we rely on Nettys default settings. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>maxPoolSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>100</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> The maximum number of threads that may be allocated to this endpoint. Defaults to 100. <b>Note:</b> This option is removed fro
 m Camel 2.9.2 onwards. As we rely on Nettys default settings. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>disconnect</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>lazyChannelCreation</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Channels can be lazily created to avoid exceptions, if the remote server is not up and running when the Camel producer is started. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>transferExchange</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> Only used for TCP. You can transfer the exchang
 e over the wire instead of just the body. The following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>disconnectOnNoReply</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If sync is enabled then this option dictates NettyConsumer if it should disconnect where there is no reply to send back. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>noReplyLogLevel</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>WARN</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If sync is enabled this option dictates NettyConsumer which logging level to use when logging a there is no reply to send back. Val
 ues are: <tt>FATAL, ERROR, INFO, DEBUG, OFF</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>serverExceptionCaughtLogLevel</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>WARN</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11.1:</b> If the server (NettyConsumer) catches an exception then its logged using this logging level. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>serverClosedChannelExceptionCaughtLogLevel</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>DEBUG</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11.1:</b> If the server (NettyConsumer) catches an <tt>java.nio.channels.ClosedChannelException</tt> then its logged using this logging level. This is used to avoid logging the closed channel exceptions, as clients can disconnect abruptly and then cause a flod of closed exceptions in the Netty server. </td></tr><tr><td colspan="1" rowspan="1" class="co
 nfluenceTd"> <tt>allowDefaultCodec</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> The netty component installs a default codec if both, encoder/deocder is null and textline is false. Setting allowDefaultCodec to false prevents the netty component from installing a default codec as the first element in the filter chain. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>textline</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> Only used for TCP. If no codec is specified, you can use this flag to indicate a text line based codec; if not specified or the value is false, then Object Serialization is assumed over TCP. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>delimiter</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>LINE</tt> </td><td
  colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> The delimiter to use for the textline codec. Possible values are <tt>LINE</tt> and <tt>NULL</tt>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>decoderMaxLineLength</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>1024</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> The max line length to use for the textline codec. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>autoAppendDelimiter</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</b> Whether or not to auto append missing end delimiter when sending using the textline codec. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>encoding</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.4:</
 b> The encoding (a charset name) to use for the textline codec. If not provided, Camel will use the JVM default Charset. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>workerCount</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9:</b> When netty works on nio mode, it uses default workerCount parameter from Netty, which is cpu_core_threads*2. User can use this operation to override the default workerCount from Netty </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>sslContextParametersRef</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9:</b> Reference to a <tt>org.apache.camel.util.jsse.SSLContextParameters</tt> in the <a shape="rect" href="registry.html" title="Registry">Registry</a>.&#160; This reference overrides any configured SSLContextParameters at the compo
 nent level.&#160; See <a shape="rect" href="#Netty-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</a>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>receiveBufferSizePredictor</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.9:</b> Configures the buffer size predictor. See details at Jetty documentation and this <a shape="rect" class="external-link" href="http://lists.jboss.org/pipermail/netty-users/2010-January/001958.html" rel="nofollow">mail thread</a>. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>requestTimeout</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11.1:</b> Allows to use a timeout for the Netty producer when calling a remote server. By default no timeout is in use. The value is in milli seconds, so eg <tt>30000</tt> is 30 s
 econds. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>needClientAuth</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"><tt>false</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.11:</b> Configures whether the server needs client authentication when using SSL. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>orderedThreadPoolExecutor</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.10.2:</b> Whether to use ordered thread pool, to ensure events are processed orderly on the same channel. See details at the netty javadoc of <tt>org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor</tt> for more details. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>maximumPoolSize</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>16</tt> </td><td colspan="1" rowspan="1" class="confluenceTd">
  <b>Camel 2.10.2:</b> The core pool size for the ordered thread pool, if its in use. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>producerPoolEnabled</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.10.4/Camel 2.11:</b> Producer only. Whether producer pool is enabled or not. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>producerPoolMaxActive</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>-1</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.10.3:</b> Producer only. Sets the cap on the number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time. Use a negative value for no limit. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>producerPoolMinIdle</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1
 " rowspan="1" class="confluenceTd"> <b>Camel 2.10.3:</b> Producer only. Sets the minimum number of instances allowed in the producer pool before the evictor thread (if active) spawns new objects. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>producerPoolMaxIdle</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>100</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.10.3:</b> Producer only. Sets the cap on the number of "idle" instances in the pool. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>producerPoolMinEvictableIdle</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>30000</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.10.3:</b> Producer only. Sets the minimum amount of time (value in millis) an object may sit idle in the pool before it is eligible for eviction by the idle object evictor. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>bootstrapC
 onfiguration</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> Consumer only. Allows to configure the Netty ServerBootstrap options using a <tt>org.apache.camel.component.netty.NettyServerBootstrapConfiguration</tt> instance. This can be used to reuse the same configuration for multiple consumers, to align their configuration more easily. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>bossPoll</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> To use a explicit <tt>org.jboss.netty.channel.socket.nio.BossPool</tt> as the boss thread pool. For example to share a thread pool with multiple consumers. By default each consumer has their own boss pool with 1 core thread. </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> <tt>workerPool</tt> </td><td colspan="1" row
 span="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> <b>Camel 2.12:</b> To use a explicit <tt>org.jboss.netty.channel.socket.nio.WorkerPool</tt> as the worker thread pool. For example to share a thread pool with multiple consumers. By default each consumer has their own worker pool with 2 x cpu count core threads. </td></tr></tbody></table>
 </div>
 </div>
 
@@ -474,6 +474,51 @@ context.addRoutes(new RouteBuilder() {
 ]]></script>
 </div></div>
 
+<h3><a shape="rect" name="Netty-ReusingNettybossandworkerthreadpools"></a>Reusing Netty boss and worker thread pools</h3>
+<p><b>Available as of Camel 2.12</b></p>
+
+<p>Netty has two kind of thread pools: boss and worker. By default each Netty consumer and producer has their private thread pools. If you want to reuse these thread pools among multiple consumers or producers then the thread pools must be created and enlisted in the <a shape="rect" href="registry.html" title="Registry">Registry</a>.</p>
+
+<p>For example using Spring XML we can create a shared worker thread pool using the <tt>NettyWorkerPoolBuilder</tt> with 2 worker threads as shown below:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+  &lt;!-- use the worker pool builder to create to help create the shared thread pool --&gt;
+  &lt;bean id="poolBuilder" class="org.apache.camel.component.netty.NettyWorkerPoolBuilder"&gt;
+    &lt;property name="workerCount" value="2"/&gt;
+  &lt;/bean&gt;
+
+  &lt;!-- the shared worker thread pool --&gt;
+  &lt;bean id="sharedPool" class="org.jboss.netty.channel.socket.nio.WorkerPool"
+        factory-bean="poolBuilder" factory-method="build" destroy-method="shutdown"&gt;
+  &lt;/bean&gt;
+]]></script>
+</div></div>
+
+<div class="panelMacro"><table class="tipMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">For boss thread pool there is a <tt>org.apache.camel.component.netty.NettyServerBossPoolBuilder</tt> builder for Netty consumers, and a <tt>org.apache.camel.component.netty.NettyClientBossPoolBuilder</tt> for the Netty produces.</td></tr></table></div>
+
+<p>Then in the Camel routes we can refer to this worker pools by configuring the <tt>workerPool</tt> option in the <span class="error">[URI]</span> as shown below:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;route&gt;
+      &lt;from uri="netty:tcp://localhost:5021?textline=true&amp;amp;sync=true&amp;amp;workerPool=#sharedPool&amp;amp;orderedThreadPoolExecutor=false"/&gt;
+      &lt;to uri="log:result"/&gt;
+      ...
+    &lt;/route&gt;
+]]></script>
+</div></div>
+
+<p>And if we have another route we can refer to the shared worker pool:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;route&gt;
+      &lt;from uri="netty:tcp://localhost:5022?textline=true&amp;amp;sync=true&amp;amp;workerPool=#sharedPool&amp;amp;orderedThreadPoolExecutor=false"/&gt;
+      &lt;to uri="log:result"/&gt;
+      ...
+    &lt;/route&gt;
+]]></script>
+</div></div>
+<p>... and so forth.</p>
+
 
 <h3><a shape="rect" name="Netty-SeeAlso"></a>See Also</h3>
 <ul><li><a shape="rect" href="configuring-camel.html" title="Configuring Camel">Configuring Camel</a></li><li><a shape="rect" href="component.html" title="Component">Component</a></li><li><a shape="rect" href="endpoint.html" title="Endpoint">Endpoint</a></li><li><a shape="rect" href="getting-started.html" title="Getting Started">Getting Started</a></li></ul>