One of our Spring Integration DSL flows is meant to be a simple poller based on a cron expression. Normally you would configure a PollableChannel implementation (e.g. QueueChannel) or by using an InboundAdapter (e.g. FTP, HTTPS, S3 etc.) to process inbound messages which have a polling property.
In our case, we won't have any inbound Messages to process. We simply want to start the SI DSL based IntegrationFlow on a nightly basis preferably using a cron expression. Is there any way that we can start a SI Flow with a poller or "fake" a message based on a cron job?
IntegrationFlows
.from(() -> new GenericMessage<>(""),
e -> e.poller(p -> p.cron("0 0 0 * * ?")))
Since there is no something like NullMessage or Message with null payload, we just send a "fake" message with empty string as payload. You can just ignore that message downstream.
The first Lambda is implementation of the MessageSource<T> exactly what you mentioned about (S)FTP, S3, JDBC etc.
It will be still the same Inbound Channel Adapter, a-la equivalent for the <int:inbound-channel-adapter ref="">