240.3. Spring Boot Auto-Configuration
组件支持 70 个选项,如下所列。
| Name | 描述 | 默认值 | 类型 |
|---|---|---|---|
| camel.component.netty.configuration.allow-default-codec | 如果两者都是 null,netty 组件会安装默认的 codec,则 encoder/decoder 为 null,文本为 false。将 allowDefaultCodec 设置为 false 可防止 netty 组件将默认 codec 安装为过滤器链中的第一个元素。 | true | 布尔值 |
| camel.component.netty.configuration.auto-append-delimiter | 使用文本 codec 发送时是否自动附加缺少的结束分隔符。 | true | 布尔值 |
| camel.component.netty.configuration.backlog | 允许为 netty consumer (server)配置积压。请注意,积压只是取决于操作系统的最佳努力。将此选项设置为值(如 200、500 或 1000)告知 TCP 堆栈如果未配置此选项,则接受队列的时长,则积压取决于操作系统设置。 | 整数 | |
| 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 线程池。例如,要与多个使用者共享线程池。默认情况下,每个消费者都有自己的带有 1 个核心线程的 boss 池。 | 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 使用者会将地址连接到 TCP 客户端。 | false | 布尔值 |
| camel.component.netty.configuration.client-pipeline-factory | 使用自定义 ClientPipelineFactory | ClientPipelineFactory | |
| camel.component.netty.configuration.connect-timeout | 等待套接字连接可用的时间。价值为 millis。 | 10000 | Long |
| camel.component.netty.configuration.decoder-max-line-length | 用于文本行 codec 的最大行长度。 | 1024 | 整数 |
| camel.component.netty.configuration.decoders | 要使用的解码器列表。您可以使用以逗号分开的值的 String,并在 Registry 中查找值。只需记住使用 # 前缀,以便 Camel 知道它应该查找。 | list | |
| camel.component.netty.configuration.delimiter | 用于文本行代码的分隔符。可能的值有 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 | 要使用的编码器列表。您可以使用以逗号分开的值的 String,并在 Registry 中查找值。只需记住使用 # 前缀,以便 Camel 知道它应该查找。 | list | |
| camel.component.netty.configuration.encoding | 用于文本编码的编码(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 producer 启动时未启动并运行,则可以创建频道以避免异常。 | 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 | 允许使用选项配置其他 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 | producer 池是否已启用。重要: 不要关闭此操作,因为处理并发和可靠的请求/回复需要池。 | 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 使用超时。默认情况下,没有使用超时。该值在 milli 秒内,如 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 | 这个选项支持连接较少的 udp 发送,这是实际触发和忘记的。如果没有端口侦听接收端口,则已连接的 udp 发送 PortUnreachableException。 | false | 布尔值 |
| camel.component.netty.configuration.use-channel-buffer | 如果 useChannelBuffer 为 true,则netty 生成者会在发送前将消息正文转换为 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 |