WSO2 ESB comes with an assortment of mediators to filter, transform, route and manipulate messages. When you have a scenario that requires functionality not provided by the existing mediators, you can write your own custom mediators to implement your specific business requirements. Your custom mediators then must be plugged into the WSO2 ESB. After adding them to the ESB, they function together with core mediators that come with the product. The custom mediators can be distributed in a packaged form that can be installed in another WSO2 ESB instance.
For more information, see Writing a WSO2 ESB Mediator.