链接地址http://quentinXXZ.iteye.com/blog/2126684
ActiveMq在stop操作,停止接收时,出现如下提示:
2014-09-23 20:26:23,233 WARN [ActiveMQ Session Task-1] (AbstractMessageListenerContainer.java:461) - Rejecting received message because of the listener container having been stopped in the meantime: ActiveMQTextMessage ....
我开始怀疑是否存在消息丢失。
经查询,做如下修改,将acceptMessageWhileStopping从false改为true就不再出现上述提示。对应的方法名为setAcceptMessagesWhileStop()
官方说明如下:
Default is "false", rejecting such messages through aborting the receive attempt. Switch this flag on to fully process such messages even in the stopping phase, with the drawback that even newly sent messages might still get processed (if coming in before all receive timeouts have expired).
NOTE: Aborting receive attempts for such incoming messages might lead to the provider's retry count decreasing for the affected messages. If you have a high number of concurrent consumers, make sure that the number of retries is higher than the number of consumers, to be on the safe side for all potential stopping scenarios.
上述说明,仍无法确认是否真正的存在消息丢失。
后来做了下实验,将只开发送端,接收端不开,在Broker持久化一定量消息,再关闭发送端。acceptMessageWhileStopping设为false。启动接收端,并在其统计接收count,再做stop,出现上述的warn信息。再与activemq监控页面的count数据进行加减,对比,发现确实存在消息丢现象(当然也有可能跟具体的环境与代码有关)。
相关推荐
activemq-all-5.8.0.jar 下载 activemq-all-5.8.0.jar 下载 activemq-all-5.8.0.jar 下载 activemq-all-5.8.0.jar 下载 activemq-all-5.8.0.jar 下载
activemq-pool-5.8.0-sources.jar
赠送jar包:activemq-core-5.7.0.jar; 赠送原API文档:activemq-core-5.7.0-javadoc.jar; 赠送源代码:activemq-core-5.7.0-sources.jar; 包含翻译后的API文档:activemq-core-5.7.0-javadoc-API文档-中文...
apache-activemq-5.16.0.zip
赠送jar包:activemq-protobuf-1.1.jar; 赠送原API文档:activemq-protobuf-1.1-javadoc.jar; 赠送源代码:activemq-protobuf-1.1-sources.jar; 包含翻译后的API文档:activemq-protobuf-1.1-javadoc-API文档-...
apache-activemq-5.9.0-bin.zip
apache-activemq-5.8.0-bin.zip
apache-activemq-5.15.15二进制包,安装包,apache-activemq-5.15.15-bin.tar.gz
activemq-web-console的默认使用方式是通过在activemq.xml中导入jetty.xml配置一个jetty server来实现的。其实activemq-web-console完全可以和activemq-broker分开来部署。 activemq-web-console包含3个apps, 1.一...
activemq-cpp-library-3.9.5编译的C++库文件,支持vs2015,vs2017,包括了依赖的库文件和头文件,可以在项目中直接使用。
解压缩apache-activemq-5.5.1-bin.zip,然后双击apache-activemq-5.5.1\bin\activemq.bat运行ActiveMQ程序。 包含了apache-activemq-5.5.1-bin.zip以及ActiveMQ一个helloworld的demo启动ActiveMQ以后,登陆:...
activemq-all.5.14jar包,亲测可用!!
activemq-all-5.2.0.JAR包,欢迎下载。编写java中间件的时候会用到。这是activemq实现的jms中间件。希望能帮助到你。
tar -zxvf apache-activemq-5.15.12-bin.tar.gz 2.进入bin目录 cd /apache-activemq-5.15.12/bin 3.运行,没有配置环境变量只能在bin目录下使用命令 ./activemq 4.配置环境变量,配置完环境变量之后...
activemq-protobuf-1.1.jar;activemq-protobuf-1.1.jar
apache-activemq-5.15.9-bin.zip apache-activemq-5.15.9-bin.zip apache-activemq-5.15.9-bin.zip
apache-activemq-5.15.3-bin apache-activemq-5.15.3-bin
标签:activemq-kahadb-store-5.9.1.jar,activemq,kahadb,store,5.9.1,jar包下载,依赖包
自己编译的activemq-cpp的2.X的最后版本,在windows + vs2010下测试通过。压缩包中包含了include\lib\dll文件。 由于尝试了N个3.X的版本都不同过,于是退到2.X版本,通过了,另外在vs2005下编译出来的也没有问题。...
activemq-cpp-library-3.9.5-src.zip