簡體   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