Enabling the default Correlation ID policy - 8.0

Talend ESB Infrastructure Services Configuration Guide

Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Talend ESB
Talend Runtime
Design and Development
Installation and Upgrade
Last publication date

The default correlation ID feature provides two options:

  • Use of the custom correlation ID using a callback.

  • Use of the custom correlation ID generated.

For more information on how to use these options, see the procedure below:

  1. Make sure the Talend Runtime is running, and the Service Registry service has been started. For more information, see Introduction to Service Activity Monitoring.

  2. Import the correlation ID policy to the Service Registry, either directly from the Talend Runtime. For more information, see Using the Service Registry with Talend ESB or via the Talend Administration Center as explained in Setting up Service Registry.

    Talend ESB provides a template policy called wspolicy_correlation_id.policy and available in the /add-ons/registry/policies folder of the Talend ESB product.

    <wsp:Policy Name="wspolicy_schema_correlation_id" 
                type="callback" />

    In this default example, the callback option is used: type="callback".

    But if you want to automatically generate the correlation ID, remove the type="callback" attribute and value from the policy, then the id will be generated automatically as system UID, and the value will be the same for request and response.

    Example of Correlation ID policy without the callback option:
    <wsp:Policy Name="wspolicy_schema_correlation_id" xmlns:wsp="http://www.w3.org/ns/ws-policy">
                <tpa:CorrelationID xmlns:tpa="http://types.talend.com/policy/assertion/1.0" type="callback"/>
  3. If you use the callback option, you should specify the correlation ID callback handler that will produce your custom correlation ID:

      <entry key="correlation-id.callback-handler">
        <bean class="common.talend.CorrelationHandler" />

    Where common.talend.CorrelationHandler is a custom class that implements the org.talend.esb.policy.correlation.CorrelationIDCallbackHandler interface. You need to create the class and change the name of the class to your own in the code above appropriately.

  4. Assign the policy to the service which you want to enable the Correlation ID feature.