Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Message Transformation is a common use case in WSO2 Enterprise Integrator (WSO2 EI). When it comes to message transformationstransformation, you can use the FastXSLT mediator, XSLT mediator, Script mediator as well as the PayloadFactory mediator. This section describes different various message transformation use cases and also describe the parameters you can should configure for optimal performance.

Comparison of the FastXSLT mediator and the XSLT mediator

The FastXSLT Mediator and XSLT mediator can be used to do XSLT based message transformations in WSO2 EI. Both mediators can be used to perform complex message transformations. The FastXSLT mediator has significant performance over the XSLT mediator as it uses the streaming XPath parser and applies the XSLT transformation to the message stream instead of applying it to the XML message payload, but with the FastXSLT mediator you cannot specify the source, properties, features, or resources as you can with the XSLT mediator.

Info
titleNote


Always For better performance in implementations where the original message remains unmodified, always use the FastXSLT mediator instead of the default XSLT mediator for better performance in implementations where the original message remains unmodified.

In implementations where the message payload needs to be pre-processed, use the XSLT mediator instead of the FastXSLT mediator. Any pre-processing performed on the message payload is not be visible to the FastXSLT mediator, because the transformation logic is applied to the original message stream instead of the message payload.

Optimizing the XSLT Mediator

In real world scenarios, you might come across use cases where you do pre-processing before doing the XSLT message transformation using the XSLT mediator. In such use cases, you have to use the XSLT mediator instead of the FastXSLT mediator. You can specify the source, properties, features, or resources with the XSLT mediator, but the downside with the XSLT mediator is that it does not perform well when the message size is larger.

...

Then the XSLT transformation happens in memory without writing data to disk. Therefore, performance is increased.

Optimizing the fastXSLT Mediator

If you want to perform transformation on the original message, you can use the FastXSLT mediator. Any pre-processing that applies to the message payload is not be visible to the FastXSLT mediator as the transformation logic is applied to the message stream instead of the message payload.

...