In my Camel application there are 2 CXF endpoints that are handled by the same processing route, and AFAIK each endpoint may produce Exchanges in parallel depending on incoming HTTP requests.
Both endpoints forward the request through the same route using direct: component, which is sometimes described as the Camel equivalent of calling a method.
The direct: component provides direct, synchronous invocation of any consumers when a producer sends a message exchange.
My questions:
- Does
direct:component run different requests in parallel? (each request has its own Exchange and is executed by a different javaThread) - If not, how do I handle CXF requests in parallel?
This is my situation:
<route id="CxfRoute1">
<from uri="cxf:bean:endpoint1" />
<to uri="direct:handle" />
</route>
<route id="CxfRoute2">
<from uri="cxf:bean:endpoint2" />
<to uri="direct:handle" />
</route>
<route id="HandleStuffRoute" />
<from uri="direct:handle" />
<to uri="bean:stuffHandler" />
</route>