Socket level networking using TCP or UDP with the Netty 3.x library.
Name | Kind | Group | Required | Default | Type | Enum | Description |
---|---|---|---|---|---|---|---|
protocol | path | common | true | java.lang.String | tcp udp |
The protocol to use which can be tcp or udp. | |
host | path | common | true | java.lang.String | The hostname. For the consumer the hostname is localhost or 0.0.0.0 For the producer the hostname is the remote host to connect to | ||
port | path | common | true | int | The host port number | ||
disconnect | parameter | common | boolean | Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both consumer and producer. | |||
keepAlive | parameter | common | true | boolean | Setting to ensure socket is not closed due to inactivity | ||
reuseAddress | parameter | common | true | boolean | Setting to facilitate socket multiplexing | ||
sync | parameter | common | true | boolean | Setting to set endpoint as one-way or request-response | ||
tcpNoDelay | parameter | common | true | boolean | Setting to improve TCP protocol performance | ||
bridgeErrorHandler | parameter | consumer | boolean | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN/ERROR level and ignored. | |||
broadcast | parameter | consumer | boolean | Setting to choose Multicast over UDP | |||
clientMode | parameter | consumer | boolean | If the clientMode is true, netty consumer will connect the address as a TCP client. | |||
backlog | parameter | consumer (advanced) | int | 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 200, 500 or 1000, tells the TCP stack how long the "accept" queue can be If this option is not configured, then the backlog depends on OS setting. | |||
bossCount | parameter | consumer (advanced) | 1 | int | When netty works on nio mode, it uses default bossCount parameter from Netty, which is 1. User can use this operation to override the default bossCount from Netty | ||
bossPool | parameter | consumer (advanced) | org.jboss.netty.channel.socket.nio.BossPool | To use a explicit org.jboss.netty.channel.socket.nio.BossPool 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. | |||
channelGroup | parameter | consumer (advanced) | org.jboss.netty.channel.group.ChannelGroup | To use a explicit ChannelGroup. | |||
disconnectOnNoReply | parameter | consumer (advanced) | true | boolean | If sync is enabled then this option dictates NettyConsumer if it should disconnect where there is no reply to send back. | ||
exceptionHandler | parameter | consumer (advanced) | org.apache.camel.spi.ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions, that will be logged at WARN/ERROR level and ignored. | |||
exchangePattern | parameter | consumer (advanced) | org.apache.camel.ExchangePattern | InOnly RobustInOnly InOut InOptionalOut OutOnly RobustOutOnly OutIn OutOptionalIn |
Sets the exchange pattern when the consumer creates an exchange. | ||
maxChannelMemorySize | parameter | consumer (advanced) | 10485760 | long | The maximum total size of the queued events per channel when using orderedThreadPoolExecutor. Specify 0 to disable. | ||
maxTotalMemorySize | parameter | consumer (advanced) | 209715200 | long | The maximum total size of the queued events for this pool when using orderedThreadPoolExecutor. Specify 0 to disable. | ||
nettyServerBootstrapFactory | parameter | consumer (advanced) | org.apache.camel.component.netty.NettyServerBootstrapFactory | To use a custom NettyServerBootstrapFactory | |||
networkInterface | parameter | consumer (advanced) | java.lang.String | When using UDP then this option can be used to specify a network interface by its name, such as eth0 to join a multicast group. | |||
noReplyLogLevel | parameter | consumer (advanced) | WARN | org.apache.camel.LoggingLevel | TRACE DEBUG INFO WARN ERROR OFF |
If sync is enabled this option dictates NettyConsumer which logging level to use when logging a there is no reply to send back. | |
orderedThreadPoolExecutor | parameter | consumer (advanced) | true | boolean | Whether to use ordered thread pool, to ensure events are processed orderly on the same channel. See details at the netty javadoc of org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor for more details. | ||
serverClosedChannelExceptionCaughtLogLevel | parameter | consumer (advanced) | DEBUG | org.apache.camel.LoggingLevel | TRACE DEBUG INFO WARN ERROR OFF |
If the server (NettyConsumer) catches an java.nio.channels.ClosedChannelException 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 flood of closed exceptions in the Netty server. | |
serverExceptionCaughtLogLevel | parameter | consumer (advanced) | WARN | org.apache.camel.LoggingLevel | TRACE DEBUG INFO WARN ERROR OFF |
If the server (NettyConsumer) catches an exception then its logged using this logging level. | |
serverPipelineFactory | parameter | consumer (advanced) | org.apache.camel.component.netty.ServerPipelineFactory | To use a custom ServerPipelineFactory | |||
workerCount | parameter | consumer (advanced) | int | 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 | |||
workerPool | parameter | consumer (advanced) | org.jboss.netty.channel.socket.nio.WorkerPool | To use a explicit org.jboss.netty.channel.socket.nio.WorkerPool 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. | |||
connectTimeout | parameter | producer | 10000 | long | Time to wait for a socket connection to be available. Value is in millis. | ||
requestTimeout | parameter | producer | long | 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 30000 is 30 seconds. The requestTimeout is using Netty's ReadTimeoutHandler to trigger the timeout. | |||
clientPipelineFactory | parameter | producer (advanced) | org.apache.camel.component.netty.ClientPipelineFactory | To use a custom ClientPipelineFactory | |||
lazyChannelCreation | parameter | producer (advanced) | true | boolean | Channels can be lazily created to avoid exceptions, if the remote server is not up and running when the Camel producer is started. | ||
producerPoolEnabled | parameter | producer (advanced) | true | boolean | Whether producer pool is enabled or not. Important: Do not turn this off, as the pooling is needed for handling concurrency and reliable request/reply. | ||
producerPoolMaxActive | parameter | producer (advanced) | -1 | int | 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. | ||
producerPoolMaxIdle | parameter | producer (advanced) | 100 | int | Sets the cap on the number of "idle" instances in the pool. | ||
producerPoolMinEvictableIdle | parameter | producer (advanced) | 300000 | long | 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. | ||
producerPoolMinIdle | parameter | producer (advanced) | int | Sets the minimum number of instances allowed in the producer pool before the evictor thread (if active) spawns new objects. | |||
udpConnectionlessSending | parameter | producer (advanced) | boolean | 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. | |||
useChannelBuffer | parameter | producer (advanced) | boolean | If the useChannelBuffer is true, netty producer will turn the message body into {@link ChannelBuffer} before sending it out. | |||
bootstrapConfiguration | parameter | advanced | org.apache.camel.component.netty.NettyServerBootstrapConfiguration | To use a custom configured NettyServerBootstrapConfiguration for configuring this endpoint. | |||
options | parameter | advanced | java.util.Map |
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. | |||
receiveBufferSize | parameter | advanced | 65536 | long | The TCP/UDP buffer sizes to be used during inbound communication. Size is bytes. | ||
receiveBufferSizePredictor | parameter | advanced | int | Configures the buffer size predictor. See details at Jetty documentation and this mail thread. | |||
sendBufferSize | parameter | advanced | 65536 | long | The TCP/UDP buffer sizes to be used during outbound communication. Size is bytes. | ||
synchronous | parameter | advanced | false | boolean | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | ||
transferExchange | parameter | advanced | boolean | 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. | |||
allowDefaultCodec | parameter | codec | true | boolean | 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. | ||
autoAppendDelimiter | parameter | codec | true | boolean | Whether or not to auto append missing end delimiter when sending using the textline codec. | ||
decoder | parameter | codec | org.jboss.netty.channel.ChannelHandler | A custom ChannelHandler class that can be used to perform special marshalling of inbound payloads. Must override org.jboss.netty.channel.ChannelUpStreamHandler. | |||
decoderMaxLineLength | parameter | codec | 1024 | int | The max line length to use for the textline codec. | ||
decoders | parameter | codec | java.lang.String | 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 Registry. Just remember to prefix the value with # so Camel knows it should lookup. | |||
delimiter | parameter | codec | LINE | org.apache.camel.component.netty.TextLineDelimiter | LINE NULL |
The delimiter to use for the textline codec. Possible values are LINE and NULL. | |
encoder | parameter | codec | org.jboss.netty.channel.ChannelHandler | A custom ChannelHandler class that can be used to perform special marshalling of outbound payloads. Must override org.jboss.netty.channel.ChannelDownStreamHandler. | |||
encoders | parameter | codec | java.lang.String | 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 Registry. Just remember to prefix the value with # so Camel knows it should lookup. | |||
encoding | parameter | codec | java.lang.String | The encoding (a charset name) to use for the textline codec. If not provided, Camel will use the JVM default Charset. | |||
textline | parameter | codec | boolean | 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. | |||
enabledProtocols | parameter | security | TLSv1,TLSv1.1,TLSv1.2 | java.lang.String | Which protocols to enable when using SSL | ||
keyStoreFile | parameter | security | java.io.File | Client side certificate keystore to be used for encryption | |||
keyStoreFormat | parameter | security | JKS | java.lang.String | Keystore format to be used for payload encryption. Defaults to "JKS" if not set | ||
keyStoreResource | parameter | security | java.lang.String | Client side certificate keystore to be used for encryption. Is loaded by default from classpath, but you can prefix with "classpath:", "file:", or "http:" to load the resource from different systems. | |||
needClientAuth | parameter | security | boolean | Configures whether the server needs client authentication when using SSL. | |||
passphrase | parameter | security | java.lang.String | Password setting to use in order to encrypt/decrypt payloads sent using SSH | |||
securityProvider | parameter | security | SunX509 | java.lang.String | Security provider to be used for payload encryption. Defaults to "SunX509" if not set. | ||
ssl | parameter | security | boolean | Setting to specify whether SSL encryption is applied to this endpoint | |||
sslClientCertHeaders | parameter | security | boolean | When enabled and in SSL mode, then the Netty consumer will enrich the Camel Message with headers having information about the client certificate such as subject name, issuer name, serial number, and the valid date range. | |||
sslContextParameters | parameter | security | org.apache.camel.util.jsse.SSLContextParameters | To configure security using SSLContextParameters | |||
sslHandler | parameter | security | org.jboss.netty.handler.ssl.SslHandler | Reference to a class that could be used to return an SSL Handler | |||
trustStoreFile | parameter | security | java.io.File | Server side certificate keystore to be used for encryption | |||
trustStoreResource | parameter | security | java.lang.String | Server side certificate keystore to be used for encryption. Is loaded by default from classpath, but you can prefix with "classpath:", "file:", or "http:" to load the resource from different systems. |