Skip to main content Skip to complementary content

Configuring the components and connections

About this task

In this scenario, the cIntercept component intercepts all the messages on all the sub-routes as soon as the messages are sent and does not have properties to set. The cStop component stops the sub-route on which it is dropped before it completes and does not have properties to set. Therefore, you only need to configure the messaging endpoints and monitor components.

Procedure

  1. Double-click the cFile component labeled Sender_1 to display its Basic settings view in the Component tab.
  2. In the Path field, specify the file path to the first source your are going to send messages from, and leave the other parameters as they are.
  3. Double-click the cFile component labeled Receiver_1 to display its Basic settings view in the Component tab.
  4. In the Path field, specify the file path to the first destination you are going to send messages to, and leave the other parameters as they are.
  5. In the same way, set the cFile components labeled Sender_2 and Receiver_2 across the second sub-route.
  6. Double-click the cProcessor component, which is labeled Monitor, to display its Basic settings view in the Component tab, and customize the code in the Code area to display the file names of the messages intercepted on the console:
    System.out.println("Message intercepted: "+
    exchange.getIn().getHeader("CamelFileName"));
  7. Double-click the cFile component labeled Receiver_3 to display its Basic settings view in the Component tab.
  8. In the Path field, specify the file path to the destination for the intercepted messages, and leave the other parameters as they are.
  9. 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!