Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileReadingMessageSource conflict between queue-size and filter [INT-2507] #6487

Closed
spring-operator opened this issue Apr 11, 2012 · 2 comments
Assignees
Milestone

Comments

@spring-operator
Copy link
Contributor

James Morgan opened INT-2507 and commented

Specifying a queue-size for an inbound-channel-adapter (or constructing FileReadingmessageSource with an internalQueueCapacity) assigns a scanner with a filter that limits the number of records in a poll to the specified size. However, if a filter is also assigned, it overwrites the filter assigned by the constructor removing any limiting to the number of files maintained per scan.

It also appears that creating an inbound-channel-adapter with queue-size="#" and prevent-duplicates="true" would also do the same thing (namely, not limit the number of files maintained per scan).

A work-around is to create a new filter that does the same thing as HeadFilter in HeadDirectoryScanner and then assign that filter (along with the original) to a CompositeFileListFilter and omit the queue-size attribute.

Alternatively, HeadDirectoryScanner could be modified to implement DirectoryScanner AND have a DirectoryScanner field that it delegates everything to. All methods would pass through to the delegate. However, it would implement its listFiles method to use its own size filter to constrain and return the results of the call to the field's DirectoryScannner.listFiles method.


Affects: 2.0.4, 2.1.1

Referenced from: pull request #1487

1 votes, 2 watchers

@spring-operator
Copy link
Contributor Author

Franz Neumann commented

any plans to fix it?

@spring-operator
Copy link
Contributor Author

Gary Russell commented

It didn't get any attention until now, probably because there's a work-around. We'll take a look for the 4.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants