【问题标题】:Apache camel-consuming spring WebFlux functional web rest api from Apache camelApache camel 消耗 Spring WebFlux 功能 web rest api 来自 Apache camel
【发布时间】:2019-11-21 09:14:43
【问题描述】:

我已经使用 spring WebFlux 定义了一个功能性 web rest api (GET),它在我的 WebClientTest 中运行良好

我有 apache camel 路由,它有一个工作路由来读取文件内容并将该数据发送到上面的 rest api,比如

        .routeId("fromFileToRest”)
        .log("consume customer route started")
        .setHeader(Exchange.HTTP_METHOD, simple("GET"))
        .fromRest()
        .to(“http://localhost:8080/customer”).log(“sent consumer data to get api”); ```


But in this camel route, I want to replace hardcoded url in to() with the WebFlux functional api router/handler call, so that when there is a change in uri, this route is not impacted. Could you please suggest how to

【问题讨论】:

    标签: java spring-boot apache-camel spring-webflux


    【解决方案1】:

    是否可以在路由中添加骆驼处理器,该处理器使用 HttpClient 通过 prop 文件中的可配置 url 调用下游?

    【讨论】:

    • 感谢 Jacob,但这是调用 api 端点的下一步。我希望将 to(“localhost:8080/customer”) 替换为关联的 Webflux 路由器/处理程序。有没有办法请告诉我,非常感谢
    猜你喜欢
    • 2020-10-24
    • 1970-01-01
    • 2015-11-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多