Compression Policy - 7.1

Talend ESB Infrastructure Services Configuration Guide

Version
7.1
Language
English (United States)
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Installation and Upgrade

This section shows you how to use the Compression Feature in Talend ESB.

The compression feature of Talend ESB compresses the SOAP Body (and only the SOAP Body) if a certain threshold size is reached. The compression uses a GZIP alogrithm with a following base64 encoding. The compressed data is still part of the SOAP Body, so the SOAP Message is still a valid SOAP Message without any changes to the header / http header fields. However, note that using Talend ESB Compression and CXF GZIP Compression together is not recommended.

The Talend ESB Compression feature is driven completely by the threshold attribute. So, the supported attribute is threshold - the value, in bytes, under which messages are not compressed. And its default value is "1024".

The Compression policy can be enabled via policy or by adding the feature, depending on the type of service (SOAP or REST).

To enable the Compression via policy (for SOAP services only), upload the following Compression policy to the Service Registry and attach it to a Service:

<wsp:Policy Name="wspolicy_compression" xmlns:wsp="http://www.w3.org/ns/ws-policy">
    <wsp:ExactlyOne>
        <wsp:All>
            <tpa:Compression xmlns:tpa="http://types.talend.com/policy/assertion/1.0" threshold="1000" />
        </wsp:All>
    </wsp:ExactlyOne>
</wsp:Policy>

The policy must be applied to both Consumer and Provider.