Anybody would please through some light on difference between call and send mediator and what use cases these two mediators are used.
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
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
call
will arrive to the mediator but it does not. Is it by default? –
Whitacre <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><axis2ns19541:rows xmlns:axis2ns19541="...."/></soapenv:Body>
–
Whitacre • 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.
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
© 2022 - 2024 — McMap. All rights reserved.