WSO2 esb UDP 到 TCP 的高速转换
WSO2 esb UDP to TCP conversion in high rate
我正在使用具有以下代理配置的 WSO2 esb 将 UDP 转换为 HTTP。
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="UDPProxy"
transports="udp"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<property name="OUT_ONLY" value="true"/>
</inSequence>
<outSequence>
<log level="full"/>
<send/>
</outSequence>
<endpoint>
<address uri="http://127.0.0.1:9764"/>
<property name="messageType" value="application/json" scope="axis2"/>
</endpoint>
</target>
<parameter name="transport.udp.port">9998</parameter>
<parameter name="transport.udp.contentType">text/plain</parameter>
<description/>
</proxy>
然后我在端口 9764 上有一个简单的 java http 服务器程序 运行。所以它只监听端口和每 5 秒接收消息计数的日志数。
我用 UDP 消息(每秒 10 个 udp 消息)测试了上面的代理,它运行良好。然后我尝试每秒发送 100 条 UDP 消息,之后我可以在 ESB 控制台上看到以下日志。
[2016-05-02 12:04:45,160] WARN - TargetHandler http-outgoing-2426: Connection time out while in state: REQUEST_DONE
[2016-05-02 12:04:45,163] WARN - SynapseCallbackReceiver Synapse received a response for the request with message Id : urn:uuid:101bdbc5-e5fa-4c35-8aa1- 525060b55dec But a callback is not registered (anymore) to process this response
[2016-05-02 12:04:45,163] WARN - TargetHandler http-outgoing-2399: Connection time out while in state: REQUEST_DONE
[2016-05-02 12:04:45,165] WARN - SynapseCallbackReceiver Synapse received a response for the request with message Id : urn:uuid:4197a771-8b6d-4d82-bf39-87710c0c18d2 But a callback is not registered (anymore) to process this response
不知道为什么会出现上面的警告。有人可以帮我吗?
我还假设这个 pxoxy 和我的 http 客户端之间的连接是 HTTP NIO。
ESB 正在等待您的端点 (127.0.0.1:9764) 的响应,但超时。
超时后,ESB 收到响应,但为时已晚,您的回调 (outSequence) 不再存在。
如果您使用 HTTP NIO,请查看 repository/conf/axis2/axis2.xml,搜索 http transportSender ant configure "SO_TIMEOUT",采样 2 分钟:<parameter name="SO_TIMEOUT">120000</parameter>
如果您需要更长的超时时间,您必须在repository/conf/synapse.properties[中更改synapse.global_timeout_interval
我正在使用具有以下代理配置的 WSO2 esb 将 UDP 转换为 HTTP。
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="UDPProxy"
transports="udp"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<property name="OUT_ONLY" value="true"/>
</inSequence>
<outSequence>
<log level="full"/>
<send/>
</outSequence>
<endpoint>
<address uri="http://127.0.0.1:9764"/>
<property name="messageType" value="application/json" scope="axis2"/>
</endpoint>
</target>
<parameter name="transport.udp.port">9998</parameter>
<parameter name="transport.udp.contentType">text/plain</parameter>
<description/>
</proxy>
然后我在端口 9764 上有一个简单的 java http 服务器程序 运行。所以它只监听端口和每 5 秒接收消息计数的日志数。
我用 UDP 消息(每秒 10 个 udp 消息)测试了上面的代理,它运行良好。然后我尝试每秒发送 100 条 UDP 消息,之后我可以在 ESB 控制台上看到以下日志。
[2016-05-02 12:04:45,160] WARN - TargetHandler http-outgoing-2426: Connection time out while in state: REQUEST_DONE
[2016-05-02 12:04:45,163] WARN - SynapseCallbackReceiver Synapse received a response for the request with message Id : urn:uuid:101bdbc5-e5fa-4c35-8aa1- 525060b55dec But a callback is not registered (anymore) to process this response
[2016-05-02 12:04:45,163] WARN - TargetHandler http-outgoing-2399: Connection time out while in state: REQUEST_DONE
[2016-05-02 12:04:45,165] WARN - SynapseCallbackReceiver Synapse received a response for the request with message Id : urn:uuid:4197a771-8b6d-4d82-bf39-87710c0c18d2 But a callback is not registered (anymore) to process this response
不知道为什么会出现上面的警告。有人可以帮我吗? 我还假设这个 pxoxy 和我的 http 客户端之间的连接是 HTTP NIO。
ESB 正在等待您的端点 (127.0.0.1:9764) 的响应,但超时。 超时后,ESB 收到响应,但为时已晚,您的回调 (outSequence) 不再存在。
如果您使用 HTTP NIO,请查看 repository/conf/axis2/axis2.xml,搜索 http transportSender ant configure "SO_TIMEOUT",采样 2 分钟:<parameter name="SO_TIMEOUT">120000</parameter>
如果您需要更长的超时时间,您必须在repository/conf/synapse.properties[中更改synapse.global_timeout_interval