user509755
user509755

Reputation: 2981

How to dynamically change polling remote dir in sftp inbound channel adapter

Is they any way to dynamically poll for file on dynamic remote dir as our remote loc changes everyday?

We are using spring integration 4.1

Upvotes: 1

Views: 452

Answers (1)

Gary Russell
Gary Russell

Reputation: 174544

Not currently; you could do it by wiring up the inbound adapter manually; you will need beans for SftpInboundFileSynchronizer, SftpInboundFileSynchronizingMessageSource (which gets a reference to the synchronizer) and a SourcePollingChannelAdapter (which gets the source).

Then, you can call setRemoteDirectory on the synchronizer and the next poll will use the new directory.

I have created a JIRA Issue to add this as a feature in 4.2.

Upvotes: 2

Related Questions