225.3. Spring Boot Auto-Configuration
组件支持 29 个选项,如下所列。
| Name | 描述 | 默认值 | 类型 |
|---|---|---|---|
| camel.component.mina2.configuration.allow-default-codec | 如果两者都为 null,mina 组件会安装默认的 codec,文本行为 false。将 allowDefaultCodec 设置为 false 可防止 mina 组件将默认 codec 安装为过滤器链中的第一个元素。当另一个过滤器必须是过滤器链中的第一个过滤器(如 SSL 过滤器)时,这非常有用。 | true | 布尔值 |
| camel.component.mina2.configuration.auto-start-tls | 是否自动启动 SSL 握手。 | true | 布尔值 |
| camel.component.mina2.configuration.cached-address | 是否在创建 InetAddress 一次并重复使用。把它设置为 false 允许选择网络中的 DNS 更改。 | true | 布尔值 |
| camel.component.mina2.configuration.client-mode | 如果 clientMode 为 true,mina consumer 会将地址连接到 TCP 客户端。 | false | 布尔值 |
| camel.component.mina2.configuration.codec | 使用自定义 minda codec 实施。 | ProtocolCodecFactory | |
| camel.component.mina2.configuration.decoder-max-line-length | 要设置文本行协议解码器最大行长度。默认情况下,使用 Mina 本身的默认值,即 1024。 | 1024 | 整数 |
| camel.component.mina2.configuration.disconnect | 使用后是否从 Mina 会话断开(close)。可用于使用者和制作者。 | false | 布尔值 |
| camel.component.mina2.configuration.disconnect-on-no-reply | 如果启用了同步,则此选项将指定 MinaConsumer (如果它应该断开连接),没有回复回来。 | true | 布尔值 |
| camel.component.mina2.configuration.encoder-max-line-length | 要设置文本行协议编码器最大行长度。默认情况下,使用 Mina 本身的默认值,即 Integer.MAX_VALUE。 | -1 | 整数 |
| camel.component.mina2.configuration.encoding | 您可以配置编码(字符名称)以用于 TCP 文本 codec 和 UDP 协议。如果没有提供,Camel 将使用 JVM 默认 Charset | 字符串 | |
| camel.component.mina2.configuration.filters | 您可以设置要使用的 Mina IoFilters 列表。 | list | |
| camel.component.mina2.configuration.host | 要使用的主机名。将 localhost 或 0.0.0.0 用于本地服务器作为消费者。对于生成者,请使用远程服务器的主机名或 ip 地址。 | 字符串 | |
| camel.component.mina2.configuration.lazy-session-creation | 如果远程服务器在 Camel producer 启动时未启动并在运行,则会话可能会被创建来避免异常。 | true | 布尔值 |
| camel.component.mina2.configuration.maximum-pool-size | TCP 和 UDP 的 worker 池中 worker 线程数量 | 16 | 整数 |
| camel.component.mina2.configuration.mina-logger | 您可以启用 Apache MINA 日志记录过滤器。Apache MINA 在 INFO 级别使用 slf4j 日志记录来记录所有输入和输出。 | false | 布尔值 |
| camel.component.mina2.configuration.no-reply-log-level | 如果启用了同步,这个选项会指示 MinaConsumer,在记录一个没有回复时要使用的日志记录级别。 | LoggingLevel | |
| camel.component.mina2.configuration.ordered-thread-pool-executor | 是否使用排序的线程池,确保同一通道上按顺序处理事件。 | true | 布尔值 |
| camel.component.mina2.configuration.port | 端口号 | 整数 | |
| camel.component.mina2.configuration.protocol | 要使用的协议 | 字符串 | |
| camel.component.mina2.configuration.ssl-context-parameters | 配置 SSL 安全性。 | SSLContextParameters | |
| camel.component.mina2.configuration.sync | 将端点设置为单向或请求响应。 | true | 布尔值 |
| camel.component.mina2.configuration.textline | 仅用于 TCP。如果没有指定 codec,您可以使用此标志来指示基于文本的 codec;如果没有指定,或者值为 false,则通过 TCP 假设 Object Serialization。 | false | 布尔值 |
| camel.component.mina2.configuration.textline-delimiter | 仅用于 TCP,并且使用 textline=true。设置要使用的文本行分隔符。如果没有提供,Camel 将使用 DEFAULT。此分隔符用于标记文本的末尾。 | Mina2TextLineDelimiter | |
| camel.component.mina2.configuration.timeout | 您可以配置超时,指定等待远程服务器响应的时长。超时单元以毫秒为单位,因此 60000 为 60 秒。 | 30000 | Long |
| camel.component.mina2.configuration.transfer-exchange | 仅用于 TCP。您可以通过线线传输交换,而不是只传输正文。以下字段被传输: 在 body, Out body, fault body, In headers, Out headers, fault headers, Exchange properties, Exchange exception。这要求对象是序列化的。Camel 将排除任何非序列化对象,并将其记录在 WARN 级别。 | false | 布尔值 |
| camel.component.mina2.configuration.write-timeout | 将数据发送到 MINA 会话所需的时间上限。默认值为 10000 毫秒。 | 10000 | Long |
| camel.component.mina2.enabled | 启用 mina2 组件 | true | 布尔值 |
| camel.component.mina2.resolve-property-placeholders | 组件是否应在启动时解析属性占位符。只有 String 类型的属性可以使用属性占位符。 | true | 布尔值 |
| camel.component.mina2.use-global-ssl-context-parameters | 启用使用全局 SSL 上下文参数。 | false | 布尔值 |