Configuring the second sub-route - Cloud - 8.0

Direct (Mediation)

Version
Cloud
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
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)
Last publication date
2024-02-21

Procedure

  1. Double-click the second cDirectVM component (labeled 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 (labeled 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));