code: @Override
      public void configure() throws Exception {
          LOG.debug("Started REST data stream source at port {}.", port);
  
          from("netty4-http:http://0.0.0.0:" + port + "/?matchOnUriPrefix=true&httpMethodRestrict=OPTIONS,GET,POST,PUT,DELETE").
                  choice().
                      when(header(HTTP_METHOD).isEqualTo("OPTIONS")).setBody().constant("").endChoice().
                  otherwise().
                      setHeader(CONTENT_TYPE).constant(contentType).
                      process( exc -> {
                          String requestUri = exc.getIn().getHeader(HTTP_URI, String.class);
                          LOG.debug("Processing request URI: {}", requestUri);
                          String trimmedUri = removeEnd(requestUri, "/");
                          LOG.debug("Trimmed request URI: {}", trimmedUri);
                          String busChannel = trimmedUri.substring(1).replaceAll("\\/", ".");
                          exc.setProperty("target", "amqp:" + busChannel);
                      }).toD("${property.target}").endChoice().
                  end().
                  process(exc -> {
                      exc.getIn().setHeader("Access-Control-Allow-Origin", "*");
                      exc.getIn().setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization");
                  });
      }
docs: Routes