I have a standalone Camel application that is executed by an external task scheduler. Because of this, it needs to exit once execution is finished. To accomplish this, I'm passing the command line argument -dm 1
to process a single message before shutting down.
The application is being used to consume files in a directory
from(file("SomeDirectory").include("TestFile.*"))
.to(...);
The problem I'm running into is that each file is processed as a unique message, so the -dm 1
argument causes the application to exit after processing 1 file.
How can I get the application to exit after processing the full list of files given by TestFile.*
?