vm protocol threading behaviour

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

vm protocol threading behaviour

vdhawan
I have a camel context which has a cxf endpoint to accept messages. The same camel context has a camel route(route A) which invokes another camel route(route B).
I executed a small load test (sent 10 request with 3 threads) using soap ui on the cxf endpoint. The average response time of the camel context was 6 seconds which is higher than what i expected.
Using hawtio i could see the problem area. Route B is fine and approximately takes 2 seconds to complete however surprisingly route A (which does nothing expect calling route B) takes approx 6 seconds.

The issue goes away(response time is back to 2 seconds) if i execute the test with 1 thread.

Route A calls route B on vm protocol. It seems route a waits for the first thread to come back before sending in the request for second thread and so on. What can i do to resolve this issue

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: vm protocol threading behaviour

apara
By default vm routes have 1 processing thread.  Set concurrentConsumers to more than 1 to get threading.  See these optionshttp://camel.apache.org/seda.html