骆驼保险丝 2.8
我有一个骆驼 jaxrs 服务器,它接受请求然后启动 2 条骆驼路线。
第一个路由,使用来自 cxfrs 端点/bean 的请求并将它们发送到 jms queue inbox。
第二条路线,使用来自 jms queue inbox的请求进行业务逻辑处理,然后将结果发送到 jms queue outbox。
我的问题与 http 响应和将结果发送给 jaxrs 服务器消费者有关。
是否可以从第一条路由将 http 响应发送回 http 客户端,并从第二条路由返回结果?(同步)
from("cxfrs:bean:personLookupEndpoint") <-- http client waits for response...
.setExchangePattern(ExchangePattern.InOut)
.process(new RequestProcessor())
.to(inbox);
from(inbox)
.unmarshal(jaxb)
.process(new QueryServiceProcessor())
.to("bean:lookupService?method=processQuery(${body})")
.convertBodyTo(String.class)
.to(outbox); <-- need to send results to font-end consumer synchronously ...