我正在尝试解决此 ActiveMQ Artemis 错误。
似乎偶尔的消息对于 来说太大了SimpleString
,并且没有发送,它会发送到 DLQ。
java.lang.IndexOutOfBoundsException: Error reading in simpleString, length=1366648 is greater than readableBytes=127646@ClientLargeMessageImpl[messageID=578576793, durable=true, address=AuthCorrespondence.sendmail,userID=7f72137c-c3a3-11eb-87f7-0242c0a8e003,properties=TypedProperties[__AMQ_CID=b3f70eb1-be3c-11eb-87f7-0242c0a8e003,_AMQ_LARGE_SIZE=127651,_AMQ_ROUTING_TYPE=1]]
at org.apache.activemq.artemis.jms.client.ActiveMQMessageConsumer.getMessage(ActiveMQMessageConsumer.java:234)
at org.apache.activemq.artemis.jms.client.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:132)
at org.springframework.jms.support.destination.JmsDestinationAccessor.receiveFromConsumer(JmsDestinationAccessor.java:130)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:416)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:302)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:255)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1168)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1160)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1057)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IndexOutOfBoundsException: Error reading in simpleString, length=1366648 is greater than readableBytes=127646
at org.apache.activemq.artemis.api.core.SimpleString.readSimpleString(SimpleString.java:183)
at org.apache.activemq.artemis.api.core.SimpleString.readSimpleString(SimpleString.java:171)
at org.apache.activemq.artemis.api.core.SimpleString.readNullableSimpleString(SimpleString.java:158)
at org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper.readNullableSimpleString(ChannelBufferWrapper.java:69)
at org.apache.activemq.artemis.reader.TextMessageUtil.readBodyText(TextMessageUtil.java:37)
at org.apache.activemq.artemis.jms.client.ActiveMQTextMessage.doBeforeReceive(ActiveMQTextMessage.java:112)
at org.apache.activemq.artemis.jms.client.ActiveMQMessageConsumer.getMessage(ActiveMQMessageConsumer.java:228)
... 11 more
我能看到的最有可能的问题是 和 之间的相似readableBytes=127646
性_AMQ_LARGE_SIZE=127651
。
但是,从文档来看,这个 _AMQ_LARGE_SIZE 是大消息的阈值,它应该是 2GB,而这个消息是什么,1.36MB?
这是怎么回事?
编辑:
[root@6dcbad102045 large-messages]# pwd
/opt/amq/broker/data/large-messages
[root@6dcbad102045 large-messages]# ls -l
total 13828
-rw-r--r-- 1 root root 6451200 Sep 14 2020 194154444.msg
-rw-r--r-- 1 root root 4198400 Nov 5 2020 266358970.msg
-rw-r--r-- 1 root root 1843200 Nov 13 2020 277265384.msg
-rw-r--r-- 1 root root 1433600 Apr 28 12:36 522483226.msg
-rw-r--r-- 1 root root 102400 Jun 2 15:07 578576791.msg
-rw-r--r-- 1 root root 127651 Jun 3 09:46 579961682.msg
我在 Fuse/OSGi 中。2.6.3.redhat-00015 用于 ActiveMQ Artemis JMS 客户端 OSGi。2.21.5 用于骆驼 amqp。我不知道它是什么 Artemis 版本。有 1000 多次成功交付。只有6个失败。