[英]ActiveMQ stops receiving messages after servers left idle for few hours
I've been browsing the forums for last few days and tried almost everything i could find, but without any luck. 我最近几天一直在浏览论坛,并尝试了几乎所有我能找到的东西,但没有运气。
The situation is: inside our Java Web Application we have ActiveMQ 5.7 (I know it's very old, eventually we will upgrade to newer version - but for some reasons it's not possible right now). 情况是:在我们的Java Web应用程序中,我们有ActiveMQ 5.7(我知道它已经很老了,最终我们将升级到更新的版本 - 但由于某些原因,现在不可能)。 We have only one broker and multiple consumers. 我们只有一个经纪人和多个消费者。
When I start the servers (I have tried to do so for 2, 3, 4 and more servers) everything is ok. 当我启动服务器时(我已尝试为2,3,4和更多服务器执行此操作)一切正常。 The servers are comunicating with each other, QUEUE messages are consumed instantly. 服务器相互通信,即时消耗QUEUE消息。 But when I leave the servers idle (for example to finally catch some sleep ;) ) it is no longer the case. 但是,当我让服务器空闲时(例如最终要抓住一些睡眠;))就不再是这样了。 Messages are stuck in the database and are not beign consumed. 消息卡在数据库中,不会消耗掉。 The only option to have them delivered is to restart the server. 将它们交付的唯一选择是重新启动服务器。
Part of my configuration (we keep it in properties file, it's the actual state, however I have tried many different combinations): 我的部分配置(我们将其保存在属性文件中,它是实际状态,但我尝试了许多不同的组合):
BrokerServiceURI=broker:(tcp://0.0.0.0:{0})/{1}?persistent=true&useJmx=false&populateJMSXUserID=false&useShutdownHook=false&deleteAllMessagesOnStartup=false&enableStatistics=true
ConnectionFactoryURI=failover://({0})?initialReconnectDelay=100&timeout=6000
ConnectionFactoryServerURI=tcp://{0}:{1}?keepAlive=true&soTimeout=100&wireFormat.cacheEnabled=false&wireFormat.tightEncodingEnabled=false&wireFormat.maxInactivityDuration=0
BrokerService.startAsync=true
BrokerService.networkConnectorStartAsync=true
BrokerService.keepDurableSubsActive=false
Do you have a clue? 你有线索吗?
I cannot actually tell you the reason from the description mentioned above but I can list down a few checks that are fresh in my mind. 我实际上无法从上面提到的描述中告诉你原因,但我可以列出一些在我脑海中新鲜的检查。 Please confirm the following if they are valid for you or not. 如果它们对您有效,请确认以下内容。
Can you tell a little more about your consumer/producer/broker configurations? 您能告诉我们您的消费者/生产者/经纪人配置吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.