title: Starting with Camel File Component
body: <p>I have barely started on Camel and I am trying out the file component. I want to process each file in a directory recursively. I tried to chain from("file:") to a processor and I don't understand why it's not working. In the trace, I can see that the camel context started the route. </p>
  
  <pre><code>public static void main(String[] args) throws Exception {
      System.out.println("Starting camel");
      final CamelContext camelContext = new DefaultCamelContext();
      camelContext.addRoutes(new RouteBuilder() {
          @Override
          public void configure() throws Exception {
              from(
                      "file://Users/abc123/Documents?recursive=true&amp;noop=true&amp;idempotent=true")
                      .process(new Processor() {
  
                          public void process(Exchange exchange)
                                  throws Exception {
                              System.out.println("exchange=" + exchange);
                          }
                      });
  
          }
      });
      camelContext.setTracing(true);
      camelContext.start();
  
      Runtime.getRuntime().addShutdownHook(new Thread() {
          public void run() {
              try {
                  camelContext.stop();
              } catch (Exception e) {
                  throw new RuntimeException(e);
              }
          }
      });
  
      Thread.currentThread().join();
  }
  </code></pre>
  
  <p>Here's the log trace:</p>
  
  <pre><code>Starting camel
  2015-06-03 00:00:59 INFO  DefaultCamelContext - Apache Camel 2.15.2      (CamelContext: camel-1) is starting
  2015-06-03 00:00:59 INFO  DefaultCamelContext - Tracing is enabled on CamelContext: camel-1
  2015-06-03 00:00:59 INFO  ManagedManagementStrategy - JMX is enabled
  2015-06-03 00:00:59 INFO  DefaultTypeConverter - Loaded 182 type converters
  2015-06-03 00:00:59 INFO  DefaultCamelContext - AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance.
  2015-06-03 00:00:59 INFO  DefaultCamelContext - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
  2015-06-03 00:00:59 INFO  FileEndpoint - Using default memory based idempotent repository with cache max size: 1000
  2015-06-03 00:00:59 INFO  DefaultCamelContext - Route: route1 started and consuming from: Endpoint[file://Users/abc123/Documents?idempotent=true&amp;noop=true&amp;recursive=true]
  2015-06-03 00:00:59 INFO  DefaultCamelContext - Total 1 routes, of which 1 is started.
  2015-06-03 00:00:59 INFO  DefaultCamelContext - Apache Camel 2.15.2 (CamelContext: camel-1) started in 0.422 seconds
  </code></pre>