240.3. Spring Boot Auto-Configuration


组件支持 70 个选项,如下所列。

Expand
名称描述默认值类型

camel.component.netty.configuration.allow-default-codec

如果两者都是 null,则 netty 组件会安装默认的 codec,textline 为 false。将 allowDefaultCodec 设置为 false 可防止 netty 组件作为过滤器链中的第一个元素安装默认的 codec。

true

布尔值

camel.component.netty.configuration.auto-append-delimiter

在使用 textline codec 发送时,是否自动附加缺少的结束分隔符。

true

布尔值

camel.component.netty.configuration.backlog

允许为 netty consumer (server)配置积压。请注意,后端只是根据操作系统的最佳努力。将此选项设置为值(如 200、500 或 1000 )告知 TCP 堆栈如果未配置此选项,则 backlog 依赖于 OS 设置。

 

整数

camel.component.netty.configuration.boss-count

当 netty 适用于 nio 模式时,它会使用来自 Netty 的默认 bossCount 参数,即 1。用户可以使用此操作覆盖 Netty 的默认 bossCount

1

整数

camel.component.netty.configuration.boss-pool

使用显式 org.jboss.netty.channel.socket.nio.BossPool 作为 boss 线程池。例如,要与多个使用者共享线程池:默认情况下,每个消费者都有自己的 boss 池,具有 1 个内核线程。

 

BossPool

camel.component.netty.configuration.broadcast

设置以选择通过 UDP 的多播

false

布尔值

camel.component.netty.configuration.channel-group

使用明确的 ChannelGroup。

 

ChannelGroup

camel.component.netty.configuration.client-mode

如果 clientMode 为 true,则 netty consumer 将地址连接为 TCP 客户端。

false

布尔值

camel.component.netty.configuration.client-pipeline-factory

使用自定义 ClientPipelineFactory

 

ClientPipelineFactory

camel.component.netty.configuration.connect-timeout

等待套接字连接的时间。价值为 in millis。

10000

Long

camel.component.netty.configuration.decoder-max-line-length

用于文本 codec 的最大行长度。

1024

整数

camel.component.netty.configuration.decoders

要使用的解码器列表。您可以使用字符串,其值用逗号分开,并在 Registry 中查找值。只需记住,使用 # so Camel 知道它应该查找的值作为前缀。

 

list

camel.component.netty.configuration.delimiter

用于文本 codec 的分隔符。可能的值有 LINE 和 NULL。

 

TextLineDelimiter

camel.component.netty.configuration.disconnect

使用后是否从 Netty Channel 断开(关闭)可用于消费者和制作者。

false

布尔值

camel.component.netty.configuration.disconnect-on-no-reply

如果启用了同步,这个选项会指定 NettyConsumer (如果应该断开连接,但没有回复来回发)。

true

布尔值

camel.component.netty.configuration.enabled-protocols

使用 SSL 时要启用的协议

TLSv1,TLSv1.1,TLSv1.2

字符串

camel.component.netty.configuration.encoders

要使用的编码程序列表。您可以使用字符串,其值用逗号分开,并在 Registry 中查找值。只需记住,使用 # so Camel 知道它应该查找的值作为前缀。

 

list

camel.component.netty.configuration.encoding

用于文本 codec 的编码(charset 名称)。如果没有提供,Camel 将使用 JVM 默认 Charset。

 

字符串

camel.component.netty.configuration.host

主机名。对于消费者,主机名为 localhost 或 0.0.0.0 对主机名是要连接的远程主机

 

字符串

camel.component.netty.configuration.keep-alive

设置以确保套接字不会因为不活跃而关闭

true

布尔值

camel.component.netty.configuration.key-store-format

用于有效负载加密的密钥存储格式。如果没有设置,则默认为 JKS

JKS

字符串

camel.component.netty.configuration.key-store-resource

用于加密的客户端侧证书密钥存储。默认情况下从 classpath 加载,但您可以使用 classpath:、file: 或 http: 前缀来加载来自不同系统的资源。

 

字符串

camel.component.netty.configuration.lazy-channel-creation

如果远程服务器在 Camel 生成者启动时没有启动并运行,可以完全创建频道以避免异常。

true

布尔值

camel.component.netty.configuration.max-channel-memory-size

使用 orderedThreadPoolExecutor 时每个频道排队事件的最大总量。指定 0 来禁用。

10485760

Long

camel.component.netty.configuration.max-total-memory-size

使用 orderedThreadPoolExecutor 时,为这个池排队事件的最大值。指定 0 来禁用。

209715200

Long

camel.component.netty.configuration.need-client-auth

配置服务器在使用 SSL 时是否需要客户端身份验证。

false

布尔值

camel.component.netty.configuration.netty-server-bootstrap-factory

使用自定义 NettyServerBootstrapFactory

 

NettyServerBootstrap Factory

camel.component.netty.configuration.network-interface

在使用 UDP 时,可以使用此选项按名称指定网络接口,如 eth0 来加入多播组。

 

字符串

camel.component.netty.configuration.no-reply-log-level

如果启用了同步,这个选项指定 NettyConsumer,在日志没有回复时使用该级别。

 

LoggingLevel

camel.component.netty.configuration.options

允许使用 option. 作为前缀配置额外的 netty 选项。例如,option.child.keepAlive=false 设置 netty 选项 child.keepAlive=false。有关使用的选项,请参阅 Netty 文档。

 

Map

camel.component.netty.configuration.ordered-thread-pool-executor

是否使用排序的线程池,以确保在同一频道中按顺序处理事件。如需了解更多详细信息,请参阅 org.jboss .netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor 的 netty javadoc。

true

布尔值

camel.component.netty.configuration.passphrase

使用密码设置来加密/解密使用 SSH 发送的有效负载

 

字符串

camel.component.netty.configuration.port

主机端口号

 

整数

camel.component.netty.configuration.producer-pool-enabled

生成者池是否启用。重要: 不要关闭此关闭,因为处理并发和可靠的请求/回复需要池。

true

布尔值

camel.component.netty.configuration.producer-pool-max-active

对池可以分配的对象数量(签出给客户端,或闲置一个给定时间等待签出)的对象数量设置上限。对没有限制使用负值。

-1

整数

camel.component.netty.configuration.producer-pool-max-idle

对池中空闲实例数量设置上限。

100

整数

camel.component.netty.configuration.producer-pool-min-evictable-idle

在空闲对象驱除者有资格驱除前,对象设置在池中闲置的最小时间(值为 millis)。

300000

Long

camel.component.netty.configuration.producer-pool-min-idle

在驱除器线程(如果活跃)生成新对象之前,设置制作者池中允许的最小实例数量。

 

整数

camel.component.netty.configuration.protocol

要使用的协议可以是 tcp 或 udp。

 

字符串

camel.component.netty.configuration.receive-buffer-size

在入站通信期间使用的 TCP/UDP 缓冲区大小。大小为字节。

65536

Long

camel.component.netty.configuration.receive-buffer-size-predictor

配置缓冲区大小预测器。请参阅 Jetty 文档以及此邮件线程的详细信息。

 

整数

camel.component.netty.configuration.request-timeout

在调用远程服务器时,允许为 Netty producer 使用超时。默认情况下,不使用超时。该值以秒为单位,因此 eg 30000 为 30 秒。requestTimeout 使用 Netty 的 ReadTimeoutHandler 触发超时。

 

Long

camel.component.netty.configuration.reuse-address

设置为方便套接字多路

true

布尔值

camel.component.netty.configuration.security-provider

用于有效负载加密的安全供应商。如果没有设置,则默认为 SunX509。

SunX509

字符串

camel.component.netty.configuration.send-buffer-size

在出站通信中使用的 TCP/UDP 缓冲区大小。大小为字节。

65536

Long

camel.component.netty.configuration.server-closed-channel-exception-caught-log-level

如果服务器(NettyConsumer)捕获 java.nio.channels.ClosedChannelException,则其使用此日志记录级别记录。这用于避免记录关闭的频道异常,因为客户端可能会突然断开连接,然后在 Netty 服务器中造成大量关闭异常。

 

LoggingLevel

camel.component.netty.configuration.server-exception-caught-log-level

如果服务器(NettyConsumer)捕获异常,则使用此日志记录级别记录它。

 

LoggingLevel

camel.component.netty.configuration.server-pipeline-factory

使用自定义 ServerPipelineFactory

 

ServerPipelineFactory

camel.component.netty.configuration.ssl

设置以指定 SSL 加密是否应用到此端点

false

布尔值

camel.component.netty.configuration.ssl-client-cert-headers

启用和采用 SSL 模式时,Netty 使用者将增强 Camel 消息,其中包含有关客户端证书的信息,如主题名称、签发者名称、序列号和有效日期范围。

false

布尔值

camel.component.netty.configuration.ssl-context-parameters

使用 SSLContextParameters 配置安全性

 

SSLContextParameters

camel.component.netty.configuration.ssl-handler

对可用于返回 SSL 处理程序的类的引用

 

SslHandler

camel.component.netty.configuration.sync

设置将端点设置为单向或请求响应

true

布尔值

camel.component.netty.configuration.tcp-no-delay

设置以提高 TCP 协议性能

true

布尔值

camel.component.netty.configuration.textline

仅用于 TCP。如果没有指定 codec,您可以使用此标志来指示基于文本行的 codec;如果没有指定或值为 false,则通过 TCP 假设 Object Serialization。

false

布尔值

camel.component.netty.configuration.transfer-exchange

仅用于 TCP。您可以通过线路而不是只传输正文来传输交换。以下字段会被传输:在 body, Out body, fault body, In headers, Out headers, fault headers, exchange properties, exchange exception。这要求对象是可序列化的。Camel 将排除任何非可序列化对象,并将其记录在 WARN 级别。

false

布尔值

camel.component.netty.configuration.trust-store-resource

用于加密的服务器端证书密钥存储。默认情况下从 classpath 加载,但您可以使用 classpath:、file: 或 http: 前缀来加载来自不同系统的资源。

 

字符串

camel.component.netty.configuration.udp-connectionless-sending

这个选项支持连接 less udp 发送,而这是真正触发并忘记的。如果没有侦听接收端口,则连接的 udp 会发送 PortUnreachableException。

false

布尔值

camel.component.netty.configuration.use-channel-buffer

如果 useChannelBuffer 为 true,则 netty producer 会在发送消息正文前将消息正文转换为 ChannelBuffer。

false

布尔值

camel.component.netty.configuration.worker-count

当 netty 适用于 nio 模式时,它将使用来自 Netty 的默认 workerCount 参数,即 cpu_core_threads2。用户可以使用此操作覆盖 Netty 的默认 workerCount

 

整数

camel.component.netty.configuration.worker-pool

使用显式 org.jboss.netty.channel.socket.nio.WorkerPool 作为 worker 线程池。例如,要与多个使用者共享线程池:默认情况下,每个使用者都有自己的 worker 池,具有 2 个 x cpu 数核心线程。

 

WorkerPool

camel.component.netty.enabled

启用 netty 组件

true

布尔值

camel.component.netty.maximum-pool-size

排序线程池的核心池大小(如果使用)。默认值为 16。

16

整数

camel.component.netty.resolve-property-placeholders

启动时组件是否应解析自身上的属性占位符。只有属于 String 类型的属性才能使用属性占位符。

true

布尔值

camel.component.netty.use-global-ssl-context-parameters

启用使用全局 SSL 上下文参数。

false

布尔值

camel.component.netty.configuration.decoder

一个自定义 ChannelHandler 类,可用于执行特殊的入站有效负载。必须覆盖 org.jboss.netty.channel.ChannelUpStreamHandler。

 

ChannelHandler

camel.component.netty.configuration.encoder

一个自定义 ChannelHandler 类,可用于执行特殊的出站有效负载。必须覆盖 org.jboss.netty.channel.ChannelDownStreamHandler。

 

ChannelHandler

camel.component.netty.configuration.key-store-file

用于加密的客户端证书密钥存储

 

File

camel.component.netty.configuration.maximum-pool-size

  

整数

camel.component.netty.configuration.trust-store-file

用于加密的服务器端证书密钥存储

 

File

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat