spring-projects/spring-amqp — pull request #166 by artembilan (2014-02-26 13:35:25+00:00)
Title: AMQP-377: SMLC: Fix consumers Map race condition

JIRA: https://jira.springsource.org/browse/AMQP-377

There is a case when container is empty (without queues)
and adding new queues and attempt to start container from cycle causes
the `ConcurrentModificationException` on `consumers` `Map` iteration,
when `queuesChanged` and `doStart` modify the Map.

Move `addAndStartConsumers` operation in the `queuesChanged()` outside from cycle to avoid the concurrent modification race condition