diff --git a/spring-integration-core/src/main/java/org/springframework/integration/channel/DirectChannel.java b/spring-integration-core/src/main/java/org/springframework/integration/channel/DirectChannel.java index 524e7db0c7..1e624852bf 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/channel/DirectChannel.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/channel/DirectChannel.java @@ -87,7 +87,9 @@ public class DirectChannel extends AbstractSubscribableChannel { super.onInit(); if (this.maxSubscribers == null) { Integer max = getIntegrationProperty(IntegrationProperties.CHANNELS_MAX_UNICAST_SUBSCRIBERS, Integer.class); - setMaxSubscribers(max); + if (max != null) { + setMaxSubscribers(max); + } } }