Closed
Description
The access to MessageGroup
and its collection of messages must be exclusive to produce consistent results.
Otherwise it fails like sporadically:
Caused by: java.util.ConcurrentModificationException: (No message provided)
at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:756)
at java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:778)
at java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at org.springframework.integration.handler.DelayHandler.reschedulePersistedMessages(DelayHandler.java:600)