Skip to main content Skip to complementary content

Configuring the components and connections

Procedure

  1. Double-click the input cFile component to display its Basic settings view in the Component tab and set its properties.
    In this use case, simply specify the input file path and leave the other parameters as they are.
  2. Double-click the cDynamicRouter component to display its Basic settings view in the Component tab.
  3. In the Bean class field, type in the name of the predefined Java bean. Leave the Specify the method check box unselected as there is only one method in the Java bean and leave the Ignore Invalid Endpoints check box unselected if you want the component to throw an exception when endpoint URIs are not valid.
  4. Double-click the first cMessagingEndpoint component, which is labelled Washington, to display its Basic settings view in the Component tab, and type in the URI in the URI field for the destination of your message.
    Here, we want to use this component to retrieve the message routed to the URI direct:Washington, as shown below.
  5. Repeat this step to set the endpoint URIs for the other two cMessagingEndpoint components: direct:London and direct:Beijing respectively.
  6. Double-click the first cProcessor component, which is labelled Monitor_Washington, to display its Basic settings view in the Component tab.
  7. In the Code box, customize the code to display the file name of the message routed to the endpoint Washington on the console.
    System.out.println("Message on endpoint Washington: "+
    exchange.getIn().getHeader("CamelFileName"));
  8. Repeat these steps to configure the other two cProcessor components to display the file names of the messages routed to the endpoints London and Beijing respectively.
  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 – let us know how we can improve!