现有路线:
from("direct:test").id(id+"direct:test")
.hystrix()
.id("testHystrix").hystrixConfiguration().corePoolSize(corePoolSize)
.end()
.process(requestProcessor)
.to(endPoint)
.onFallbackViaNetwork()
.toD("${headers.fallbackEndPoint}")
.endHystrix();
是否可以根据交换的主体动态选择回退逻辑 onFallback() 或 onFallbackViaNetwork()。
最佳答案
没有,但是你可以有 2 个路由,每个路由都有一个,然后根据消息正文内容路由到适当的路由。
关于apache-camel - Camel -Hystrix-EIP : Is it possible to dynamically select onFallback or onFallbackViaNetwork based on content body in exchange?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51607272/