I have this special usecase where I want to change the threadpool size and
thread pool key based upon the endpoint that is getting called. All of
these values are available in the configuration on the exchange.

For eg :

Endpoint A => Threadpool(5) => Threadpool key(A)
Endpoint B => Threadpool(10) => Threadpool key(Z)
Endpoint C => Threadpool(5) => Threadpool Key(A)

However, in my hystrix route, all of the params for Hystrix EIP are strings
and I aven't been able to figure the a way to evaluate the same.

from("direct:something")
.hystrix()
.threadPoolkey(hystrix.???? How to inject this value)
.end()
.to("direct:http-endpoint");

I also tried creating a HystrixThreadpoolDefinition and tried setting it
as .hystrix().hystrixConfiguration(configuration). But it comes back to the
same question of how to pass in this configuration. Method calls return
ValueBuilders and I could not cast them to the strings/configDefinitions.

Please suggest the correct way of doing it.

Reply via email to