Reputation: 11
is it necessary to create a camelcontext
like this ? and the use the start()
and stop()
methods ?
CamelContext camelContext = new DefaultCamelContext();
Because even when I don't create a camel context and not use start()
and stop()
, my route works and the files are copied from one folder to another.
from("file:C:/Users/user1/Desktop/in").process(new MyProcessor()).to("file:C:/Users/user1/Desktop/out");
So why in some tutos, they say that it is necessary to create camelcontext
?
Upvotes: 0
Views: 472
Reputation: 836
if you're using quarkus vs spring boot you don't need to explicitly start camel routes . If you do it only with java without using any framework, you should add these routes to the context and start them later.These frameworks start and stop for you in the background .
Upvotes: 1