wso2:esb: What is the basic difference between call mediator and send mediator
Asked Answered
M

3

12

Anybody would please through some light on difference between call and send mediator and what use cases these two mediators are used.

Moran answered 18/12, 2015 at 17:5 Comment(0)
F
0

Another characteristic is that the callout mediator is blocking, send mediator and call mediator are not blocking. This answer is in regards to WSO2 versions until 4.8.0

Futhark answered 28/12, 2015 at 11:8 Comment(3)
Maybe this was the case in 2015 when you answered the question, it certainly isn't now. The call mediator is non blocking by default in current versions.Olshausen
Dear Down-Voter: Please leave a criticism along with your vote. Until versions 4.9 this answer is trueFuthark
I did leave a comment when I down voted. What do you mean "Until versions 4.9 this answer is true" ? In 4.9.0 it is non-blocking by default docs.wso2.com/display/ESB490/Call+Mediator and was also non-blocking in 4.8.0 docs.wso2.com/display/ESB480/Call+MediatorOlshausen
I
17

Send mediator - used to send messages out of Synapse to some endpoint. Then the response is returned to the OutSequence where you can send it back to the client

Use cases - When you only need to send a message to one back end and return the response back to the client.

Call mediator - Also used to send messages out of the Synapse to some endpoint, but the response does not come to the OutSequence. When we send a request using the call mediator, the response will arrive to the mediator that is placed right after the call mediator.So this will allow us to specify all the service invocations one after the other in a chain within a single sequence

Use cases - Service chaining. i.e.- Vehicle license renewal service

Ironlike answered 19/12, 2015 at 23:30 Comment(4)
You said that the response after call will arrive to the mediator but it does not. Is it by default?Whitacre
Response not come to the call mediator, the response comes to the next mediator that is placed right after the call mediator. Ex- <call> <endpoint> </call> <log level="full"/> response will hit the log mediator.Ironlike
I got just this with no body: <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><axis2ns19541:rows xmlns:axis2ns19541="...."/></soapenv:Body>Whitacre
It's OK now, I was using http endpoint instead address and that was the case.Whitacre
M
1

• Call mediator: This mediator can be used in both blocking and non-blocking modes. In blocking mode, the mediation is executed in a single thread and waits for the response before proceeding. In non-blocking mode, the mediation is executed in multiple threads and registers a callback for the response. The call mediator can be used to implement service chaining, where the response from one service is used to invoke another service within the same sequence.

• Send mediator: This mediator is always non-blocking and uses the passthrough transport for better performance. The send mediator does not wait for the response but sends it to the out sequence or fault sequence depending on the outcome. The send mediator can be used when you only need to send a message to one service and return the response back to the client.

Mcbrayer answered 26/7, 2023 at 9:2 Comment(0)
F
0

Another characteristic is that the callout mediator is blocking, send mediator and call mediator are not blocking. This answer is in regards to WSO2 versions until 4.8.0

Futhark answered 28/12, 2015 at 11:8 Comment(3)
Maybe this was the case in 2015 when you answered the question, it certainly isn't now. The call mediator is non blocking by default in current versions.Olshausen
Dear Down-Voter: Please leave a criticism along with your vote. Until versions 4.9 this answer is trueFuthark
I did leave a comment when I down voted. What do you mean "Until versions 4.9 this answer is true" ? In 4.9.0 it is non-blocking by default docs.wso2.com/display/ESB490/Call+Mediator and was also non-blocking in 4.8.0 docs.wso2.com/display/ESB480/Call+MediatorOlshausen

© 2022 - 2024 — McMap. All rights reserved.