1
votes

The basis is that our clients will be able to register their own endpoints. At the first time, I implemented a treatment for only one client who like to download files from his ftp server and processing files line per line then calling HTTP WS...etc The processing is like this:

ftp-inbound-channel-adapter --> file-inbound-channel-adapter --> int-file:splitter -->int-http:outbound-gateway -->servie activator -->mail-outbound-channel-adaper

The problem is that new clients like to register their own files and processing the same treatment separately because , if one client files is interrupted, it shouldn't interrupt another client. So each download source should be treated separately and can be processed in parallel with another source.

Each client should specify his ftp server details, http web services and email details.

Is there any simple/complex way that would allow us to essentially do runtime instantiations for the chain of endpoints...

thanks

1

1 Answers

0
votes

Please, take a look into the answer of the question how dynamic create ftp adapter in spring integration?.

Generally speaking we have there a sample which let you "put each adapter in a child context that send messages to a channel in the main context".

Please, follow with all the instructions there and you dynamic logic should be fine.