Double-click the cFile component to open
its Basic Settings view in the Component tab.
In the Path field, specify the file path
to message source.
From the Encoding list, select the
encoding type of your message files. Leave the other parameters as they
are.
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.
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.
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.
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.
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!