branscha/lib-messagebus — Issue #1: ConcurrentModificationException in publish()
Author: outsideMyBox
Created: 2012-03-08 09:53:38+00:00
State: open

Hi,

First, thanks for this library.
There is an issue though: if an object A publishes an event and that event in turn creates an object B that registers itself the exception ConcurrentModificationException is thrown from MessageBus.publish() line 245 (lIter.next()).
It is due to the concurrent modification of subscriberInfos in MessageBus.java: the publish() method iterates over subscriberInfos which is mofidied by MessageBus.register() called from the object notfied.

Hope it's clear!
Franck