Configuring the components and connections - 7.0

Load Balancer - 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) > Load Balancer components (Mediation)
Data Quality and Preparation > Third-party systems > Routing components (Mediation) > Load Balancer components (Mediation)
Design and Development > Third-party systems > Routing components (Mediation) > Load Balancer components (Mediation)
EnrichPlatform
Talend Studio

Procedure

  1. Double-click the cFile component to open its Basic Settings view in the Component tab.
  2. In the Path field, specify the file path to message source.
  3. From the Encoding list, select the encoding type of your message files. Leave the other parameters as they are.
  4. Double-click the cLoadBalancer component to open its Basic Settings view in the Component tab, and select the load balancing method you want to use from the Strategy list. In this scenario, we use the default Round robin method.
  5. Double-click the cJavaDSLProcessor component labeled To_Receiver_A to open its Basic Settings view in the Component tab, and enter URI of the first receiver between the double quotation marks in the Code area, direct:a in this example.
    Repeat this step to define the URI of the other receiver, direct:b, in the cJavaDSLProcessor component labeled To_Receiver_B.
  6. Double-click the cMessagingEndpoint component labeled Receiver_A to open its Basic Settings view in the Component tab, and enter URI of the first receiver between the double quotation marks in the URI field, direct:a in this example.
    Repeat this step to define the URI of the other receiver, direct:b, in the cMessagingEndpoint component labeled Receiver_B.
  7. Double-click the cProcessor component labeled Monitor_A to open its Basic Settings view in the Component tab, and customize the code in the Code area to display the file names of the messages routed to Receiver_A on the console:
    System.out.println("Message on Receiver_A: "+
    exchange.getIn().getHeader("CamelFileName"));
    Repeat this step to customize the code in the cProcessor component labeled Monitor_B to display the file names of the messages routed to Receiver_B on the console.
  8. Press Ctrl+S to save your Route.