spring-projects / spring-projects/spring-integration

.ok file awareness in FileWritingMessageHandler and FileReadingMessageSource [INT-3046]

Open
#7,019 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: file type: enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.