spring-projects / spring-projects/spring-integration
.ok file awareness in FileWritingMessageHandler and FileReadingMessageSource [INT-3046]
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 1.2k
- Avg merge
- 17h 48m
- Merged PRs (30d)
- 62
Description
Mohammed Saleem Padinharkkara opened INT-3046 and commented
While writing/reading large files, we typically wait for a ".ok" file to begin processing. When using Spring Integration, we can use the temporary suffix to ensure that the file will be complete at the time of reading, but in real world situations where we are processing files generated by different systems, we are left to write a chain of handlers to look for the .ok file and then process the actual file.
Ideally the framework should have this as a built in property, something called triggerFile for both FileWritingMessageHandler and FileReadingMessageSource, which will look for the triggerFile in the same directory before it continues with the current functionality.
For eg:
<int-file:inbound-channel-adapter id="wssConfirmationsOK" filename-pattern="murexTradeConfirmation*.xml" triggerFileExtension="ok" directory="file:${confirmations.directory}">
<int:poller id="poller" fixed-rate="30000"
max-messages-per-poll="10" />
</int-file:inbound-channel-adapter>
<int-file:outbound-channel-adapter channel="generatedTdmls" directory="file:${tdmls.directory}" triggerFileExtension="ok"/>
Affects: 2.2.3
1 votes, 3 watchers
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating FileWritingMessageHandler and FileReadingMessageSource and reading how their current file completion and selection behavior works. Compare the requested triggerFileExtension examples with the existing temporary-suffix functionality, then identify the relevant file-module tests. Done means both components consistently wait for the matching .ok file before processing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100