Reputation: 4902
I would like to get the value of http4 from the header but it throwing me
Failed to create route route15 at: >>> To[${header.ExternalEndPoint}]
Here is my code
.toF("http4://%s", simple("${header.ExternalEndPoint}"))
or
.toF("http4://%s", constant("${header.ExternalEndPoint}"))
It is only working when I hardcoded the value like
.toF("http4://localhost/foo");
Upvotes: 1
Views: 1475
Reputation: 3362
Dynamic URIs in "to" are not supported prior to Camel 2.16. If you're using a version lower than 2.16 then you should use recipientList
.recipientList(simple("http4://${header.ExternalEndPoint}"))
From 2.16 onwards, toD
is your friend:
.toD("http4://${header.ExternalEndPoint}")
Upvotes: 2