Hi, I'm trying to read files from the directory. If file cannot be processed it stays there to be tried later. I want to try to process as many files as possible per each poll.
This is configuration:
The problem is that this configuration causes infinite loop on reading the files in "retryFolder" over and over again. Similarly, if max-messages-per-poll set to, say 10, then each poll will return exactly 10 messages, even if there is only 1 file (i.e. all 10 messages will be the same).Code:<int-file:inbound-channel-adapter prevent-duplicates="false" directory="${integration.iftsta.retryFolder}" channel="iftstaRetryChannel"> <int:poller max-messages-per-poll="-1" fixed-rate="3600000" /> </int-file:inbound-channel-adapter>
While this is in some way expected behavior (documentation states that poller in this scenario may be "potentially spinning in the infinite loop if the implementation of the custom method of the MessageSource has a potential to never return null") I wonder if there is a workaround to achieve described goal - i.e. to leave polled files in place to try them later and to avoid redundant messages?


Reply With Quote
