使用Spring WebSocket + ActiveMQ(中继代理)挣扎+连接即使心跳也会关闭

时间:2016-02-19 05:25:53

标签: activemq stomp spring-websocket sockjs

我一直在努力增加Activemq上的不活动超时(更改activemq.xml中的设置似乎不起作用)。我看到心跳在浏览器控制台(SockJS客户端)中被交换,但过了一段时间我被连接器关闭了。以下是我的配置:

activemq.xml中:

<transportConnectors>
            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxInactivityDuration=3600000&amp;wireFormat.maxFrameSize=104857600"/>
            <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?trace=true&amp;maximumConnections=1000&amp;wireFormat.maxInactivityDuration=3600000&amp;wireFormat.maxFrameSize=104857600"/>
</transportConnectors>

ActiveMQ日志片段:

2016-02-18 19:14:28,185 | INFO  | ActiveMQ.Advisory.Topic Inactive for longer than 30000 ms - removing ... | org.apache.activemq.broker.region.Topic | ActiveMQ Broker[localhost] Scheduler
2016-02-18 19:16:18,839 | WARN  | Transport Connection to: tcp://127.0.0.1:53894 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>10000) long: tcp://127.0.0.1:53894 | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ InactivityMonitor Worker

Spring messaging TRACE日志:

TRACE 02/18 19:16:18,839 [reactor-tcp-io-6] - Received heart-beat in session o05rr4u5 
DEBUG 02/18 19:16:18,886 [reactor-tcp-io-6] - TCP connection to broker closed in session o05rr4u5 
DEBUG 02/18 19:16:18,886 [reactor-tcp-io-6] - Cleaning up connection state for session o05rr4u5 
TRACE 02/18 19:16:18,886 [clientOutboundChannel-44] - Encoding STOMP ERROR, headers={message=[Connection to broker closed.]} 
DEBUG 02/18 19:16:18,890 [clientInboundChannel-53] - Ignoring DISCONNECT in session o05rr4u5. Connection already cleaned up. 

感谢有人可以指导我。

谢谢,

0 个答案:

没有答案