I would like to implement a distinct thread for each route in apache camel.I do not want to use a thread pool or async as I want my process to remain synchronous.Could I please get a code example for the same in java DSL format.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Each route uses its own thread, unless a route is using the direct component (http://camel.apache.org/direct), which will re-use the caller thread.
For example having 2 routes
Is 2 routes, and each route uses its own thread.
On the other hand the following 2 routes
Then the 2nd route being a direct endpoint, will re-use the caller thread, from the 1st route, when the 1st route routes the message to it, using: .to(“direct:bar”)