![](/img/trans.png)
[英]What is the best practice for using multiple JPA endpoints in Camel route
[英]Pull from multiple endpoints in a Camel route
我有一條從端點抓取 json 的路由,我想知道如何擴展它以便路由從多個端點抓取? 所以想象有一個report.2.endpoint
, report.3.endpoint
等等。
from("direct:report").toD("${properties:report.api}/${properties:report.1.endpoint}")
.split(jsonpath("$.sectionList[0].items[*]"),new GroupedBodyAggregationStrategy())
.marshal().json()
.unmarshal(df)
.convertBodyTo(CannonicalReport.class)
.end()
.marshal().json()
.setHeader(Exchange.FILE_NAME, simple("${properties:report.1.output.file}"))
.toD("file://${properties:report.output.folder}");
有沒有辦法在路由本身內完成此操作,而不是讓被調用者每次傳入端點的 url 來多次調用路由?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.