title: Apache Camel route doesn't call Processor
body: <p>I  am trying to code my first Project with Apache Camel and Spring Boot. It should call a Rest-Endpoint and process the Data but my processor is never called. What am I doing wrong here?</p>
  
  <p>The logs show that the route is started and that it consumes from "direct://httpRoute". But in the End there are no logs which indicates that MyProcessor is called.</p>
  
  <p><strong>TssImportApplication.java</strong></p>
  
  <pre><code>package de.importer.TssImport;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication
  public class TssImportApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(TssImportApplication.class, args);
      }
  
  }
  </code></pre>
  
  <p><strong>MyRoute.java</strong></p>
  
  <pre><code>package de.importer.TssImport.routes;
  
  import lombok.extern.slf4j.Slf4j;
  import org.apache.camel.Exchange;
  import org.apache.camel.Processor;
  import org.apache.camel.builder.RouteBuilder;
  import org.springframework.stereotype.Component;
  
  @Component
  @Slf4j
  public class MyRoute extends RouteBuilder {
      @Override
      public void configure() throws Exception {
          log.error("TEST");
          from("direct:httpRoute").to("https://jsonplaceholder.typicode.com/todos/1").process(new MyProcessor());
      }
  
      class MyProcessor implements Processor {
  
          public void process(Exchange exchange) throws Exception {
              log.error("TEST 2");
              System.out.println(exchange.getIn().getBody(String.class));
          }
      }
  }
  </code></pre>
  
  <p><strong>pom.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.3.1.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
      &lt;groupId&gt;de.importer&lt;/groupId&gt;
      &lt;artifactId&gt;TssImport&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;TssImport&lt;/name&gt;
      &lt;description&gt;Project to import data&lt;/description&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.camel.springboot&lt;/groupId&gt;
                  &lt;artifactId&gt;camel-spring-boot-dependencies&lt;/artifactId&gt;
                  &lt;version&gt;3.3.0&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel.springboot&lt;/groupId&gt;
              &lt;artifactId&gt;camel-spring-boot-starter&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel.springboot&lt;/groupId&gt;
              &lt;artifactId&gt;camel-log-starter&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.camel.springboot&lt;/groupId&gt;
              &lt;artifactId&gt;camel-http-starter&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
              &lt;artifactId&gt;lombok&lt;/artifactId&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>LOG</strong></p>
  
  <pre><code>  .   ____          _            __ _ _
   /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
  ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
   \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
    '  |____| .__|_| |_|_| |_\__, | / / / /
   =========|_|==============|___/=/_/_/_/
   :: Spring Boot ::        (v2.3.1.RELEASE)
  
  2020-06-15 17:47:54.590  INFO 30161 --- [           main] de.importer.TssImport.TssImportApplication   : Starting TssImportApplication on importer-VirtualBox with PID 30161 (/home/importer/Documents/TssImport/tssimport/target/classes started by importer in /home/importer/Documents/TssImport/tssimport)
  2020-06-15 17:47:54.593  INFO 30161 --- [           main] de.importer.TssImport.TssImportApplication   : No active profile set, falling back to default profiles: default
  2020-06-15 17:47:55.732  INFO 30161 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.camel.spring.boot.CamelAutoConfiguration' of type [org.apache.camel.spring.boot.CamelAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  2020-06-15 17:47:55.912  INFO 30161 --- [           main] o.apache.camel.support.LRUCacheFactory   : Detected and using LRUCacheFactory: camel-caffeine-lrucache
  2020-06-15 17:47:56.437 ERROR 30161 --- [           main] de.importer.TssImport.routes.MyRoute         : TEST
  2020-06-15 17:47:56.494  INFO 30161 --- [           main] o.a.c.s.boot.SpringBootRoutesCollector   : Loading additional Camel XML routes from: classpath:camel/*.xml
  2020-06-15 17:47:56.495  INFO 30161 --- [           main] o.a.c.s.boot.SpringBootRoutesCollector   : Loading additional Camel XML rests from: classpath:camel-rest/*.xml
  2020-06-15 17:47:56.886  INFO 30161 --- [           main] o.a.camel.component.http.HttpComponent   : Created ClientConnectionManager org.apache.http.impl.conn.PoolingHttpClientConnectionManager@77bb0ab5
  2020-06-15 17:47:56.918  INFO 30161 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.3.0 (CamelContext: camel-1) is starting
  2020-06-15 17:47:56.919  INFO 30161 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : 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
  2020-06-15 17:47:57.037  INFO 30161 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Route: route1 started and consuming from: direct://httpRoute
  2020-06-15 17:47:57.046  INFO 30161 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Total 1 routes, of which 1 are started
  2020-06-15 17:47:57.047  INFO 30161 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.3.0 (CamelContext: camel-1) started in 0.128 seconds
  2020-06-15 17:47:57.052  INFO 30161 --- [           main] de.importer.TssImport.TssImportApplication   : Started TssImportApplication in 2.989 seconds (JVM running for 3.806)
  2020-06-15 17:47:57.060  WARN 30161 --- [extShutdownHook] o.a.c.s.boot.SpringBootCamelContext      : CamelContext has only been running for less than a second. If you intend to run Camel for a longer time then you can set the property camel.springboot.main-run-controller=true in application.properties or add spring-boot-starter-web JAR to the classpath.
  2020-06-15 17:47:57.061  INFO 30161 --- [extShutdownHook] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.3.0 (CamelContext: camel-1) is shutting down
  2020-06-15 17:47:57.066  INFO 30161 --- [extShutdownHook] o.a.c.i.engine.DefaultShutdownStrategy   : Starting to graceful shutdown 1 routes (timeout 45 seconds)
  2020-06-15 17:47:57.073  INFO 30161 --- [ - ShutdownTask] o.a.c.i.engine.DefaultShutdownStrategy   : Route: route1 shutdown complete, was consuming from: direct://httpRoute
  2020-06-15 17:47:57.074  INFO 30161 --- [extShutdownHook] o.a.c.i.engine.DefaultShutdownStrategy   : Graceful shutdown of 1 routes completed in 0 seconds
  2020-06-15 17:47:57.081  INFO 30161 --- [extShutdownHook] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.3.0 (CamelContext: camel-1) uptime 0.163 seconds
  2020-06-15 17:47:57.081  INFO 30161 --- [extShutdownHook] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.3.0 (CamelContext: camel-1) is shutdown in 0.020 seconds
  
  Process finished with exit code 0
  </code></pre>