Affects Version/s: None
Fix Version/s: 0.8
Consistently getting "java.lang.IllegalStateException: Broadcaster ID already assigned to SCOPE.REQUEST. Cannot change the id" under light load.
Sample test maven project is attached.
I ran the test with jMeter
Number of Thread: 50
Ramp-up Period: 1
Loop Count: 10 to 20
And I can consistently reproduce the problem. Occasionally, if running with higher number of threads, I also saw some NPE and other exceptions.
I also modified the atmosphere-jersey and atmosphere-cpr source code (0.8-SNAPSHOT) to inject some debug logs (mainly in AtmosphereFilter, DefaultBroadcaster, DefaultBroadcasterFactory where Broadcasters are add/remove and ID are changed/added to factory) and noticed that when the error occurred, there were multiple threads working on the same Broadcaster ID at the same time.