Ivan,

Regardless of sync/async, the InOut MEP will always be handled as outlined in the 'invocation example' paragraph on http://servicemix.apache.org/5-jbi.html.

The only difference is that if you use sendSync on the consumer component side, the method call will not return before the entire invocation is finished. Right after the method call, you have the full response message available. However, this also means that the component thread, while waiting for the reponse, is unable to do anything else.

If you use a plain send(), the method call will return immediately and processing continues in the background. The consumer component thread is available to do other work. However, we still need to be able to find out about the reponse message. Therefore, the consumer component will most likely implement the ExchangeProcessor interface, which has a process(MessageExchange) method that will be invoked on step4/5 to signal the availability of the reponse message. It's the consumer reponsibility to send the DONE message to finish the Exchange.

Regards,

Gert


ivan wrote:
Lars Heinemann пишет:
Ivan,

the MEP is not important as far as I know.
The only difference is the sending method.

send() will send the message async
sendSync() as the name says sends sync

What about if we have send() and MEP InOut? What is behaviour or 2 services?


  Thanks,
  Ivan Pryvalov.


Lars


Am Donnerstag 07 August 2008 15:49:28 schrieb ivan:
   Hi!

How can I send asynchronously NornilizedMessages in JBI-env of ServiceMix?

Should I use InOnly MEP as well as io.send() instead of io.sendSync()?

   Thanks,
   Ivan Pryvalov.





Reply via email to