Apache camel 骆驼型CXFRS响应

Apache camel 骆驼型CXFRS响应,apache-camel,Apache Camel,骆驼保险丝2.8 我有一个camel-jaxrs服务器,它接受请求,然后启动2条camel路由 第一条路由使用来自cxfrs端点/bean的请求,并将它们发送到jms队列收件箱 第二条路由使用来自jms队列收件箱的请求进行业务逻辑处理,然后将结果发送到jms队列发件箱 我的问题与http响应和向jaxrs服务器消费者发送结果有关 是否可以从第一个路由向http客户端发送http响应,并从第二个路由返回结果?(同步) from(“cxfrs:bean:personLookupEndpoint”)您

骆驼保险丝2.8

我有一个camel-jaxrs服务器,它接受请求,然后启动2条camel路由

第一条路由使用来自cxfrs端点/bean的请求,并将它们发送到jms队列收件箱

第二条路由使用来自jms队列收件箱的请求进行业务逻辑处理,然后将结果发送到jms队列发件箱

我的问题与http响应和向jaxrs服务器消费者发送结果有关

是否可以从第一个路由向http客户端发送http响应,并从第二个路由返回结果?(同步)


from(“cxfrs:bean:personLookupEndpoint”)您真的需要使用队列吗?我认为最好改用直达路线


有可能对JMS端点使用InOut exchange模式,但它有一些限制:

您真的需要使用队列吗?我认为最好改用直达路线

可以对JMS端点使用InOut交换模式,但它有一些限制:

        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 ...