This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Mediators
A mediator is a full-powered processing unit in the ESB. In run-time, it has access to all the parts of the ESB along with the current message. Usually a mediator is configured using XML. Different mediators have their own XML configurations.
At run-time, a message is injected into the mediator with the ESB's run-time information. Then this mediator can do virtually anything with the message.
Mediators in a sequence can be one of the following types:
- Node mediators - Contains child mediators.
- Leaf mediators - Does not hold any other child mediators.
Also mediators are considered as one of the main mechanisms for extending an ESB. A user can write a mediator and put it into the ESB. This custom mediator and any other built in mediator will be exactly the same as the API and the privileges (see Writing a WSO2 ESB Mediator).
The standard mediators in WSO2 ESB are listed in the table below. Click a link for details on that mediator. There are also many samples that demonstrate how to use mediators. For details, see Samples.
The Mediator Catalog
Category | Name | Description |
---|---|---|
Core | Sends a message out | |
| Logs a message | |
| Sets or remove properties associated with the message | |
| Refers a sequence | |
| Sends event notifications to an event source, publishes messages to predefined topics | |
| Drops a message | |
| Enriches a message | |
Filter | Filters a message using XPath, if-else kind of logic | |
| Inbuilt filter for choosing messages in ESB out path | |
| Inbuilt filter for choosing messages in ESB in path | |
| Filters messages using XPath, switch logic | |
| Routes messages based on XPath filtering | |
| Implements complex routing rules (Header based routing, content based routing and other rules) | |
Transform | Performs XSLT transformations on the XML payload | |
FastXSLT | Performs XSLT transformations on the message stream | |
| Modifies and rewrites URLs or URL fragments | |
| XQuery | |
PayloadFactory | Transforms the message payload | |
| Sets or removes SOAP headers | |
| Fault (also called Makefault) | Create SOAP Faults |
Advanced | Evaluate messages based on whether the same message came to the ESB | |
| Clones a message | |
| Stores messages in a predefined message store | |
| Splits a message | |
| Combines a message | |
| Blocks web services calls | |
| Executes a set of mediators transactionally | |
| Limits the number of messages | |
| Reliable messaging | |
| Writes data to database | |
| Retrieves information from database | |
| Executives rules | |
| Fines grain authorization | |
| 2-legged OAuth support | |
Extension | Creates and executes a custom mediator | |
| Executes a custom command | |
| Executes a mediator written in Scripting language | |
| Creates a mediator managed by Spring | |
| Used to apply lightweight transformations on messages in an efficient manner |