GMP
GMP

Reputation: 11

How to get RouteId in processor exchange object in apache camel version 2.23.1?

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();

Upvotes: 1

Views: 5449

Answers (1)

GMP
GMP

Reputation: 11

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.

Upvotes: 0

Related Questions