Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用zookeeper在activemq cms MessageProducer.send中等待五秒钟_Activemq_Redhat_Apache Zookeeper - Fatal编程技术网

使用zookeeper在activemq cms MessageProducer.send中等待五秒钟

使用zookeeper在activemq cms MessageProducer.send中等待五秒钟,activemq,redhat,apache-zookeeper,Activemq,Redhat,Apache Zookeeper,我正在测试 在带有本地LevelDB存储的独立ActiveMQ上运行时,每个producer.send(message)调用大约需要1毫秒。在我的复制设置中,有3个zookeepers和3个ActiveMQ代理,producer.send(message)需要5秒以上的时间才能返回!即使使用中的sync=“local_mem”,也会发生这种情况。它总是刚好超过5秒,所以似乎有一些奇怪的等待/超时 这有什么意义吗 无论我是将brokerurl设置为故障转移:()还是仅仅tcp://brokerX,

我正在测试

在带有本地LevelDB存储的独立ActiveMQ上运行时,每个
producer.send(message)
调用大约需要1毫秒。在我的复制设置中,有3个zookeepers和3个ActiveMQ代理,
producer.send(message)
需要5秒以上的时间才能返回!即使使用
中的
sync=“local_mem”
,也会发生这种情况。它总是刚好超过5秒,所以似乎有一些奇怪的等待/超时

这有什么意义吗

无论我是将brokerurl设置为
故障转移:()
还是仅仅
tcp://brokerX
,其中brokerX位于复制的LevelDB设置中。在brokerX web ui(hawtio)中发送消息没有明显的延迟。如果我更改为
tcp://brokerY
,其中broker是另一个相同的broker,
设置为
,而不是
,我们在每次发送时降低了1毫秒

改变时间等没有什么区别

下面是调试日志。如您所见,“发送到队列”之间间隔5秒,但缩放速度很快

2014-02-19 10:45:34,719 | DEBUG | Handling request for path /jolokia | io.hawt.web.AuthenticationFilter | qtp1217711018-227
2014-02-19 10:45:34,724 | DEBUG | localhost Message ID:<hostname>-57776-1392803129562-0:0:1:1:2 sent to queue://IO_stab_test_Q | org.apache.activemq.broker.region.Queue | ActiveMQ Transport: tcp:///<ip address>:54727@61616
2014-02-19 10:45:34,725 | DEBUG | IO_stab_test_Q toPageIn: 1, Inflight: 1, pagedInMessages.size 1, enqueueCount: 27, dequeueCount: 25 | org.apache.activemq.broker.region.Queue | ActiveMQ BrokerService[localhost] Task-20
2014-02-19 10:45:34,731 | DEBUG | Handling request for path /jolokia | io.hawt.web.AuthenticationFilter | qtp1217711018-222
2014-02-19 10:45:34,735 | DEBUG | Got ping response for sessionid: 0x244457fceb80003 after 0ms | org.apache.zookeeper.ClientCnxn | main-SendThread(<hostname>:2181)
2014-02-19 10:45:34,867 | DEBUG | Handling request for path /jolokia | io.hawt.web.AuthenticationFilter | qtp1217711018-222
2014-02-19 10:45:35,403 | DEBUG | Got ping response for sessionid: 0x244457fceb80003 after 0ms | org.apache.zookeeper.ClientCnxn | main-SendThread(<hostname>:2181)
2014-02-19 10:45:35,634 | DEBUG | Handling request for path /jolokia | io.hawt.web.AuthenticationFilter | qtp1217711018-227
2014-02-19 10:45:36,071 | DEBUG | Got ping response for sessionid: 0x244457fceb80003 after 0ms | org.apache.zookeeper.ClientCnxn | main-SendThread(<hostname>:2181)
2014-02-19 10:45:36,740 | DEBUG | Got ping response for sessionid: 0x244457fceb80003 after 0ms | org.apache.zookeeper.ClientCnxn | main-SendThread(<hostname>:2181)
2014-02-19 10:45:37,410 | DEBUG | Got ping response for sessionid: 0x244457fceb80003 after 0ms | org.apache.zookeeper.ClientCnxn | main-SendThread(<hostname>:2181)
2014-02-19 10:45:38,088 | DEBUG | Got ping response for sessionid: 0x244457fceb80003 after 8ms | org.apache.zookeeper.ClientCnxn | main-SendThread(<hostname>:2181)
2014-02-19 10:45:38,623 | DEBUG | Handling request for path /jolokia | io.hawt.web.AuthenticationFilter | qtp1217711018-222
2014-02-19 10:45:38,750 | DEBUG | Got ping response for sessionid: 0x244457fceb80003 after 0ms | org.apache.zookeeper.ClientCnxn | main-SendThread(<hostname>:2181)
2014-02-19 10:45:39,420 | DEBUG | Got ping response for sessionid: 0x244457fceb80003 after 0ms | org.apache.zookeeper.ClientCnxn | main-SendThread(<hostname>:2181)
2014-02-19 10:45:39,735 | DEBUG | localhost Message ID:<hostname>-57776-1392803129562-0:0:1:1:3 sent to queue://IO_stab_test_Q | org.apache.activemq.broker.region.Queue | ActiveMQ Transport: tcp:///<ip address>:54727@61616
2014-02-19 10:45:39,737 | DEBUG | IO_stab_test_Q toPageIn: 1, Inflight: 2, pagedInMessages.size 2, enqueueCount: 28, dequeueCount: 25 | org.apache.activemq.broker.region.Queue | ActiveMQ BrokerService[localhost] Task-24
2014-02-19 10:45:40,090 | DEBUG | Got ping response for sessionid: 0x244457fceb80003 after 0ms | org.apache.zookeeper.ClientCnxn | main-SendThread(<hostname>:2181)
2014-02-19 10:45:34719 |调试|处理路径请求/jolokia | io.hawt.web.AuthenticationFilter | qtp1217711018-227
2014-02-19 10:45:34724调试本地主机消息ID:-57776-1392803129562-0:0:1:1:2发送到queue://IO_stab_test_Q |org.apache.activemq.broker.region.Queue | activemq传输:tcp://:54727@61616
2014-02-19 10:45:34725 | DEBUG | IO | stab | u test | Q toPageIn:1,机上:1,pagedInMessages.size 1,排队数:27,出队数:25 | org.apache.activemq.broker.region.Queue | activemq BrokerService[localhost]Task-20
2014-02-19 10:45:34731 |调试|处理路径请求/jolokia | io.hawt.web.AuthenticationFilter | qtp1217711018-222
2014-02-19 10:45:34735 |调试|在0毫秒后得到sessionid:0x244457fceb80003的ping响应| org.apache.zookeeper.ClientCnxn |主发送线程(:2181)
2014-02-19 10:45:34867 |调试|处理路径请求/jolokia | io.hawt.web.AuthenticationFilter | qtp1217711018-222
2014-02-19 10:45:35403 |调试|在0毫秒后获得sessionid:0x244457fceb80003的ping响应| org.apache.zookeeper.ClientCnxn |主发送线程(:2181)
2014-02-19 10:45:35634 |调试|处理路径请求/jolokia | io.hawt.web.AuthenticationFilter | qtp1217711018-227
2014-02-19 10:45:36071 |调试|在0毫秒后获得会话ID:0x244457fceb80003的ping响应| org.apache.zookeeper.ClientCnxn |主发送线程(:2181)
2014-02-19 10:45:36740调试获得会话ID:0x244457fceb80003 0毫秒后的ping响应org.apache.zookeeper.ClientCnxn主发送线程(:2181)
2014-02-19 10:45:37410 |调试|在0毫秒后获得sessionid:0x244457fceb80003的ping响应| org.apache.zookeeper.ClientCnxn |主发送线程(:2181)
2014-02-19 10:45:38088 |调试|在8ms | org.apache.zookeeper.ClientCnxn |主发送线程(:2181)后获得sessionid:0x244457fceb80003的ping响应
2014-02-19 10:45:38623 |调试|处理路径请求/jolokia | io.hawt.web.AuthenticationFilter | qtp1217711018-222
2014-02-19 10:45:38750 |调试|在0毫秒后获得会话ID:0x244457fceb80003的ping响应| org.apache.zookeeper.ClientCnxn |主发送线程(:2181)
2014-02-19 10:45:39420 |调试|在0毫秒后获得会话ID:0x244457fceb80003的ping响应| org.apache.zookeeper.ClientCnxn |主发送线程(:2181)
2014-02-19 10:45:39735调试本地主机消息ID:-57776-1392803129562-0:0:1:1:3发送到queue://IO_stab_test_Q |org.apache.activemq.broker.region.Queue | activemq传输:tcp://:54727@61616
2014-02-19 10:45:39737 | DEBUG | IO | stab | test | Q toPageIn:1,机上:2,pagedInMessages.size 2,排队数:28,出队数:25 | org.apache.activemq.broker.region.Queue | activemq BrokerService[localhost]Task-24
2014-02-19 10:45:40090 |调试|在0毫秒后获得会话ID:0x244457fceb80003的ping响应| org.apache.zookeeper.ClientCnxn |主发送线程(:2181)
设置队列预取=0

关于我们情况的一些背景


我们的消息大小相当小(我将首先针对5.10-SNAPSHOT进行测试,因为自5.9.0发布以来,我们对LevelDB进行了大量的修复。从发布到快照并不总是一个选项。这种延迟也会对我们产生负面影响,但我们无法在生产中运行SNAPSHOT。