-
1. Re: is NMR a multithreaded endpoints
njiang Mar 11, 2010 10:07 PM (in response to lekkie_lomotayo)Hi ,
There is a thread pool in the NMR to deal with the message, and camel-nmr consumer just leverage the NMR thread pool to do its daily job.
So my answer is the multiple request to nmr:myDynamicRouter endpoint can be handled parallelly.
-
2. Re: is NMR a multithreaded endpoints
valdar Apr 15, 2010 3:31 AM (in response to njiang)Mmm, are you sure?
I have this route deployed in FUSE esb 4.2:
JETTY -> CXF with NMR address
if I send multiple requests to the jetty url they are served 1 by 1.
If I expose CXF service directly on an url address multiple requests are served at the same time.
So I think that the NRM endpoints are not multithreaded "out of the box".
Do I need to activate this behavior in some configuration file?
Andrea.
-
3. Re: is NMR a multithreaded endpoints
lekkie_lomotayo Apr 16, 2010 3:57 AM (in response to valdar)My exact sentiment. This is because I have tested this and it seems to use a single thread which blocks incoming requests.
Here is my test
E
Where
(A) nmr:consumer
(B) router1
(C) nmr:processor
(D) router1
(E) nmr:provider
When it gets to D, the system blocks and throw timeout exception, because it is waiting for B to end. Of course it will never end until this flow returns.
Edited by: lekkie on Apr 15, 2010 7:41 AM
Edited by: lekkie on Apr 16, 2010 7:56 AM
-
4. Re: is NMR a multithreaded endpoints
njiang Apr 15, 2010 10:43 PM (in response to valdar)Can I have a look at your Jetty and NMR route?
Are you using the Jetty as a proxy to send the request to the CXF ?
camel-jetty endpoint support the server the multi request at the same time.
-
5. Re: is NMR a multithreaded endpoints
njiang Apr 15, 2010 10:51 PM (in response to lekkie_lomotayo)How did you send the request to "nmr:consumer" ?
If you just use the client.sendSync(e) to send the request in a loop, the camel route will server the request one by one.
-
6. Re: is NMR a multithreaded endpoints
lekkie_lomotayo Apr 16, 2010 3:55 AM (in response to njiang)The camel snippet below calls the nmr:consumer.
-
7. Re: is NMR a multithreaded endpoints
valdar Apr 16, 2010 4:26 AM (in response to njiang)This is the definition of the jaxws endpoint:
<jaxws:endpoint id="cxfNMRService" implementor="xx.yyy.zzz.CxfNmrService" address="nmr:cxfNMR" />
and this is the route:
from("jetty:http://0.0.0.0:8390/xxx/yy?matchOnUriPrefix=true") //logging stuff .beanRef("myTx", "log") //call to the CXF endpoind on the NMR .to("nmr:cxfNMR") //logging stuff .beanRef("myTx", "log");