SpringSource/spring-integration — pull request #543 by garyrussell (2012-07-10 22:29:21+00:00)
Title: INT-2285 Implement max-subscribers on Channels

Add a subscriber limit on both unicast and publish-subscribe
channels. This permits detection of inadvertent channel wiring
during context initialization.

Also add a mechanism to globally set these defaults.

Two properties are added to ChannelInitializer. If the
'channelInitializer' bean is declared before a channel, and
these properties are set, it will globally override the
default (Integer.MAX_VALUE) for these properties.

For example:

will make the default max-subscribers 1 and 2 for and
channels respectively.

Also applies to module channels (jms, amqp, redis).