The ESB profile of WSO2 EI 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 ESB profile. After adding them to the ESB profile, 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 ESB profile instance.
For more information, see Writing an ESB Mediator.