繁体   English   中英

由于“收到过期的邮件”,因此无法使用ActiveMQ的邮件

[英]Unable to consume message from ActiveMQ due to “received expired message”

我得到下面的调试语句,并且我的消息侦听器不使用任何消息。

22:25:17.870 [org.springframework.jms.listener.DefaultMessageListenerContainer#0-1]调试oaactivemq.ActiveMQMessageConsumer-ID:CONSUM-1401814509338-1:1:1:1收到过期消息:MessageDispatch {commandId = 0,responseRequired = false,ConsumerId = ID:CONSUM-1401814509338-1:1:1:1,destination = topic://Topic.ALL,message = ActiveMQTextMessage {commandId = 23284887,responseRequired = false,messageId = ID:PROC-1398663597609-0: 1:1:1:23284883,originalDestination = null,originalTransactionId = null,producerId = ID:PROC-1398663597609609-0:1:1:1,目的地= topic://Topic.ALL、transactionId = null,到期时间= 1401814515925,时间戳= 1401814514925,到达= 0,brokerInTime = 1401814514934,brokerOutTime = 1401814514934,correlationId = null,replyTo = null,持久性= false,类型= null,优先级= 4,groupID = null,groupSequence = 0,targetConsumerId = null,压缩= false,userID =空,内容= 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,cc_type = Node ,_repository = qdb,_userid = null},readOnlyProperties = true,readOnlyBody = true,droppable = false,jmsXGroupFirstForConsumer = false,text = {“ _eventtype”:“ attribute”,“ _operation”:... kAddress“}]}} ,redeliveryCounter = 0}


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

<bean id="qConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
        <property name="targetConnectionFactory">
            <bean class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL">
                    <value>tcp://localhost:61616?wireFormat.maxInactivityDuration=0</value>
                </property>
            </bean>
        </property>
</bean>

<bean id="qMessageListener" class="com.xyz.listener.QManifestListener" />

<jms:listener-container destination-type="topic" 
        container-type="default" connection-factory="qConnectionFactory"
        acknowledge="auto" cache="auto">
        <jms:listener destination="Topic.ALL" ref="qMessageListener"
            method="onMessage" />
</jms:listener-container>

请帮助我找出我所缺少的..

如果您的生产者发送的消息的有效期值非常短,则它们可能在到达消费者之前就已到期。 但是,在很多情况下会出现这种错误,因为发送方和接收方的时钟未同步,因此该消息似乎已经过期,而实际上不应该。 解决方案可能是确保使用NTP同步所有计算机。

还有另一种方法,应该无法同步时钟,即在发送消息之前使用ActiveMQ TimeStampPlugin更新传入消息的时间戳。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM