Configuring the second sub-route - 7.1

Direct - Mediation

author
Talend Documentation Team
EnrichVersion
7.1
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Data Governance > Third-party systems > Messaging components (Mediation) > Direct components (Mediation)
Data Quality and Preparation > Third-party systems > Messaging components (Mediation) > Direct components (Mediation)
Design and Development > Third-party systems > Messaging components (Mediation) > Direct components (Mediation)
EnrichPlatform
Talend Studio

Procedure

  1. Double-click the second cDirectVM component (labelled D-VM_consumer in this example) to display its Basic settings view on the Component tab.
  2. In the Endpoint Name field, enter dvm in double quotation marks to name the endpoint.
  3. Double-click the cProcessor (labelled Show_message in this example) component to display its Basic settings view.
  4. In the Code area, enter the following code to display the content of the message headers and the message body:
    exchange.getOut().setHeader("header1",exchange.getIn().getHeader("Name"));
    exchange.getOut().setHeader("header2",exchange.getIn().getHeader("Company"));
    exchange.getOut().setBody(exchange.getIn().getBody(String.class));
    System.out.println();
    System.out.println("Message for "+exchange.getOut().getHeader("header1")
    +" of "+exchange.getOut().getHeader("header2")+":");
    System.out.println(exchange.getOut().getBody(String.class));