`

ActiveMq -Rejecting received message

阅读更多

    

 链接地址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()

 官方说明如下:

 

Set whether to accept received messages while the listener container in the process of stopping.

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数据进行加减,对比,发现确实存在消息丢现象(当然也有可能跟具体的环境与代码有关)。

 

  • 大小: 33.6 KB
分享到:
评论

相关推荐

    activemq-cpp-library-3.9.5-src.zip

    《ActiveMQ-CPP库3.9.5源代码解析与应用》 ActiveMQ-CPP库是Apache ActiveMQ项目的一部分,它提供了一套C++接口,用于与ActiveMQ消息代理进行通信。这个库允许开发者在C++应用程序中实现高级消息队列协议(AMQP)和...

    activemq-cpp-library-3.9.5 编译的windows库文件,支持vs2015、vs2017

    《ActiveMQ-CPP Library 3.9.5在Windows环境下的编译与应用》 ActiveMQ-CPP Library 3.9.5是一款专为C++开发者设计的、用于与Apache ActiveMQ集成的库,它提供了丰富的API接口,使得在C++环境中能够方便地发送和...

    activemq-pool-5.8.0-sources.jar

    activemq-pool-5.8.0-sources.jar

    activemq-core-5.7.0-API文档-中英对照版.zip

    赠送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文档-中文...

    activemq-protobuf-1.1-API文档-中文版.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

    这个“apache-activemq-5.9.0-bin”压缩包包含了Apache ActiveMQ 5.9.0版本的完整二进制文件,用于在本地或网络环境中安装和运行。 Apache ActiveMQ的核心功能包括: 1. **消息队列**:ActiveMQ支持多种消息模式,...

    apache-activemq-5.10到apache-activemq6.1大版本合集

    activemq-parent-5.10.0-source-release.zip activemq-parent-5.10.2-source-release.zip activemq-parent-5.12.3-source-release.zip apache-activemq-5.10.2-bin.tar.gz apache-activemq-5.11.4-bin.zip apache-...

    activemq-web-console-5.11.2

    activemq-web-console的默认使用方式是通过在activemq.xml中导入jetty.xml配置一个jetty server来实现的。其实activemq-web-console完全可以和activemq-broker分开来部署。 activemq-web-console包含3个apps, 1.一...

    apache-activemq-5.5.1-bin.zip加上入门demo

    解压缩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以后,登陆:...

    apache-activemq-5.8.0-bin.zip

    这个压缩包"apache-activemq-5.8.0-bin.zip"包含了ActiveMQ 5.8.0版本的二进制发行版,供用户在本地计算机上安装和运行。 1. **Apache ActiveMQ简介** - Apache ActiveMQ是业界广泛使用的消息代理,提供可靠的消息...

    activemq-all.5.14jar包

    activemq-all.5.14jar包,亲测可用!!

    activemq-all-5.2.0.jar包

    activemq-all-5.2.0.JAR包,欢迎下载。编写java中间件的时候会用到。这是activemq实现的jms中间件。希望能帮助到你。

    apache-activemq-5.15.6

    在"apache-activemq-5.15.6"这个版本中,我们可以探讨以下几个关键知识点: 1. **JMS规范**:JMS是Java平台上的标准接口,用于与消息队列交互。它定义了生产者如何发送消息以及消费者如何接收消息的规则。ActiveMQ...

    apache-activemq-5.15.8-bin.zip

    这个"apache-activemq-5.15.8-bin.zip"文件包含了ActiveMQ的可执行版本,用于在本地计算机上安装和运行ActiveMQ服务。 首先,我们需要了解ActiveMQ的核心概念。它是一个消息代理,扮演着消息生产者与消费者之间的...

    apache-activemq-5.16.6-bin.zip

    这个"apache-activemq-5.16.6-bin.zip"文件包含了ActiveMQ的最新稳定版本5.16.6的二进制发行版,主要用于在各种环境中部署和运行。 **Apache ActiveMQ核心概念** 1. **消息队列(Message Queue)**: 消息队列是...

    activemq-all-5.6.0.jar

    activemq-all-5.6.0.jar activemq-all-5.6.0.jar activemq-all-5.6.0.jar activemq-all-5.6.0.jar

    apache-activemq-5.15.9.rar

    在本文中,我们将深入探讨Apache ActiveMQ,特别是针对“apache-activemq-5.15.9-bin.zip”这个版本在Windows平台上作为MQTT服务器的使用。 首先,让我们理解MQTT(Message Queuing Telemetry Transport)。MQTT是...

    activemq-protobuf-1.1.jar

    activemq-protobuf-1.1.jar;activemq-protobuf-1.1.jar

    apache-activemq-5.15.12-bin.tar.gz

    tar -zxvf apache-activemq-5.15.12-bin.tar.gz 2.进入bin目录 cd /apache-activemq-5.15.12/bin 3.运行,没有配置环境变量只能在bin目录下使用命令 ./activemq 4.配置环境变量,配置完环境变量之后...

    activeMQ-cpp 测试文件

    ActiveMQ-cpp是ActiveMQ的C++客户端库,允许开发者在C++应用程序中使用ActiveMQ的功能。 在安装ActiveMQ时,你需要下载并配置ActiveMQ服务器,通常这包括以下几个步骤: 1. 下载ActiveMQ的最新稳定版本,通常是.tgz...

Global site tag (gtag.js) - Google Analytics