diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/config/AbstractPollingInboundChannelAdapterParser.java b/org.springframework.integration/src/main/java/org/springframework/integration/config/AbstractPollingInboundChannelAdapterParser.java index 19c1b573a4..e859331171 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/config/AbstractPollingInboundChannelAdapterParser.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/config/AbstractPollingInboundChannelAdapterParser.java @@ -53,11 +53,19 @@ public abstract class AbstractPollingInboundChannelAdapterParser extends Abstrac } } else { - adapterBuilder.addPropertyValue("schedule", new PollingSchedule(0)); + adapterBuilder.addPropertyValue("schedule", new PollingSchedule(this.getDefaultPollInterval())); } return adapterBuilder.getBeanDefinition(); } + /** + * Subclasses may override this to provide the default poll interval (when + * no 'schedule' is configured). Otherwise, the value will be 1 second. + */ + protected int getDefaultPollInterval() { + return 1000; + } + /** * Subclasses must implement this method to parse the PollableSource instance * which the created Channel Adapter will poll.