I am migrating my application from spring boot 1.x to spring boot 2.x. In the process, I upgraded Apache camel from version 2.20.0 to 2.23.1. In previous version I am able to read route name from exchange.getFromRouteId() in processor but in upgraded version, it gives autogenerated routeid like route117 when i use same method.
Used Java DSL with REST component by setting id(). Also tried adding inbetween from() component with both id() and routeId() set, still the same.
RouteBuilder:
rest("/app").get("/test").id("REST-TEST").to("direct:test").endRest();
from("direct:test").routeId("TEST").id("TEST").process("TestProcessor");
TestProcessor.java
String routeId = exchange.getFromRouteId();
.routeId
in the rest – Claus Ibsen