2

我正在使用带有 Kahadb 持久消息传递的 AMQ 5.6 的 AMQ 消息组,并定期在日志中看到此 WARN。我没有看到由此导致的任何特定错误,但我想知道这样做的副作用是什么,等等。

我的消费者是 maxConcurrentConsumers=5 的 Camel (2.9.2) 路由(使用 AMQ 连接池等)。我会尝试在某个时候将其归结为单元测试......现在,这是堆栈跟踪

Async error occurred: java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException
java.util.concurrent.ExecutionException: java.util.ConcurrentModificationException
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
    at java.util.concurrent.FutureTask.get(FutureTask.java:83)
    at org.apache.activemq.broker.region.Queue.doMessageSend(Queue.java:785)
    at org.apache.activemq.broker.region.Queue.send(Queue.java:707)
    at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:407)
    at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:503)
    at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:305)
    at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:129)
    at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
    at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:306)
    at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:135)
    at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:453)
    at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:681)
    at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
    at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150)
    at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
    at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
    at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:231)
    at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
    at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
    at java.util.HashMap$KeyIterator.next(HashMap.java:828)
    at org.apache.activemq.util.MarshallingSupport.marshalPrimitiveMap(MarshallingSupport.java:64)
    at org.apache.activemq.command.Message.beforeMarshall(Message.java:210)
    at org.apache.activemq.command.ActiveMQObjectMessage.beforeMarshall(ActiveMQObjectMessage.java:199)
    at org.apache.activemq.openwire.v6.MessageMarshaller.looseMarshal(MessageMarshaller.java:277)
    at org.apache.activemq.openwire.v6.ActiveMQMessageMarshaller.looseMarshal(ActiveMQMessageMarshaller.java:111)
    at org.apache.activemq.openwire.v6.ActiveMQObjectMessageMarshaller.looseMarshal(ActiveMQObjectMessageMarshaller.java:111)
    at org.apache.activemq.openwire.OpenWireFormat.marshal(OpenWireFormat.java:168)
    at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.addMessage(KahaDBStore.java:429)
    at org.apache.activemq.store.kahadb.KahaDBStore$StoreQueueTask.run(KahaDBStore.java:1177)
4

1 回答 1

2

为此(AMQ-4092)记录了一个 JIRA,这听起来像是 KahaDB 和消息组组合的问题。设置 concurrentStoreAndDispatchQueues=false 可以解决问题(感谢 Gary Tully 的建议)

于 2012-10-04T15:22:53.320 回答