I suppose the solution would not be using the file component at all, but rather agregating messages and using ZipOutputStream to convert those messages into a zip file and only then to store it in the file system via file component.
On Wed, Nov 13, 2019, 20:57 WEIQUAN YUAN <weiquan.y...@gmail.com> wrote: > can you use some indicator to check if all the files are created or not. If > it is not true, you don't need to call another route in choice when > condition. > > On Wed, Nov 13, 2019 at 8:45 AM Mikael Andersson Wigander < > mikael.grevs...@gmail.com> wrote: > > > Hi > > > > I have a route that creates up to ten different files in a directory and > > another route that zips all these files. > > > > We see in some scenarios that the zipping is done BEFORE all files have > > been created. Ending up with two zip files, one with eight files and one > > with two files. > > The zip-route uses a delay, a completionFromBatchConsumer and > > eagerCheckCompletion. > > > > How can I chain these two routes together so the zipping is always run > > after all files have been created? > > > > My producer route creates files using a multicast and several > > .to("direct://“). > > > > > > Thx > > > > M > > > > -- > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Weiquan Yuan > Located in Ottawa, Canada >