Hi,
My problem revolves around my inability to get SMX4/Camel/JBI endpoints
to process exchanges concurrently.
We have the following general work-flow:
1. Clients submit HTTP requests
2. SMX HTTP binding component gets these messages to Camel route, A.
3. Camel route A uses a recipient list to funnel these messages to
other JBI endpoints on the NMR.
4. The other JBI endpoints on the NMR process the HTTP request and the
exchange gets back to A with the out populated with information for the
HTTP response.
I am primarily concerned with #4. In order to implement #4 in one case,
I chose to use a Camel route because I need to use the services of some
other the other JBI endpoints.
To do this, I took one my OSGi bundles and created a class that extends
RouteBuilder. One of my routes might be:
from("jbi:start")
.to("jbi:B")
.to("jbi:C")
I then changed #3 such that in the necessary case it routes to
"jbi:start" as opposed to directly to one of the JBI black-box service
providers (e.g. jbi:B, jbi:C).
Now, assume a client submits an HTTP request such that it gets routed to
"jbi:start". I do not want any other requests blocked while this
exchange is getting processed. However, this is precisely what happens.
I have tried putting .threads(10) after from("jbi:start"), but that
did not help.
If I change #3 so that it routes to "jbi:B", HTTP requests get processed
concurrently. How can I make this happen and still use my Camel route?
Any help is greatly appreciated.