I am writing a spring integration application that is supposed to tail multiple files (could be as many as 100). I am using the OSDelegatingFileTailingMessageProducer as the message source, which is the beginning of a pipeline involving multiple filters and channels.
Tailing one file works fine with this pipeline with an XML configuration file for the channels and transformers, but tailing many of those files would mean multiplication of this XML configuration, which is not good programming practice in my eyes.
I guess I will have to build these pipelines within Java by programmatically constructing a Spring application context. Are there any other options?
EDIT:
Probably using the BeanFactoryPostProcessor is the way to go: https://stackoverflow.com/a/15773000/2069922 ?