由于"收到过期消息"而无法消耗来自ActiveMQ的消息

 BigUncle 发布于 2023-01-11 19:44

我在调试语句之下,我的消息监听器没有消耗任何消息.

22:25:17.870 [org.springframework.jms.listener.DefaultMessageListenerContainer#0-1] DEBUG oaactivemq.ActiveMQMessageConsumer - ID:消费-1401814509338-1:1:1:1接收过期的消息:MessageDispatch {commandId = 0,responseRequired =假,consumerId = ID:消费-1401814509338-1:1:1:1,目的地=主题://Topic.ALL,消息= ActiveMQTextMessage {commandId = 23284887,responseRequired =假,MESSAGEID = ID:PROC-1398663597609-0: 1:1:1:23284883,originalDestination = null,originalTransactionId = null,producerId = ID:PROC-1398663597609-0:1:1:1,destination = topic://Topic.ALL,transactionId = null,expiration = 1401814515925,时间戳= 1401814514925,到达= 0,brokerInTime = 1401814514934,brokerOutTime = 1401814514934,的correlationID = NULL,的replyTo = NULL,持久=假,类型= NULL,优先权= 4,组ID = NULL,groupSequence = 0,targetConsumerId = NULL,压缩=假的,用户ID = NULL,内容= org.apache.activemq.util.ByteSequence@2fec90f6,marshalledProperties = org.apache.activemq.util.ByteSequence@62a08837,dataStructure = null,redeliveryCounter = 0,size = 0,properties = {_ componentid = _EPSYNC_READWRITE,_attributename = networkAddress,_operation = Update,_oid = 51e8e5c3e4b0cc716bff43cc,_type = NodeServer,_eventtype = attribute ,_repository = qdb,_ userid = null},readOnlyProperties = true,readOnlyBody = true,droppable = false,jmsXGroupFirstForConsumer = false,text = {"_ eventtype":"attribute","_ operation":... kAddress"}]}} ,redeliveryCounter = 0}


请在下面找到我的spring配置:


        
            
                
                    tcp://localhost:61616?wireFormat.maxInactivityDuration=0
                
            
        





        

请帮我弄清楚我错过了什么..

1 个回答
  • 如果您的生产者发送的消息具有非常短的到期值,那么他们可能会在到达消费者之前到期.但是在很多情况下会出现这种错误,因为发送方和接收方上的时钟没有同步,所以当它真的不应该有消息时,消息似乎已经过期了.解决方案可能是确保您的计算机全部使用NTP进行同步.

    还有另一种选择,应该同步时钟是不可能的,这是使用ActiveMQ TimeStampPlugin在发送它们之前更新传入消息的时间戳.

    2023-01-11 19:46 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有