【问题标题】:Apache Camel Pass Parameter to multicust uri's with restletApache Camel 使用 restlet 将参数传递给多客户 uri
【发布时间】:2015-11-18 08:13:55
【问题描述】:

GroupedExchangeAggregationStrategy() 的示例对我来说效果很好。但现在的挑战是将参数值传递给 uri。下面是代码。

from("restlet:http://localhost:8089/createCustomer/{foo}")      
.enrich("direct:serviceFacade")
.process(new Processor() {...})
.end();

from("direct:serviceFacade")
.multicast(new GroupedExchangeAggregationStrategy()).parallelProcessing()   
    .enrich("restlet:http://localhost:8080/CamelRest/rest/restService/addressInfo/${header.foo}").enrich("restlet:http://localhost:8080/CamelRest/rest/restService/accountInfo/${header.foo}")
.end();

我收到一条错误消息:

带有键的标头:在 Exchange 中找不到 header.foo。交流[留言: [正文为空]]

【问题讨论】:

    标签: apache-camel dsl restlet


    【解决方案1】:

    我终于做对了。

    from("direct:serviceFacade")
        .multicast(new GroupedExchangeAggregationStrategy()).parallelProcessing()       
         // .bean(RecipientListBean.class, "route")       
        .enrich("restlet:http://localhost:8080/CamelRest/rest/restService/addressInfo/{foo}")
        .enrich("restlet:http://localhost:8080/CamelRest/rest/restService/accountInfo/{foo}")
          .end();
    

    那会很神奇..

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-02
      • 2019-03-28
      • 2019-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-14
      • 1970-01-01
      相关资源
      最近更新 更多