Hi Dilshani,

I and Prabath (from ESB team) had a similar discussion about this before.
AFAIU a call mediator without call-blocking=true (which is default) is not
same as send mediator. This is executed differently in thread level.

Say you have a config like below.

<call mediator with blocking true/>
<next-mediator/>
<next-mediator/>
..

In thread level this will be executed like below when there's a call
mediator with blocking true.

<call mediator with blocking true/> ---  executed by thread T1 and it will
end after registering a call back to process the response.
<next-mediator/>   --- response is received by a different thread  T2 via
callback. After that T2 takes care of executing mediators after that.
<next-mediator/> --- executed by T2

With blocking false :

<call mediator with blocking true/> ---  executed by thread T1 and the same
thread will wait till it get the response.
<next-mediator/>   --- response is received and same thread T1 takes care
of executing mediators after that.
<next-mediator/> --- executed by T1

Hope this helps you to understand the difference.

When blocking false, there are no waiting threads till receiving responses
that consumes resources like blocking true.

Prabath, can you please correct if anything need to be changed.

Thanks,
Malintha

On Fri, Apr 1, 2016 at 11:53 AM, Dilshani Subasinghe <[email protected]>
wrote:

> Hi Kathees,
>
> Thank you for the response.
>
> If it is, When blocking disabled call mediator should work as just like
> send mediator. Right ? (Correct me If I am wrong) Because call mediator
> will send message to endpoint and do not wait for response.
>
> But it doesn't work in that manner. Any clarification ?
>
> Regards,
> Dilshani
>
>
> On Fri, Apr 1, 2016 at 11:47 AM, Kathees Rajendram <[email protected]>
> wrote:
>
>> Hi Dilshani,
>>
>> Call mediator blocking functionality [1] is similar to the Callout
>> mediator.
>>
>> When invoked in a asynchronous manner, the Call mediator performs a
>> blocking external service invocation during mediation. So when you send the
>> call to backend with blocking functionality (blocking=true), It will wait
>> for the response. When you send the call with non blocking, It will work in
>> a synchronous manner without waiting for the response.
>>
>> [1] - https://docs.wso2.com/display/ESB490/Call+Mediator
>>
>>
>> Thanks,
>> Kathees
>>
>> On Fri, Apr 1, 2016 at 11:20 AM, Dilshani Subasinghe <[email protected]>
>> wrote:
>>
>>> Hi ESB team,
>>>
>>> In call mediator, there is a separate option called "Blocking". AFAIK
>>> call mediator having default functionality of blocking mediation.
>>>
>>> What will be the different behavior can have through Enabling Blocking
>>> rather than in-built blocking feature ? Even though Blocking disabled, it
>>> may not act as send mediator.
>>>
>>> Can someone help to figure out this ?
>>>
>>> Thank you.
>>>
>>> --
>>> Best Regards,
>>>
>>> Dilshani Subasinghe
>>> Software Engineer - QA
>>> WSO2, Inc.;http://wso2.com/
>>> <http://www.google.com/url?q=http%3A%2F%2Fwso2.com%2F&sa=D&sntz=1&usg=AFQjCNGJuLRux6KkJwXKVUCYOtEsNCmIAQ>
>>> lean.enterprise.middleware
>>>
>>> Mobile: +94773375185
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Kathees
>> Software Engineer,
>> email: [email protected]
>> mobile: +94772596173
>>
>
>
>
> --
> Best Regards,
>
> Dilshani Subasinghe
> Software Engineer - QA
> WSO2, Inc.;http://wso2.com/
> <http://www.google.com/url?q=http%3A%2F%2Fwso2.com%2F&sa=D&sntz=1&usg=AFQjCNGJuLRux6KkJwXKVUCYOtEsNCmIAQ>
> lean.enterprise.middleware
>
> Mobile: +94773375185
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Malintha Amarasinghe
Software Engineer
*WSO2, Inc. - lean | enterprise | middleware*
http://wso2.com/

Mobile : +94 712383306
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to