Stopping a file inbound channel adapter after one one file is read

后端 未结 1 412
感情败类
感情败类 2020-12-20 05:15

Our application uses a Spring Integration file:inbound-channel-adapter to poll a directory to listen to when a file is dropped there. Spring Integration then st

相关标签:
1条回答
  • 2020-12-20 05:47

    You can use a FireOnceTrigger on the poller, or one of the techniques described in addition to that, in this answer.

    To programmatically stop the adapter, close() the context, or call adapter.stop() (@Autowire the adapter as a SourcePollingChannelAdapter. Or use a <control-bus/> and send a message with payload "adapterId.stop()".

    0 讨论(0)
提交回复
热议问题