Only create a new channel for the 'defaultOutputChannelName' if not already present in the registry (and only when 'autocreate' is true).
This commit is contained in:
@@ -146,7 +146,7 @@ public class MessageBus implements ChannelRegistry, ApplicationContextAware, Lif
|
||||
}
|
||||
if (this.autoCreateChannels) {
|
||||
String defaultOutputChannelName = endpoint.getDefaultOutputChannelName();
|
||||
if (StringUtils.hasText(defaultOutputChannelName)) {
|
||||
if (StringUtils.hasText(defaultOutputChannelName) && this.lookupChannel(defaultOutputChannelName) == null) {
|
||||
this.registerChannel(defaultOutputChannelName, new PointToPointChannel());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user