[
https://issues.apache.org/jira/browse/AMQ-4092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13469275#comment-13469275
]
Gary Tully commented on AMQ-4092:
---------------------------------
message groups, makes sense, the problem is in
org.apache.activemq.broker.region.Queue#assignGroup where the
JMSXGroupFirstForConsumer property is set, but the message is being stored
concurrently.
A workaround is to disable kahadb concurrentStoreAndDispatchQueues, set to
false. This will ensure that the dispatch (which can set the property) and
store do not occur in parallel.
Need to check up on the need to set that property and see if we can do it after
the message is persisted such that it will work with concurrent store and
dispatch.
> ConcurrentModificationException when using message groups
> ---------------------------------------------------------
>
> Key: AMQ-4092
> URL: https://issues.apache.org/jira/browse/AMQ-4092
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 5.6.0
> Environment: ActiveMQ 5.6.0 standalone, kahadb persistence, Spring
> JMSTemplate producer (ObjectMessage), Camel 2.9.2 route consumer (AMQ
> connection pool, vm transport)
> Reporter: Ben O'Day
>
> seeing these WARN messages frequently while consuming
> (maxConcurrentConsumers=5) from a queue with the message groups header
> (JMSXGroupID) set. If I disable the message groups header, these errors go
> away...
> That said, I don't see any specific errors with my application (at this
> point), just these messages in my logs.
> 2012-10-04 02:34:02,552 | WARN - Service - | 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)
> ... 3 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira