Skip to main content Skip to complementary content

Configuring the components and connections

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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!