Custom callback handler - 7.3

Talend ESB Service Developer Guide

Version
7.3
Language
English
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
Last publication date
2023-04-17

The custom callback handler can be enabled via feature (supports both Soap and REST service):

<jaxrs:features>
    <bean class="org.talend.esb.policy.correlation.feature.CorrelationIDFeature"/>
</jaxrs:features>

<jaxws:properties>
  <entry key="correlation-id.callback-handler">
    <bean class="com.example.CorrelationHandler"/>
  </entry>
</jaxws:properties>

The bean class com.example.CorrelationHandler is a custom class which implements the org.talend.esb.policy.correlation.CorrelationIDCallbackHandler interface. If such callback class is not specified in the properties, then the correlation Id will be generated automatically by a default callback handler which provides a system UID. For more information, see Automated correlation ID generation (system UID).

It is also necessary to specify the correlation id handler:

<jaxws:properties>
  <entry key="correlation-id.callback-handler">
    <bean class="com.example.CorrelationHandler"/>
  </entry>
</jaxws:properties>