Show Table of Contents
20.2.4. 配置 Netty HTTP
Netty HTTP 通过 HTTP 协议处理数据包。在防火墙只允许 HTTP 流量通过的情况下,这很又用。Netty HTTP 使用和 Netty TCP 相同的属性已及下列额外的属性:
注意
下列参数既可以用于接收器也可以用于连接器。Netty HTTP 传输协议不允许重用标准 HTTP 端口(默认为 8080)。使用标准 HTTP 端口导致异常抛出。您可以通过标准 HTTP 端口使用 第 20.2.5 节 “配置 Netty Servlet” (Netty Servlet Transport) 来处理 HornetQ 连接。
<socket-binding name="messaging-http" port="7080" />
<acceptors>
<netty-acceptor name="netty" socket-binding="messaging-http">
<param key="http-enabled" value="false"/>
<param key="http-client-idle-time" value="500"/>
<param key="http-client-idle-scan-period" value="500"/>
<param key="http-response-time" value="10000"/>
<param key="http-server-scan-period" value="5000"/>
<param key="http-requires-session-id" value="false"/>
</netty-acceptor>
</acceptors>
下表描述了配置 Netty HTTP 的其他属性:
表 20.3. Netty HTTP 配置属性
| 属性名 | 默认值 | 描述 |
|---|---|---|
| http-enabled | false | true 表示启用 HTTP |
| http-client-idle-time | 500 毫秒 | 在发送空的 HTTP 请求以保持连接活动之前,客户可空闲的时间。 |
| http-client-idle-scan-period | 500 毫秒 | 扫描空闲客户的时间间隔(毫秒) |
| http-response-time | 10000 毫秒 | 在发送空的 HTTP 请求以保持连接活动之前,服务器可等待的时间。 |
| http-server-scan-period | 5000 毫秒 | 扫描需要响应的客户的时间间隔(毫秒) |
| http-requires-session-id | false | 如果为 true,客户在第一次调用后将等待接收 session ID。 |
警告
通过 Netty HTTP 连接的客户不支持自动失效切换。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.