Configuring the components and connections - 7.0

Dynamic Router - Mediation

author
Talend Documentation Team
EnrichVersion
7.0
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 > Routing components (Mediation) > Dynamic Router components (Mediation)
Data Quality and Preparation > Third-party systems > Routing components (Mediation) > Dynamic Router components (Mediation)
Design and Development > Third-party systems > Routing components (Mediation) > Dynamic Router components (Mediation)
EnrichPlatform
Talend Studio

Procedure

  1. Double-click the input cFile component to display its Basic settings view in the Component tab and set its properties.
    In this use case, simply specify the input file path and leave the other parameters as they are.
  2. Double-click the cDynamicRouter component to display its Basic settings view in the Component tab.
  3. In the Bean class field, type in the name of the predefined Java bean. Leave the Specify the method check box unselected as there is only one method in the Java bean and leave the Ignore Invalid Endpoints check box unselected if you want the component to throw an exception when endpoint URIs are not valid.
  4. Double-click the first cMessagingEndpoint component, which is labelled Washington, to display its Basic settings view in the Component tab, and type in the URI in the URI field for the destination of your message.
    Here, we want to use this component to retrieve the message routed to the URI direct:Washington, as shown below.
  5. Repeat this step to set the endpoint URIs for the other two cMessagingEndpoint components: direct:London and direct:Beijing respectively.
  6. Double-click the first cProcessor component, which is labelled Monitor_Washington, to display its Basic settings view in the Component tab.
  7. In the Code box, customize the code to display the file name of the message routed to the endpoint Washington on the console.
    System.out.println("Message on endpoint Washington: "+
    exchange.getIn().getHeader("CamelFileName"));
  8. Repeat these steps to configure the other two cProcessor components to display the file names of the messages routed to the endpoints London and Beijing respectively.
  9. Press Ctrl+S to save your Route.