Table of Contents |
---|
Configuring the Netty Runtime
...
The httpn:engine-factory
element is the root element used to configure the Netty runtime used by an application. It has a single required attribute, bus, whose value is the name of the Bus that manages the Netty instances being configured.
Tip |
---|
The value is typically cxf which is the name of the default Bus instance. |
The httpn:engine-factory
element has three children that contain the information used to configure the HTTP ports instantiated by the Netty runtime factory. The children are described below.
...
Attribute | Description |
---|---|
threadPoolSize | Specifies the number of threads available to the Netty instance for processing requests. |
Anchor | ||||
---|---|---|---|---|
|
If HttpServerEngineSupport#ENABLE_HTTP2 bus property is set, Netty engine will enable the HTTP/2 support as well: HTTP/2 over cleartext (h2c) if TLS is not configured, regular HTTP/2 otherwise. It requires additional dependencies to be bundled by the application.
Code Block | ||||
---|---|---|---|---|
| ||||
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http2</artifactId>
<version>${netty.version}</version>
</dependency> |
Info |
---|
Please be aware that if you configure HTTP/2 + TLS, CXF right now only supports JDK SSL provider. |
Example
The example below shows a configuration fragment that configures a Netty instance on port number 9001.
...