Configuring the components
Procedure
-
Double-click the cFile component
labeled Sender to open its Basic
settings view in the Component
tab.
- In the Path field, fill in or browse to the path to the folder that holds the source files.
- From the Encoding list, select the encoding type of your source files. Leave the other parameters as they are.
- Repeat these steps to define the path to the output files and the output encoding type in the Basic settings view of the cFile component labeled Receiver.
-
Double-click the cPipesAndFilters
component to open its Basic settings view
in the Component tab.
- Click the plus button to add two lines to the URI list table, and fill the first line with "direct:a" and the second line with "direct:b" to define the URIs of stage A and stage B that the messages will undergo.
-
Double-click the cMessagingEndpoint component labeled Stage_A
to configure the component in its Basic settings
view and define the URI of stage A.
Repeat this step to define the URI of stage B in the Basic settings view of the cMessagingEndpoint component labeled Stage_B.
-
Double-click the cProcessor
component labeled Monitor_Receiver to open its Basic settings view, and customize the code in the
Code area to display the file names of the
messages received on Receiver, as follows:
System.out.println("Message sent to Receiver: "+ exchange.getIn().getHeader("CamelFileName"));
Repeat this step to customize the code in the other two cProcessor components to display the file names of the messages received on stage A and stage B respectively:System.out.println("Message sent to stage A: "+ exchange.getIn().getHeader("CamelFileName"));
System.out.println("Message sent to stage B: "+ exchange.getIn().getHeader("CamelFileName"));
- 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!