Modified: websites/production/camel/content/netty4.html ============================================================================== --- websites/production/camel/content/netty4.html (original) +++ websites/production/camel/content/netty4.html Tue Jan 26 11:26:54 2016 @@ -97,7 +97,7 @@ <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[netty4:tcp://localhost:99999[?options] netty4:udp://remotehost:99999/[?options] ]]></script> -</div></div><p>This component supports producer and consumer endpoints for both TCP and UDP.</p><p>You can append query options to the URI in the following format, <code>?option=value&option=value&...</code></p><h3 id="Netty4-Options">Options</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keepAlive</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to ensure socket is not closed due to inactivity</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>tcpNoDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p ><code>true</code></p></td><td colspan="1" rowspan="1" >class="confluenceTd"><p>Setting to improve TCP protocol >performance</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>backlog</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p>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 <code>200</code>, <code>500</code> >or <code>1000</code>, tells the TCP stack how long the "accept" queue can be. >If this option is not configured, then the backlog depends on OS >setting.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>broadcast</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p>Setting to choose Multicast >over UDP</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectTimeout</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>10000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Time to wait for a socket connection to be available. Value is in millis.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>reuseAddress</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to facilitate socket multiplexing</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sync</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to set endpoint as one-way or request-response</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>synchronous</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p> </td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether <a shape="rect" href="asynchronous-routing-engine.html">Asynchronous Routing Engine</a> is not in use. <code>false</code> then the <a shape="rect" href="asynchronous-routing-engine.html">Asynchronous Routing Engine</a> is used, <code>true</code> to force processing synchronous.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ssl</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to specify whether SSL encryption is applied to this endpoint</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sslClientCertHeaders</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>When enabled and in SSL mode, then the Netty consumer will enrich the Camel <a shape="rect" href="message.html">Mess age</a> with headers having information about the client certificate such as subject name, issuer name, serial number, and the valid date range.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sendBufferSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>65536 bytes</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The TCP/UDP buffer sizes to be used during outbound communication. Size is bytes.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>receiveBufferSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>65536 bytes</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The TCP/UDP buffer sizes to be used during inbound communication. Size is bytes.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>option.XXX</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan ="1" class="confluenceTd"><p>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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>corePoolSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>10</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of allocated threads at component startup. Defaults to 10. <strong>Note:</strong> This option is removed from Camel 2.9.2 onwards. As we rely on Nettys default settings.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxPoolSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>100</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The maximum number of threads that may be allocated to this endpoint. Defaults to 100. <strong >Note:</strong> This option is removed from Camel 2.9.2 onwards. As we rely on >Nettys default settings.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>disconnect</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not to >disconnect(close) from Netty Channel right after use. Can be used for both >consumer and producer.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>lazyChannelCreation</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p>Channels can be lazily >created to avoid exceptions, if the remote server is not up and running when >the Camel producer is started.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>transferExchange</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>false</co de></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Only used for TCP. You can transfer the exchange 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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>disconnectOnNoReply</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If sync is enabled then this option dictates NettyConsumer if it should disconnect where there is no reply to send back.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>noReplyLogLevel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>WARN</code></p></td><td colspan="1" rowspan="1 " class="confluenceTd"><p>If sync is enabled this option dictates NettyConsumer which logging level to use when logging a there is no reply to send back. Values are: <code>FATAL, ERROR, INFO, DEBUG, OFF</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serverExceptionCaughtLogLevel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>WARN</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If the server (NettyConsumer) catches an exception then its logged using this logging level.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serverClosedChannelExceptionCaughtLogLevel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>DEBUG</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If the server (NettyConsumer) catches an <code>java.nio.channels.ClosedChannelException</code> then its logged using this logging level. This is used to avoid logging the closed c hannel exceptions, as clients can disconnect abruptly and then cause a flod of closed exceptions in the Netty server.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>allowDefaultCodec</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>textline</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>delimiter</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>LINE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The delimiter to use for the textline codec. Possible values are <code>LINE</code> and <code>NULL</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>decoderMaxLineLength</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1024</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The max line length to use for the textline codec.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>autoAppendDelimiter</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not to auto append missing end delimiter when sending using the textline codec.</p></td></tr><tr><t d colspan="1" rowspan="1" class="confluenceTd"><p><code>encoding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The encoding (a charset name) to use for the textline codec. If not provided, Camel will use the JVM default Charset.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>workerCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 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</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sslContextParameters</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>  SSL configuration using an <code>org.apache.camel.util.jsse.SSLContextParameters</code> instance. See <a shape="rect" href="#Netty4-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>receiveBufferSizePredictor</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>requestTimeout</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Allows to use a timeout for the Netty producer when calling a remote server. By d efault no timeout is in use. The value is in milli seconds, so eg <code>30000</code> is 30 seconds. <span>The requestTimeout is using Netty's </span><span>ReadTimeoutHandler to trigger the timeout. <strong>Camel 2.16, 2.15.3</strong><span> you can also override this setting by setting the CamelNettyRequestTimeout header.</span></span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>needClientAuth</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Configures whether the server needs client authentication when using SSL.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>usingExecutorService</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to use executorService to handle the message inside the camel route, the executorService can be set from NettyComponent.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maximumPoolSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>16</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The core pool size for the ordered thread pool, if its in use. NOTE: you can just setup this on the NettyComponent level since<strong> Camel 2.15, 2.14.1.</strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolEnabled</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Producer only. Whether producer pool is enabled or not. <strong>Important:</strong> Do not turn this off, as the pooling is needed for handling concurrency and reliable request/reply.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolMaxActive</code></p></td><td colspan="1" rowspan="1" class="co nfluenceTd"><p><code>-1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolMinIdle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Producer only. Sets the minimum number of instances allowed in the producer pool before the evictor thread (if active) spawns new objects.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolMaxIdle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>100</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Producer only. Sets the cap on the number of "idle" instances in the pool.</p></td></tr><tr><td cols pan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolMinEvictableIdle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>300000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bootstrapConfiguration</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Consumer only. Allows to configure the Netty ServerBootstrap options using a <code>org.apache.camel.component.netty4.NettyServerBootstrapConfiguration</code> instance. This can be used to reuse the same configuration for multiple consumers, to align their configuration more easily.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bossGro up</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a explicit <code>io.netty.<code>channel.EventLoopGroup</code> </code> 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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>workerGroup</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a explicit <code>io.netty.channel.EventLoopGroup</code> as the worker thread pool. For example to share a thread pool with multiple consumers. By default each consumer or producer has their own worker pool with 2 x cpu count core threads.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>networkInterface</code></p></td><td colspan="1" rowspan="1" class ="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Consumer only. When using UDP then this option can be used to specify a network interface by its name, such as <code>eth0</code> to join a multicast group.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>clientInitializerFactory</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>null</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15:</strong> To use a custom client initializer factory to control the pipelines in the channel. See further below for more details.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>serverInitializerFactory</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>null</code></td><td colspan="1" rowspan="1" class="confluenceTd"><span><strong>Camel 2.15:</strong><span> </span>To use a custom server initializer factory to control the pipelines in the channel. See fu rther below for more details.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>clientPipelineFactory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><span><code>null</code></span></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Deprecated</strong>: Use clientInitializerFactory instead.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serverPipelineFactory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><span><code>null</code></span></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Deprecated</strong>: Use serverInitializerFactory instead.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>udpConnectionlessSending</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.15:</strong> Producer only.  This option supports connection less udp sendin g which is a real fire and forget. A connected udp send receive the PortUnreachableException if no one is listen on the receiving port.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>clientMode</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15:</strong> Consumer only. If the <code>clientMode</code> is true, netty consumer will connect the address as a TCP client.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>reconnect</code></td><td colspan="1" rowspan="1" class="confluenceTd"><span style="font-family: monospace;">true</span></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> Consumer only. Used only in clientMode in consumer, the consumer will attempt to reconnect on disconnection automatically.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>reconnectInterval</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>10000</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> Consumer only. Used if reconnect and clientMode is enabled. The interval in milli seconds to attempt reconnection.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="p1"><code>useByteBuf</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> Producer only. If the <code><span>useByteBuf</span> </code>is true, netty producer will turn the message body into <span>ByteBuf</span> before sending it out.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>udpByteArrayCodec</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> When using UDP protocol then turning this option to true sends the data as a byte a rray instead of the default object serialization codec.</td></tr></tbody></table></div></div><h3 id="Netty4-RegistrybasedOptions">Registry based Options</h3><p>Codec Handlers and SSL Keystores can be enlisted in the <a shape="rect" href="registry.html">Registry</a>, such as in the Spring XML file.<br clear="none"> The values that could be passed in, are the following:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>passphrase</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>password setting to use in order to encrypt/decrypt payloads sent using SSH</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keyStoreFormat</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>keystore format to be used for payload encryption. Defaults to "JKS" if not set</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>securityProvider</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Security provider to be used for payload encryption. Defaults to "SunX509" if not set.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keyStoreFile</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>deprecated:</strong> Client side certificate keystore to be used for encryption</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>trustStoreFile</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>deprecated:</strong> Server side certificate keystore to be used for encryption</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keyStoreResource</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11.1:</strong> C lient side certificate keystore to be used for encryption. Is loaded by default from classpath, but you can prefix with <code>"classpath:"</code>, <code>"file:"</code>, or <code>"http:"</code> to load the resource from different systems.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>trustStoreResource</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11.1:</strong> Server side certificate keystore to be used for encryption. Is loaded by default from classpath, but you can prefix with <code>"classpath:"</code>, <code>"file:"</code>, or <code>"http:"</code> to load the resource from different systems.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sslHandler</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Reference to a class that could be used to return an SSL Handler</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encoder</code></p></td><td colspan= "1" rowspan="1" class="confluenceTd"><p>A custom <code>ChannelHandler</code> class that can be used to perform special marshalling of outbound payloads. Must override <span style="font-family: monospace;">io.netty.channel.ChannelInboundHandlerAdapter</span>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encoders</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A list of encoders to be used. You can use a String which have values separated by comma, and have the values be looked up in the <a shape="rect" href="registry.html">Registry</a>. Just remember to prefix the value with # so Camel knows it should lookup.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>decoder</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A custom <code>ChannelHandler</code> class that can be used to perform special marshalling of inbound payloads. Must override <span style="font-family: monospace;">io.netty.channel.C hannelOutboundHandlerAdapter</span>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>decoders</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A list of decoders to be used. You can use a String which have values separated by comma, and have the values be looked up in the <a shape="rect" href="registry.html">Registry</a>. Just remember to prefix the value with # so Camel knows it should lookup.</p></td></tr></tbody></table></div></div><p><strong>Important:</strong> Read below about using non shareable encoders/decoders.</p><h4 id="Netty4-Usingnonshareableencodersordecoders">Using non shareable encoders or decoders</h4><p>If your encoders or decoders is not shareable (eg they have the @Shareable class annotation), then your encoder/decoder must implement the <code>org.apache.camel.component.netty.ChannelHandlerFactory</code> interface, and return a new instance in the <code>newChannelHandler</code> method. This is to ensure the encoder/dec oder can safely be used. If this is not the case, then the Netty component will log a WARN when<br clear="none"> an endpoint is created.</p><p>The Netty component offers a <code>org.apache.camel.component.netty.ChannelHandlerFactories</code> factory class, that has a number of commonly used methods.</p><h3 id="Netty4-SendingMessagesto/fromaNettyendpoint">Sending Messages to/from a Netty endpoint</h3><h4 id="Netty4-NettyProducer">Netty Producer</h4><p>In Producer mode, the component provides the ability to send payloads to a socket endpoint<br clear="none"> using either TCP or UDP protocols (with optional SSL support).</p><p>The producer mode supports both one-way and request-response based operations.</p><h4 id="Netty4-NettyConsumer">Netty Consumer</h4><p>In Consumer mode, the component provides the ability to:</p><ul class="alternate"><li>listen on a specified socket using either TCP or UDP protocols (with optional SSL support),</li><li>receive requests on the socket using text/xml , binary and serialized object based payloads and</li><li>send them along on a route as message exchanges.</li></ul><p>The consumer mode supports both one-way and request-response based operations.</p><h3 id="Netty4-UsageSamples">Usage Samples</h3><h4 id="Netty4-AUDPNettyendpointusingRequest-Replyandserializedobjectpayload">A UDP Netty endpoint using Request-Reply and serialized object payload</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><p>This component supports producer and consumer endpoints for both TCP and UDP.</p><p>You can append query options to the URI in the following format, <code>?option=value&option=value&...</code></p><h3 id="Netty4-Options">Options</h3><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keepAlive</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to ensure socket is not closed due to inactivity</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>tcpNoDelay</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p ><code>true</code></p></td><td colspan="1" rowspan="1" >class="confluenceTd"><p>Setting to improve TCP protocol >performance</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>backlog</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p>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 <code>200</code>, <code>500</code> >or <code>1000</code>, tells the TCP stack how long the "accept" queue can be. >If this option is not configured, then the backlog depends on OS >setting.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>broadcast</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p>Setting to choose Multicast >over UDP</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectTimeout</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>10000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Time to wait for a socket connection to be available. Value is in millis.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>reuseAddress</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to facilitate socket multiplexing</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sync</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to set endpoint as one-way or request-response</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>synchronous</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p> </td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether <a shape="rect" href="asynchronous-routing-engine.html">Asynchronous Routing Engine</a> is not in use. <code>false</code> then the <a shape="rect" href="asynchronous-routing-engine.html">Asynchronous Routing Engine</a> is used, <code>true</code> to force processing synchronous.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ssl</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Setting to specify whether SSL encryption is applied to this endpoint</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sslClientCertHeaders</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>When enabled and in SSL mode, then the Netty consumer will enrich the Camel <a shape="rect" href="message.html">Mess age</a> with headers having information about the client certificate such as subject name, issuer name, serial number, and the valid date range.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sendBufferSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>65536 bytes</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The TCP/UDP buffer sizes to be used during outbound communication. Size is bytes.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>receiveBufferSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>65536 bytes</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The TCP/UDP buffer sizes to be used during inbound communication. Size is bytes.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>option.XXX</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan ="1" class="confluenceTd"><p>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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>corePoolSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>10</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of allocated threads at component startup. Defaults to 10. <strong>Note:</strong> This option is removed from Camel 2.9.2 onwards. As we rely on Nettys default settings.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxPoolSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>100</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The maximum number of threads that may be allocated to this endpoint. Defaults to 100. <strong >Note:</strong> This option is removed from Camel 2.9.2 onwards. As we rely on >Nettys default settings.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>disconnect</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not to >disconnect(close) from Netty Channel right after use. Can be used for both >consumer and producer.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>lazyChannelCreation</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p>Channels can be lazily >created to avoid exceptions, if the remote server is not up and running when >the Camel producer is started.</p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>transferExchange</code></p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>false</co de></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Only used for TCP. You can transfer the exchange 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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>disconnectOnNoReply</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If sync is enabled then this option dictates NettyConsumer if it should disconnect where there is no reply to send back.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>noReplyLogLevel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>WARN</code></p></td><td colspan="1" rowspan="1 " class="confluenceTd"><p>If sync is enabled this option dictates NettyConsumer which logging level to use when logging a there is no reply to send back. Values are: <code>FATAL, ERROR, INFO, DEBUG, OFF</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serverExceptionCaughtLogLevel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>WARN</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If the server (NettyConsumer) catches an exception then its logged using this logging level.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serverClosedChannelExceptionCaughtLogLevel</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>DEBUG</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If the server (NettyConsumer) catches an <code>java.nio.channels.ClosedChannelException</code> then its logged using this logging level. This is used to avoid logging the closed c hannel exceptions, as clients can disconnect abruptly and then cause a flod of closed exceptions in the Netty server.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>allowDefaultCodec</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>textline</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>delimiter</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>LINE</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The delimiter to use for the textline codec. Possible values are <code>LINE</code> and <code>NULL</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>decoderMaxLineLength</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1024</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The max line length to use for the textline codec.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>autoAppendDelimiter</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether or not to auto append missing end delimiter when sending using the textline codec.</p></td></tr><tr><t d colspan="1" rowspan="1" class="confluenceTd"><p><code>encoding</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The encoding (a charset name) to use for the textline codec. If not provided, Camel will use the JVM default Charset.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>workerCount</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 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</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sslContextParameters</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>  SSL configuration using an <code>org.apache.camel.util.jsse.SSLContextParameters</code> instance. See <a shape="rect" href="#Netty4-UsingtheJSSEConfigurationUtility">Using the JSSE Configuration Utility</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>receiveBufferSizePredictor</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>requestTimeout</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Allows to use a timeout for the Netty producer when calling a remote server. By d efault no timeout is in use. The value is in milli seconds, so eg <code>30000</code> is 30 seconds. <span>The requestTimeout is using Netty's </span><span>ReadTimeoutHandler to trigger the timeout. <strong>Camel 2.16, 2.15.3</strong><span> you can also override this setting by setting the CamelNettyRequestTimeout header.</span></span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>needClientAuth</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Configures whether the server needs client authentication when using SSL.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>usingExecutorService</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether to use executorService to handle the message inside the camel route, the executorService can be set from NettyComponent.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maximumPoolSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>16</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The core pool size for the ordered thread pool, if its in use. NOTE: you can just setup this on the NettyComponent level since<strong> Camel 2.15, 2.14.1.</strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolEnabled</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Producer only. Whether producer pool is enabled or not. <strong>Important:</strong> Do not turn this off, as the pooling is needed for handling concurrency and reliable request/reply.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolMaxActive</code></p></td><td colspan="1" rowspan="1" class="co nfluenceTd"><p><code>-1</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolMinIdle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>0</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Producer only. Sets the minimum number of instances allowed in the producer pool before the evictor thread (if active) spawns new objects.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolMaxIdle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>100</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Producer only. Sets the cap on the number of "idle" instances in the pool.</p></td></tr><tr><td cols pan="1" rowspan="1" class="confluenceTd"><p><code>producerPoolMinEvictableIdle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>300000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bootstrapConfiguration</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Consumer only. Allows to configure the Netty ServerBootstrap options using a <code>org.apache.camel.component.netty4.NettyServerBootstrapConfiguration</code> instance. This can be used to reuse the same configuration for multiple consumers, to align their configuration more easily.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bossGro up</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a explicit <code>io.netty.<code>channel.EventLoopGroup</code> </code> 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.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>workerGroup</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a explicit <code>io.netty.channel.EventLoopGroup</code> as the worker thread pool. For example to share a thread pool with multiple consumers. By default each consumer or producer has their own worker pool with 2 x cpu count core threads.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">channelGroup</td><td colspan="1" rowspan="1" class="confluenceTd">null</td ><td colspan="1" rowspan="1" class="confluenceTd"><span><strong>Camel 2.17 ></strong>To use a explicit ></span><code>io.netty.channel.group.ChannelGroup</code><span> for example to >broadact a message to multiple channels.</span></td></tr><tr><td colspan="1" >rowspan="1" class="confluenceTd"><p><code>networkInterface</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p>Consumer only. When using UDP >then this option can be used to specify a network interface by its name, such >as <code>eth0</code> to join a multicast group.</p></td></tr><tr><td >colspan="1" rowspan="1" >class="confluenceTd"><code>clientInitializerFactory</code></td><td >colspan="1" rowspan="1" class="confluenceTd"><code>null</code></td><td >colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15:</strong> To >use a custom client initializer factory to control the pipelines in the >channel. See further below for more details.</td> </tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>serverInitializerFactory</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>null</code></td><td colspan="1" rowspan="1" class="confluenceTd"><span><strong>Camel 2.15:</strong><span> </span>To use a custom server initializer factory to control the pipelines in the channel. See further below for more details.</span></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>clientPipelineFactory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><span><code>null</code></span></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Deprecated</strong>: Use clientInitializerFactory instead.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serverPipelineFactory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><span><code>null</code></span></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Deprecated</strong>: Use serverInitializ erFactory instead.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>udpConnectionlessSending</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.15:</strong> Producer only.  This option supports connection less udp sending which is a real fire and forget. A connected udp send receive the PortUnreachableException if no one is listen on the receiving port.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>clientMode</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15:</strong> Consumer only. If the <code>clientMode</code> is true, netty consumer will connect the address as a TCP client.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>reconnect</code></td><td colspan="1" rowspan="1" class="confluenceTd"><spa n style="font-family: monospace;">true</span></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> Consumer only. Used only in clientMode in consumer, the consumer will attempt to reconnect on disconnection automatically.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>reconnectInterval</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>10000</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> Consumer only. Used if reconnect and clientMode is enabled. The interval in milli seconds to attempt reconnection.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p class="p1"><code>useByteBuf</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> Producer only. If the <code><span>useByteBuf</span> </code>is true, netty producer will turn the message body into <span>ByteB uf</span> before sending it out.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>udpByteArrayCodec</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> When using UDP protocol then turning this option to true sends the data as a byte array instead of the default object serialization codec.</td></tr></tbody></table></div></div><h3 id="Netty4-RegistrybasedOptions">Registry based Options</h3><p>Codec Handlers and SSL Keystores can be enlisted in the <a shape="rect" href="registry.html">Registry</a>, such as in the Spring XML file.<br clear="none"> The values that could be passed in, are the following:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1 " rowspan="1" class="confluenceTd"><p><code>passphrase</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>password setting to use in order to encrypt/decrypt payloads sent using SSH</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keyStoreFormat</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>keystore format to be used for payload encryption. Defaults to "JKS" if not set</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>securityProvider</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Security provider to be used for payload encryption. Defaults to "SunX509" if not set.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keyStoreFile</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>deprecated:</strong> Client side certificate keystore to be used for encryption</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><cod e>trustStoreFile</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>deprecated:</strong> Server side certificate keystore to be used for encryption</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>keyStoreResource</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11.1:</strong> Client side certificate keystore to be used for encryption. Is loaded by default from classpath, but you can prefix with <code>"classpath:"</code>, <code>"file:"</code>, or <code>"http:"</code> to load the resource from different systems.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>trustStoreResource</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11.1:</strong> Server side certificate keystore to be used for encryption. Is loaded by default from classpath, but you can prefix with <code>"classpath:"</code>, <code>"file:"</code>, or <code>"http:"</code> to load th e resource from different systems.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sslHandler</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Reference to a class that could be used to return an SSL Handler</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encoder</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A custom <code>ChannelHandler</code> class that can be used to perform special marshalling of outbound payloads. Must override <span style="font-family: monospace;">io.netty.channel.ChannelInboundHandlerAdapter</span>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>encoders</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A list of encoders to be used. You can use a String which have values separated by comma, and have the values be looked up in the <a shape="rect" href="registry.html">Registry</a>. Just remember to prefix the value with # so Camel knows it should lookup.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>decoder</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A custom <code>ChannelHandler</code> class that can be used to perform special marshalling of inbound payloads. Must override <span style="font-family: monospace;">io.netty.channel.ChannelOutboundHandlerAdapter</span>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>decoders</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A list of decoders to be used. You can use a String which have values separated by comma, and have the values be looked up in the <a shape="rect" href="registry.html">Registry</a>. Just remember to prefix the value with # so Camel knows it should lookup.</p></td></tr></tbody></table></div></div><p><strong>Important:</strong> Read below about using non shareable encoders/decoders.</p><h4 id="Netty4-Usingnonshareableencodersordecoders">Using no n shareable encoders or decoders</h4><p>If your encoders or decoders is not shareable (eg they have the @Shareable class annotation), then your encoder/decoder must implement the <code>org.apache.camel.component.netty.ChannelHandlerFactory</code> interface, and return a new instance in the <code>newChannelHandler</code> method. This is to ensure the encoder/decoder can safely be used. If this is not the case, then the Netty component will log a WARN when<br clear="none"> an endpoint is created.</p><p>The Netty component offers a <code>org.apache.camel.component.netty.ChannelHandlerFactories</code> factory class, that has a number of commonly used methods.</p><h3 id="Netty4-SendingMessagesto/fromaNettyendpoint">Sending Messages to/from a Netty endpoint</h3><h4 id="Netty4-NettyProducer">Netty Producer</h4><p>In Producer mode, the component provides the ability to send payloads to a socket endpoint<br clear="none"> using either TCP or UDP protocols (with optional SSL support).</p><p>Th e producer mode supports both one-way and request-response based operations.</p><h4 id="Netty4-NettyConsumer">Netty Consumer</h4><p>In Consumer mode, the component provides the ability to:</p><ul class="alternate"><li>listen on a specified socket using either TCP or UDP protocols (with optional SSL support),</li><li>receive requests on the socket using text/xml, binary and serialized object based payloads and</li><li>send them along on a route as message exchanges.</li></ul><p>The consumer mode supports both one-way and request-response based operations.</p><h3 id="Netty4-UsageSamples">Usage Samples</h3><h4 id="Netty4-AUDPNettyendpointusingRequest-Replyandserializedobjectpayload">A UDP Netty endpoint using Request-Reply and serialized object payload</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[RouteBuilder builder = new RouteBuilder() { public void configure() { from("netty4:udp://localhost:5155?sync=true")
Modified: websites/production/camel/content/release-guide.html ============================================================================== --- websites/production/camel/content/release-guide.html (original) +++ websites/production/camel/content/release-guide.html Tue Jan 26 11:26:54 2016 @@ -137,10 +137,11 @@ </div></div><p>It is also essential that you configure your umask to 2 on people.apache.org for non-interactive login. You can do that by including the snipped below in your <code>.profile</code>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: text; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[umask 002 ]]></script> -</div></div><h3 id="ReleaseGuide-CreatingtheCamelRelease"><span style="line-height: 1.5625;">Creating the Camel Release</span></h3><p>The release plugin will prompt for a release version, tag and next release version. Use a three digit release version of the form: 2.x.x and for the tag use a string of the form: camel-2.x.x. The next version string should use the two digit from: 2.x-SNAPSHOT as this can be consistent for future SNAPSHOT releases.</p><ol><li><p>Grab the latest source from Git</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><h3 id="ReleaseGuide-CreatingtheCamelRelease"><span style="line-height: 1.5625;">Creating the Camel Release</span></h3><p>The release plugin will prompt for a release version, tag and next release version. Use a three digit release version of the form: 2.x.x and for the tag use a string of the form: camel-2.x.x. The next version string should use the two digit from: 2.x-SNAPSHOT as this can be consistent for future SNAPSHOT releases.</p><ol><li><p>Grab the latest source from Git and checkout the target branch to build from</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: text; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[git clone https://git-wip-us.apache.org/repos/asf/camel.git cd camel -]]></script> + +git checkout BRANCH_NAME # e.g. BRANCH_NAME = camel-2.16.x]]></script> </div></div></li><li><p>Verify headers with <a shape="rect" class="external-link" href="http://creadur.apache.org/rat/apache-rat-plugin/usage.html">rat</a></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: text; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[mvn -e org.apache.rat:apache-rat-plugin:check grep -e ' !?????' target/rat.txt # will show any files without licenses @@ -167,7 +168,7 @@ gpg: Good signature from "Christian </div></div><p>again.</p></div></div></li><li><p>Perform the release to the staging repo</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: text; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[mvn release:perform -Prelease ]]></script> -</div></div></li><li>Close the staging repository<br clear="none"> Quote from the <a shape="rect" class="external-link" href="http://maven.apache.org/developers/release/apache-release.html">Maven release guide for Apache projects</a><blockquote><p>Login to <a shape="rect" class="external-link" href="https://repository.apache.org">https://repository.apache.org</a> using your Apache LDAP credentials. Click on "Staging Repositories". Then select "org.apache.camel-xxx" in the list of repositories, where xxx represents your username and ip. Click "Close" on the tool bar above. This will close the repository from future deployments and make it available for others to view. If you are staging multiple releases together, skip this step until you have staged everything. Enter the name and version of the artifact being released in the "Description" field and then click "Close". This will make it easier to identify it later.</p></blockquote>See the screenshot below that shows the state of the staging repository at this stage.<br clear="none"><br clear="none"><span class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img class="confluence-embedded-image" height="250" src="release-guide.data/apache-nexus-close-repo.png" data-image-src="/confluence/download/attachments/68287/apache-nexus-close-repo.png?version=1&modificationDate=1448317837000&api=v2" data-unresolved-comment-count="0" data-linked-resource-id="61330078" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="apache-nexus-close-repo.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="68287" data-linked-resource-container-version="108"></span><br clear="none"><br clear="none"></li><li>Verify staged artifacts<br clear="none"> Quote from the <a shape="rect" class="external-link" href="http://maven.apache.org/developers/release/apache-release.html">o riginal guide</a><blockquote><p>If you click on your repository, a tree view will appear below. You can then browse the contents to ensure the artifacts are as you expect them. Pay particular attention to the existence of *.asc (signature) files. If the you don't like the content of the repository, right click your repository and choose "Drop". You can then rollback your release and repeat the process.<br clear="none"> Note the repository URL, you will need this in your vote email.</p></blockquote></li></ol><h2 id="ReleaseGuide-TestingtheCamelReleaseCandidate">Testing the Camel Release Candidate</h2><p>When folks need to test out a release candidate, the jars will not have been uploaded to the central Maven repo. This means that the example programs which use Maven will not automatically work and you need to follow the <a shape="rect" href="testing-a-release-candidate.html">Testing a release candidate</a> guidelines.<br clear="none"> Afterwards send out the VOTE for this release can didate to the dev@ mailing list.</p><h2 id="ReleaseGuide-Manuallyupdatingfiles">Manually updating files</h2><p>From camel 2.14.x, you don't need to update the  pom version of the below modules if you already specify the -Prelease in the mvn release:xxx command.</p><p>The <code>pom.xml</code> files in <code>etc</code>, <code>tests/camel-itest-karaf</code>, <code>tests/camel-itest-osgi</code>, <code>tests/camel-itest-performance</code> and <code>tests/camel-performance</code> need to be manually updated with the Camel version number in the <code><parent></code> tag.</p><h2 id="ReleaseGuide-AnnouncingtheCamelRelease">Announcing the Camel Release</h2><p>If the VOTE pass,</p><ol><li>Close it by sending the RESULT to the mailing list.</li><li>Promote the artifacts to the central repo. For this login to <a shape="rect" class="external-link" href="https://repository.apache.org">https://repository.apache.org</a> using your Apache LDAP credentials. Click on "Staging Repositories". Select "org.apache.camel-xxx" in the list of repositories, where xxx represents your username and ip. Click "Release" on the tool bar above. This will promote all artifacts to the central maven repo. Enter the name and version of the artifact being released in the "Description" field and then click "Release". This will make it easier to identify it later.</li><li>Perform a <a shape="rect" class="external-link" href="https://issues.apache.org/jira/plugins/servlet/project-config/CAMEL/versions">release in JIRA</a> and create a new release version in JIRA</li><li>There should be already a release notes page in the <a shape="rect" href="https://cwiki.apache.org/confluence/display/CAMEL/In+Progress">In Progress</a> folder (if not create one based on the <a shape="rect" href="https://cwiki.apache.org/confluence/display/CAMEL/Camel%20x.y.z%20Release%20(template)">Camel x.y.z Release (template)</a>). Edit it and change the number of fixed issues, and update its parent to be the <a shape="re ct" href="https://cwiki.apache.org/confluence/display/CAMEL/Download">Download</a> page, and <strong>make sure</strong> to remove the (release in progress) in the title. Now would be a good time to create a new release notes page for the next release based on the template mentioned before. It is useful and simpler to keep it up to date during the development cycle.</li><li><p>Copy the newly deployed distribution to Apache website:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div></li><li>Close the staging repository<br clear="none"> Quote from the <a shape="rect" class="external-link" href="http://maven.apache.org/developers/release/apache-release.html">Maven release guide for Apache projects</a><blockquote><p>Login to <a shape="rect" class="external-link" href="https://repository.apache.org">https://repository.apache.org</a> using your Apache LDAP credentials. Click on "Staging Repositories". Then select "org.apache.camel-xxx" in the list of repositories, where xxx represents your username and ip. Click "Close" on the tool bar above. This will close the repository from future deployments and make it available for others to view. If you are staging multiple releases together, skip this step until you have staged everything. Enter the name and version of the artifact being released in the "Description" field and then click "Close". This will make it easier to identify it later.</p></blockquote>See the screenshot below that shows the state of the staging repository at this stage.<br clear="none"><br clear="none"><span class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img class="confluence-embedded-image" height="250" src="release-guide.data/apache-nexus-close-repo.png" data-image-src="/confluence/download/attachments/68287/apache-nexus-close-repo.png?version=1&modificationDate=1448317837000&api=v2" data-unresolved-comment-count="0" data-linked-resource-id="61330078" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="apache-nexus-close-repo.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="68287" data-linked-resource-container-version="109"></span><br clear="none"><br clear="none"></li><li>Verify staged artifacts<br clear="none"> Quote from the <a shape="rect" class="external-link" href="http://maven.apache.org/developers/release/apache-release.html">o riginal guide</a><blockquote><p>If you click on your repository, a tree view will appear below. You can then browse the contents to ensure the artifacts are as you expect them. Pay particular attention to the existence of *.asc (signature) files. If the you don't like the content of the repository, right click your repository and choose "Drop". You can then rollback your release and repeat the process.<br clear="none"> Note the repository URL, you will need this in your vote email.</p></blockquote></li></ol><h2 id="ReleaseGuide-TestingtheCamelReleaseCandidate">Testing the Camel Release Candidate</h2><p>When folks need to test out a release candidate, the jars will not have been uploaded to the central Maven repo. This means that the example programs which use Maven will not automatically work and you need to follow the <a shape="rect" href="testing-a-release-candidate.html">Testing a release candidate</a> guidelines.<br clear="none"> Afterwards send out the VOTE for this release can didate to the dev@ mailing list.</p><h2 id="ReleaseGuide-Manuallyupdatingfiles">Manually updating files</h2><p>From camel 2.14.x, you don't need to update the  pom version of the below modules if you already specify the -Prelease in the mvn release:xxx command.</p><p>The <code>pom.xml</code> files in <code>etc</code>, <code>tests/camel-itest-karaf</code>, <code>tests/camel-itest-osgi</code>, <code>tests/camel-itest-performance</code> and <code>tests/camel-performance</code> need to be manually updated with the Camel version number in the <code><parent></code> tag.</p><h2 id="ReleaseGuide-AnnouncingtheCamelRelease">Announcing the Camel Release</h2><p>If the VOTE pass,</p><ol><li>Close it by sending the RESULT to the mailing list.</li><li>Promote the artifacts to the central repo. For this login to <a shape="rect" class="external-link" href="https://repository.apache.org">https://repository.apache.org</a> using your Apache LDAP credentials. Click on "Staging Repositories". Select "org.apache.camel-xxx" in the list of repositories, where xxx represents your username and ip. Click "Release" on the tool bar above. This will promote all artifacts to the central maven repo. Enter the name and version of the artifact being released in the "Description" field and then click "Release". This will make it easier to identify it later.</li><li>Perform a <a shape="rect" class="external-link" href="https://issues.apache.org/jira/plugins/servlet/project-config/CAMEL/versions">release in JIRA</a> and create a new release version in JIRA</li><li>There should be already a release notes page in the <a shape="rect" href="https://cwiki.apache.org/confluence/display/CAMEL/In+Progress">In Progress</a> folder (if not create one based on the <a shape="rect" href="https://cwiki.apache.org/confluence/display/CAMEL/Camel%20x.y.z%20Release%20(template)">Camel x.y.z Release (template)</a>). Edit it and change the number of fixed issues, and update its parent to be the <a shape="re ct" href="https://cwiki.apache.org/confluence/display/CAMEL/Download">Download</a> page, and <strong>make sure</strong> to remove the (release in progress) in the title. Now would be a good time to create a new release notes page for the next release based on the template mentioned before. It is useful and simpler to keep it up to date during the development cycle.</li><li><p>Copy the newly deployed distribution to Apache website:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: text; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[cd ${CAMEL_ROOT_DIR}/etc/scripts release-distro.sh <Camel version> ]]></script> Modified: websites/production/camel/content/rest-dsl.html ============================================================================== --- websites/production/camel/content/rest-dsl.html (original) +++ websites/production/camel/content/rest-dsl.html Tue Jan 26 11:26:54 2016 @@ -289,7 +289,14 @@ public class UserPojo { .setBody().constant("Invalid json data"); ]]></script> -</div></div><p> </p><h3 id="RestDSL-IntegratingaCamelcomponentwithRestDSL">Integrating a Camel component with Rest DSL</h3><p>Any Apache Camel component can integrate with the Rest DSL if they can be used as a REST service (eg as a REST consumer in Camel lingo). To integrate with the Rest DSL, then the component should implement the <code>org.apache.camel.spi.RestConsumerFactory</code>. The Rest DSL will then invoke the <code>createConsumer</code> method when it setup the Camel routes from the defined DSL. The component should then implement logic to create a Camel consumer that exposes the REST services based on the given parameters, such as path, verb, and other options. For example see the source code for camel-restlet, camel-spark-rest.</p><h3 id="RestDSL-SwaggerAPI">Swagger API</h3><p>The Rest DSL supports <a shape="rect" href="swagger-java.html">Swagger Java</a> by the <code>camel-swagger-java</code> module. See more details at  <a shape="rect" hr ef="swagger-java.html">Swagger</a> and the <code>camel-swagger-java</code> example from the Apache Camel distribution.</p><p>From <strong>Camel 2.16</strong> onwards you can define each parameter fine grained with details such as name, description, data type, parameter type and so on, using the <param>. For example to define the id path parameter you can do as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><p> </p><h3 id="RestDSL-ParameterdefaultValues">Parameter default Values</h3><p>You can specify default values for parameters in the rest-dsl, such as the verbose parameter below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[ rest("/customers/") + .get("/{id}").to("direct:customerDetail") + .get("/{id}/orders") + .param().name("verbose").type(RestParamType.query).defaultValue("false").description("Verbose order details").endParam() + .to("direct:customerOrders") + .post("/neworder").to("direct:customerNewOrder");]]></script> +</div></div><p>From <strong>Camel 2.17</strong> onwards then the default value is automatic set as header on the incoming Camel <code>Message</code>. So if the call the <code>/customers/id/orders</code> do not include a query parameter with key <code>verbose</code> then Camel will now include a header with key <code>verbose</code> and the value <code>false</code> because it was declared as the default value. This functionality is only applicable for query parameters.</p><h3 id="RestDSL-IntegratingaCamelcomponentwithRestDSL">Integrating a Camel component with Rest DSL</h3><p>Any Apache Camel component can integrate with the Rest DSL if they can be used as a REST service (eg as a REST consumer in Camel lingo). To integrate with the Rest DSL, then the component should implement the <code>org.apache.camel.spi.RestConsumerFactory</code>. The Rest DSL will then invoke the <code>createConsumer</code> method when it setup the Camel routes from the def ined DSL. The component should then implement logic to create a Camel consumer that exposes the REST services based on the given parameters, such as path, verb, and other options. For example see the source code for camel-restlet, camel-spark-rest.</p><h3 id="RestDSL-SwaggerAPI">Swagger API</h3><p>The Rest DSL supports <a shape="rect" href="swagger-java.html">Swagger Java</a> by the <code>camel-swagger-java</code> module. See more details at  <a shape="rect" href="swagger-java.html">Swagger</a> and the <code>camel-swagger-java</code> example from the Apache Camel distribution.</p><p>From <strong>Camel 2.16</strong> onwards you can define each parameter fine grained with details such as name, description, data type, parameter type and so on, using the <param>. For example to define the id path parameter you can do as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[<!-- this is a rest GET to view an user by the given id --> <get uri="/{id}" outType="org.apache.camel.example.rest.User"> <description>Find user by id</description>