Configuring the components - 7.3

CamelContext (Mediation)

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 Studio
Content
Data Governance > Third-party systems > Custom code components (Mediation) > CamelContext components (Mediation)
Data Quality and Preparation > Third-party systems > Custom code components (Mediation) > CamelContext components (Mediation)
Design and Development > Third-party systems > Custom code components (Mediation) > CamelContext components (Mediation)
Last publication date
2023-06-12

Procedure

  1. Double-click the cConfig component, which is labelled Create_dataset, to display its Basic settings view in the Component tab. and set its parameters.
  2. Write a piece of code in the Code field to register the dataset instance foo into the registry, as shown below.
    SimpleDataSet dataset = new SimpleDataSet(1);
    String messageBody = "testbody";
    dataset.setDefaultBody(messageBody);
    registry.put("foo", dataset);
  3. Double-click the input cMessagingEndpoint component, which is labelled Read_dataset, to display its Basic settings view in the Component tab.
  4. In the URI field, enter dataset:foo between the quotation marks.
  5. Double-click the cProcessor component, which is labelled Monitor, to display its Basic settings view in the Component tab.
  6. In the Code box, customize the code as follows so that the Run console displays the message contents:
    System.out.println("Message content: "+ 
    exchange.getIn().toString());
  7. Press Ctrl+S to save your route.