Camel-Hystrix-EIP : 是否可以根据内容主体动态 select onFallback 或 onFallbackViaNetwork 作为交换?
Camel-Hystrix-EIP : Is it possible to dynamically select onFallback or onFallbackViaNetwork based on content body in exchange?
现有路线:
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条路由,每条路由都有一个,然后根据消息正文内容路由到合适的路由。
现有路线:
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条路由,每条路由都有一个,然后根据消息正文内容路由到合适的路由。