Netty HTTP

Netty HTTP

Scheme: netty-http
Syntax: netty-http:protocol:host:port/path
Description: Netty HTTP server and client using the Netty 3.x library.
Deprecated:true
Async:true
Maven: org.apache.camel/camel-netty-http/2.18.1.redhat-000025

Netty HTTP server and client using the Netty 3.x library.

Name Kind Group Required Default Type Enum Description
protocol path common true java.lang.String http
https
The protocol to use which is either http or https
host path common true java.lang.String The local hostname such as localhost, or 0.0.0.0 when being a consumer. The remote HTTP server hostname when using producer.
port path common int
path path common java.lang.String Resource path
bridgeEndpoint parameter common boolean If the option is true, the producer will ignore the Exchange.HTTP_URI header, and use the endpoint's URI for request. You may also set the throwExceptionOnFailure to be false to let the producer send all the fault response back. The consumer working in the bridge mode will skip the gzip compression and WWW URL form encoding (by adding the Exchange.SKIP_GZIP_ENCODING and Exchange.SKIP_WWW_FORM_URLENCODED headers to the consumed exchange).
disconnect parameter common boolean
keepAlive parameter common true boolean
reuseAddress parameter common true boolean
sync parameter common true boolean
tcpNoDelay parameter common true boolean
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.
matchOnUriPrefix parameter consumer boolean Whether or not Camel should try to find a target consumer by matching the URI prefix if no exact match is found.
send503whenSuspended parameter consumer true boolean Whether to send back HTTP status code 503 when the consumer has been suspended. If the option is false then the Netty Acceptor is unbound when the consumer is suspended, so clients cannot connect anymore.
backlog parameter consumer (advanced) int
bossCount parameter consumer (advanced) 1 int
bossPool parameter consumer (advanced) org.jboss.netty.channel.socket.nio.BossPool
channelGroup parameter consumer (advanced) org.jboss.netty.channel.group.ChannelGroup
chunkedMaxContentLength parameter consumer (advanced) 1048576 int Value in bytes the max content length per chunked frame received on the Netty HTTP server.
compression parameter consumer (advanced) boolean Allow using gzip/deflate for compression on the Netty HTTP server if the client supports it from the HTTP headers.
disableStreamCache parameter consumer (advanced) boolean Determines whether or not the raw input stream from Netty HttpRequest#getContent() is cached or not (Camel will read the stream into a in light-weight memory based Stream caching) cache. By default Camel will cache the Netty input stream to support reading it multiple times to ensure it Camel can retrieve all data from the stream. However you can set this option to true when you for example need to access the raw stream, such as streaming it directly to a file or other persistent store. Mind that if you enable this option, then you cannot read the Netty stream multiple times out of the box, and you would need manually to reset the reader index on the Netty raw stream.
disconnectOnNoReply parameter consumer (advanced) true boolean
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.
httpMethodRestrict parameter consumer (advanced) java.lang.String To disable HTTP methods on the Netty HTTP consumer. You can specify multiple separated by comma.
mapHeaders parameter consumer (advanced) true boolean If this option is enabled, then during binding from Netty to Camel Message then the headers will be mapped as well (eg added as header to the Camel Message as well). You can turn off this option to disable this. The headers can still be accessed from the org.apache.camel.component.netty.http.NettyHttpMessage message with the method getHttpRequest() that returns the Netty HTTP request org.jboss.netty.handler.codec.http.HttpRequest instance.
maxChannelMemorySize parameter consumer (advanced) 10485760 long
maxHeaderSize parameter consumer (advanced) 8192 int The maximum length of all headers. If the sum of the length of each header exceeds this value, a {@link TooLongFrameException} will be raised.
maxTotalMemorySize parameter consumer (advanced) 209715200 long
nettyServerBootstrapFactory parameter consumer (advanced) org.apache.camel.component.netty.NettyServerBootstrapFactory
nettySharedHttpServer parameter consumer (advanced) org.apache.camel.component.netty.http.NettySharedHttpServer To use a shared Netty HTTP server. See Netty HTTP Server Example for more details.
noReplyLogLevel parameter consumer (advanced) WARN org.apache.camel.LoggingLevel TRACE
DEBUG
INFO
WARN
ERROR
OFF
orderedThreadPoolExecutor parameter consumer (advanced) true boolean
serverClosedChannelExceptionCaughtLogLevel parameter consumer (advanced) DEBUG org.apache.camel.LoggingLevel TRACE
DEBUG
INFO
WARN
ERROR
OFF
serverExceptionCaughtLogLevel parameter consumer (advanced) WARN org.apache.camel.LoggingLevel TRACE
DEBUG
INFO
WARN
ERROR
OFF
serverPipelineFactory parameter consumer (advanced) org.apache.camel.component.netty.ServerPipelineFactory
traceEnabled parameter consumer (advanced) boolean Specifies whether to enable HTTP TRACE for this Netty HTTP consumer. By default TRACE is turned off.
urlDecodeHeaders parameter consumer (advanced) boolean If this option is enabled, then during binding from Netty to Camel Message then the header values will be URL decoded (eg %20 will be a space character. Notice this option is used by the default org.apache.camel.component.netty.http.NettyHttpBinding and therefore if you implement a custom org.apache.camel.component.netty.http.NettyHttpBinding then you would need to decode the headers accordingly to this option.
workerCount parameter consumer (advanced) int
workerPool parameter consumer (advanced) org.jboss.netty.channel.socket.nio.WorkerPool
connectTimeout parameter producer 10000 long
requestTimeout parameter producer long
throwExceptionOnFailure parameter producer true boolean Option to disable throwing the HttpOperationFailedException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code.
clientPipelineFactory parameter producer (advanced) org.apache.camel.component.netty.ClientPipelineFactory
lazyChannelCreation parameter producer (advanced) true boolean
okStatusCodeRange parameter producer (advanced) 200-299 java.lang.String The status codes which is considered a success response. The values are inclusive. The range must be defined as from-to with the dash included.

The default range is 200-299

producerPoolEnabled parameter producer (advanced) true boolean
producerPoolMaxActive parameter producer (advanced) -1 int
producerPoolMaxIdle parameter producer (advanced) 100 int
producerPoolMinEvictableIdle parameter producer (advanced) 300000 long
producerPoolMinIdle parameter producer (advanced) int
useChannelBuffer parameter producer (advanced) boolean
useRelativePath parameter producer (advanced) boolean Sets whether to use a relative path in HTTP requests.

Some third party backend systems such as IBM Datapower do not support absolute URIs in HTTP POSTs, and setting this option to true can work around this problem.

bootstrapConfiguration parameter advanced org.apache.camel.component.netty.NettyServerBootstrapConfiguration To use a custom configured NettyServerBootstrapConfiguration for configuring this endpoint.
configuration parameter advanced org.apache.camel.component.netty.http.NettyHttpConfiguration To use a custom configured NettyHttpConfiguration for configuring this endpoint.
headerFilterStrategy parameter advanced org.apache.camel.spi.HeaderFilterStrategy To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter headers.
nettyHttpBinding parameter advanced org.apache.camel.component.netty.http.NettyHttpBinding To use a custom org.apache.camel.component.netty.http.NettyHttpBinding for binding to/from Netty and Camel Message API.
options parameter advanced java.util.Map
receiveBufferSize parameter advanced 65536 long
receiveBufferSizePredictor parameter advanced int
sendBufferSize parameter advanced 65536 long
synchronous parameter advanced false boolean Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).
transferException parameter advanced boolean If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back serialized in the response as a application/x-java-serialized-object content type. On the producer side the exception will be deserialized and thrown as is, instead of the HttpOperationFailedException. The caused exception is required to be serialized.

This is by default turned off. If you enable this then be aware that Java will deserialize the incoming data from the request to Java and that can be a potential security risk.

transferExchange parameter advanced boolean
decoder parameter codec org.jboss.netty.channel.ChannelHandler To use a single decoder. This options is deprecated use encoders instead.
decoders parameter codec java.lang.String
encoder parameter codec org.jboss.netty.channel.ChannelHandler To use a single encoder. This options is deprecated use encoders instead.
encoders parameter codec java.lang.String
enabledProtocols parameter security TLSv1,TLSv1.1,TLSv1.2 java.lang.String
keyStoreFile parameter security java.io.File
keyStoreFormat parameter security JKS java.lang.String
keyStoreResource parameter security java.lang.String
needClientAuth parameter security boolean
passphrase parameter security java.lang.String
securityConfiguration parameter security org.apache.camel.component.netty.http.NettyHttpSecurityConfiguration Refers to a org.apache.camel.component.netty.http.NettyHttpSecurityConfiguration for configuring secure web resources.
securityOptions parameter security java.util.Map To configure NettyHttpSecurityConfiguration using key/value pairs from the map
securityProvider parameter security SunX509 java.lang.String
ssl parameter security boolean
sslClientCertHeaders parameter security boolean
sslContextParameters parameter security org.apache.camel.util.jsse.SSLContextParameters
sslHandler parameter security org.jboss.netty.handler.ssl.SslHandler
trustStoreFile parameter security java.io.File
trustStoreResource parameter security java.lang.String

netty-http consumer

HTTP based {@link NettyConsumer}