1
votes

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();
1
Can you try with .routeId in the restClaus Ibsen
Tried rest("/app").get("/test").route().routeId("TEST").id("REST-TEST") and this is also doesn't work in Camel 2.23.1 version. I debugged camelinternalprocessor class and it gives only random route id but gives proper route id when i use 2.22.x. I it looks like an issue in Apache came 2.23.x releaseGMP
Okay can you log a JIRA ticket about thisClaus Ibsen
Sorry, i didn't see the comment for a while. I will open a JIRA ticket. ThanksGMP
Logged a JIRA ticket. - issues.apache.org/jira/browse/CAMEL-13424GMP

1 Answers

0
votes

It looks like an issue in Apache camel 2.23.x since when i try with 2.22.3 version it works and gives proper route id in processor. Still if any one has solution with 2.23.x release do let me know.