title: How can i receive the response from Apache camel route to the Spring boot controller
body: <p>From the route I'm sending data to endpoint <strong>direct: receive</strong> and I'm receiving same in the controller, by using consumertemplate but getting below error</p>
  <blockquote>
  <p>[Camel (camel-1) thread #1 -
  JmsConsumer[MQT.EI.PRD2X4_PRODUCER_UT.REPLY.Q1]] ERROR
  o.a.c.processor.DefaultErrorHandler.log - Failed delivery for
  (MessageId: ID:c3e2d840d4d8e3f14040404040404040d85c2573b4cf7342 on
  ExchangeId: ID-APINP-ELPT60235-1597255599355-0-5). Exhausted after
  delivery attempt: 1 caught:
  org.apache.camel.component.direct.DirectConsumerNotAvailableException:
  No consumers available on endpoint: direct://recive.
  Exchange[ID-APINP-ELPT60235-1597255599355-0-5]</p>
  </blockquote>
  <p><em>Can anyone please give the suggestion on how can i get the response data from the route to the controller?</em></p>
  <p><strong>Controller code:</strong></p>
  <pre><code>@Autowired
      private CamelContext camelContext;
      @Autowired
      private ProducerTemplate producer;
      @Autowired
          ConsumerTemplate consumer;
  
      @PostMapping(&quot;/request-reply&quot;)
      public String requestReplyMapping(@RequestBody String inputReq) {
  
          Exchange exchangeRequest = ExchangeBuilder.anExchange(camelContext).withBody(inputReq).build();
          Exchange exchangeResponse = producer.send(&quot;direct:request-reply&quot;, exchangeRequest);
  
          Exchange receive = consumer.receive(&quot;direct:receive&quot;); //receiving data from this endpoint
          return null;
  
      }
  </code></pre>
  <p><strong>Route Code:</strong></p>
  <pre><code>@Component
  public class RequestReplyRouter extends RouteBuilder {
  
      @Override
      public void configure() throws Exception {
  
          from(&quot;direct:request-reply&quot;).
          to(&quot;jms:RequestQueue?ReplyTo=ResponseQueue&amp;exchangePattern=InOut&quot;)
          .log(&quot;Request-reply Body is  ${body}   and header info is   ${headers}  &quot;);
  
          from(&quot;jms:ResponseQueue&quot;)
          .log(&quot;Received Body is  ${body}   and header info is   ${headers}  &quot;)
          .to(&quot;direct:receive&quot;); // sending data to the endpoint
      }
  
  }
  </code></pre>