358.10. WildFly 上的 Undertow 用户
WildFly 上的 camel-undertow 用户配置与独立 Camel 的配置不同。生成者端点会按正常方式工作。
在 WildFly 上,camel-undertow 用户利用容器提供的默认 Undertow HTTP 服务器。服务器在 undertow 子系统配置中定义。以下是 standalone.xml 的默认配置摘录:
在本实例中,Undertow 配置为侦听由 http 和 https socket-binding 指定的接口 / 端口。默认情况下,这是 http 的端口 8080,https 为 8443。
这会产生以下影响:
- camel-undertow 用户将仅绑定到 localhost:8080 或 localhost:8443
- 有些端点消费者配置选项没有影响(请参阅以下),因为这些设置由 WildFly 容器管理
例如,如果您使用不同主机或端口组合配置端点消费者,服务器日志文件中会出现一个警告。例如,以下主机和端口配置将被忽略:
from("undertow:http://somehost:1234/path/to/resource")
from("undertow:http://somehost:1234/path/to/resource")
[org.wildfly.extension.camel] (pool-2-thread-1) Ignoring configured host: http://somehost:1234/path/to/resource
[org.wildfly.extension.camel] (pool-2-thread-1) Ignoring configured host: http://somehost:1234/path/to/resource
但是,在默认主机和端口 localhost:8080 或 localhost:8443 上仍提供使用者。
358.10.1. 配置其他端口 复制链接链接已复制到粘贴板!
如果接受其他端口,则必须通过 WildFly 子系统配置它们。这在服务器文档中解释:
358.10.2. 在 WildFly 上忽略 camel-undertow 消费者配置选项 复制链接链接已复制到粘贴板!
hostOptions
有关如何配置服务器主机选项,请参阅 WildFly undertow 配置指南:
sslContextParameters
要配置 SSL,请参阅 WildFly SSL 配置指南: