The Call mediator is used to send messages out of the ESB to an endpoint. The Call mediator invokes the service in a synchronous manner and underline worker thread returns without waiting for the response. Mediation will be paused from that point. When the response is received, the mediation flow resumes from the next mediator in the sequence.
The Call mediator replaces the deprecated Callout Mediator, which performed a blocking external service invocation during mediation. Unlike the Callout mediator, the Call mediator leverages the non-blocking transports for much greater performance.
There are two modes of operation in a Call Mediator:
- Sending a message using message-level information
- Sending a message to a predefined endpoint
If we do not provide an endpoint, it will try to send the message using the wsa:to
address of the message. If we do provide an endpoint, it will send the message according to the information in the endpoint. The endpoint type can be either a Leaf endpoint (i.e. Address
, WSDL
, Default
or Http
) or a Group endpoint (Failover
, Loadbalance
or Recipient List)
.
Syntax
<call/>
If the message is to be sent to one or more endpoints, use the following syntax:
<call> (endpointref | endpoint)+ </call>
- The
endpointref
token refers to the following:
<endpoint key="name"/>
- The
endpoint
token refers to an anonymous endpoint definition.
UI Configuration
When adding mediators to a sequence, you can add the Call mediator by choosing Core -> Call.
Specify the endpoint by selecting one of the following values:
- Define Inline - Allows you to define and add the endpoint in one step. Click Add, choose an endpoint type from the list, and then define it as described in Adding an Endpoint.
- Pick From Registry - Pick a path either from the Configuration Registry or Governance Registry. See Working with the Registry for more information about choosing a path from the registry.
- XPath - Specify an XPath expression. You can click Namespace to map namespaces to the prefixes you use in your expression.
Example
See Sample 500: Call Mediator for Non-Blocking Synchronous Service Invocation.