Set autoStartup to false on the TimeSource
Prevents the endpoint from starting before it's bound, thus throwing Dispatcher errors
This commit is contained in:
@@ -42,7 +42,7 @@ public class TimeSource {
|
||||
private TimeSourceOptionsMetadata options;
|
||||
|
||||
@Bean
|
||||
@InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "${fixedDelay}", maxMessagesPerPoll = "1"))
|
||||
@InboundChannelAdapter(value = Source.OUTPUT, autoStartup = "false", poller = @Poller(fixedDelay = "${fixedDelay}", maxMessagesPerPoll = "1"))
|
||||
public MessageSource<String> timerMessageSource() {
|
||||
return () -> new GenericMessage<>(new SimpleDateFormat(this.options.getFormat()).format(new Date()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user