You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Sharon Yin <yi...@chinasoftinc.com> on 2006/11/21 06:54:54 UTC
Is component using mutil-thread to process message or not?
Can I suppose like this:
Every component, once it's deployed on servicemix, there is single instance of this component in JBI container when servicemix is running, then, whenever the component receives a message, the component will raise a new thread to handle it, is it right?
If not, the component will process messages one by one, how to promise its performance?
Or my supposition is wrong at all?
Thanks.
Re: Is component using mutil-thread to process message or not?
Posted by Guillaume Nodet <gn...@gmail.com>.
Components that use MessageExchangeListener interface must be
thread safe and will received exchanges concurrently (unless you put
a synchronized keywork on the onMessageExchange method, which would
badly decrease performances). This is the same thread model than
servlets.
Other components have to poll exchanges from the delivery channel and thus
are responsible for defining their own threading model.
On 11/21/06, Sharon Yin <yi...@chinasoftinc.com> wrote:
> Can I suppose like this:
>
> Every component, once it's deployed on servicemix, there is single instance of this component in JBI container when servicemix is running, then, whenever the component receives a message, the component will raise a new thread to handle it, is it right?
> If not, the component will process messages one by one, how to promise its performance?
> Or my supposition is wrong at all?
>
> Thanks.
--
Cheers,
Guillaume Nodet