Skip to content

Remote files sources should have the option not to read remote file contents #10094

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

Open
fgabolde opened this issue Jun 10, 2025 · 1 comment
Labels
status: waiting-for-triage The issue need to be evaluated and its future decided type: enhancement

Comments

@fgabolde
Copy link

Expected Behavior

File message sources should not have to download the file contents. There are use cases for tracking the files themselves, but not their contents.

E.g. I want to write a service that monitors files on a remote file system and notifies a downstream service. It does not need to care about the file contents.

As far as I can tell, "all" that would be needed is to allow AbstractRemoteFileStreamingMessageSource to return remotePath as message payload, instead of session.readRaw(remotePath).

Current Behavior

Remote file sources always attempt to read the file contents.

Context

E.g. I want to write a service that monitors files on a remote file system and notifies a downstream service. It does not need to read the file contents.

This should also work for the AWS S3 integration, hopefully (which is my actual use case). Consumers of this message source would handle S3Object payloads instead of InputStream.

All the rest of the Spring Integration machinery (file filters, message stores, ...) is super useful to me, so I really want to take advantage of it, but the file downloading is not, so I'm currently copying the code of AbstractRemoveFileStreamingMessageSource and specializing it for my use case, but I feel that it would be generally beneficial to have.

@fgabolde fgabolde added type: enhancement status: waiting-for-triage The issue need to be evaluated and its future decided labels Jun 10, 2025
@artembilan
Copy link
Member

That is why it is called Streaming.
I think what you are looking for is a nlst command for the AbstractRemoteFileOutboundGateway: https://docs.spring.io/spring-integration/reference/6.3/ftp/outbound-gateway.html#using-the-nlst-command.

I don't think we will look into something like poll just for list names.
That simply could be achieved with simple poller for let's say remote directory name as a message payload and that gateway which would return you a list of names. Filters can be applied there as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage The issue need to be evaluated and its future decided type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants