About Mediators¶
Mediators are individual processing units that perform a specific actions on messages that pass through the Micro Integrator. The mediator takes the message received by the REST API or proxy service, carries out predefined actions on it (such as transforming, enriching, filtering), and outputs the modified message.
For example, the Clone mediator splits a message into several clones, the Call mediator calls a backend endpoint with the message, and the Aggregate mediator collects and merges the responses and the Respond mediator sends the message back to the client.
Classification of mediators¶
Mediators are classified as follows based on whether they access the message's content:
Classification | Description |
---|---|
Content-aware mediators | These mediators always access the message content when mediating messages. |
Content-unaware mediators | These mediators never access the message content when mediating messages. |
Conditionally content-aware mediators |
These mediators could be either content-aware or content-unaware depending on their usage in the configuration. For example, a simple Log mediator configured as <log/> is content-unaware. However, a log mediator configured as <log level="full"/> would be content-aware since it is expected to log the message payload.
|
Note
When at least one content-aware mediator is added to the mediation sequence, the message payload needs to be fully built and accessible in memory. This is necessary because the mediator needs to examine or modify the message's content and hence incurs a performance overhead.
List of mediators¶
WSO2 Micro Integrator includes a comprehensive catalog of mediators that provide functionality for implementing widely used Enterprise Integration Patterns (EIPs). You can also easily write a custom mediator to provide additional functionality using various technologies such as Java and scripting.
Category | Mediator | Content aware/unaware |
---|---|---|
Generic mediators | Call mediator | Conditionally content-aware |
Property mediator | Conditionally content-aware | |
Log mediator | Conditionally content-aware | |
Respond mediator | Content-unaware | |
Sequence mediator | Content-unaware | |
Call Template mediator | Content-unaware | |
Drop mediator | Content-unaware | |
Property Group mediator | Conditionally content-aware | |
Cache mediator | Content-aware | |
Throttle mediator | Content-unaware | |
Store mediator | Content-aware | |
Flow control mediators | Filter mediator | Conditionally content-aware |
Switch mediator | Conditionally content-aware | |
Clone mediator | Content-aware | |
Iterate mediator | Content-aware | |
ForEach mediator | Content-aware | |
Aggregate mediator | Content-aware | |
Validate mediator | Content-aware | |
Transformation mediators | Enrich mediator | Content-aware |
Header mediator | Conditionally content-aware | |
XSLT mediator | Content-aware | |
JSON Transform mediator | Content-aware | |
Fault mediator | Content-aware | |
PayloadFactory mediator | Content-aware | |
Data Mapper mediator | Content-aware | |
Extension mediators | Script mediator | Content-aware |
Class mediator | Content-aware | |
Security mediators | Oauth mediator | Content-unaware |
Entitlement mediator | Content-aware | |
NTLM mediator | Content-unaware | |
Database mediators | Data Service Call mediator | Content-aware |
DBLookup mediator | Content-aware | |
DB Report mediator | Content-aware | |
Other mediators | Send mediator | Content-unaware |
Callout mediator | Content-aware | |
Smooks mediator | Content-aware | |
Transaction mediator | Content-aware | |
Builder mediator | Content-aware | |
Loopback mediator | Content-unaware | |
FastXSLT mediator | Content-unaware | |
URLRewrite mediator | Content-aware | |
XQuery mediator | Content-aware | |
EJB mediator | Content-aware |