如何在 wso2 esb 中调用一个序列中的两个端点?

how to call two endpoints in one sequence in wso2 esb?

我有 2 个 apis 用于 2 家保险公司:car-insurance-company-1 和 car-insurance-company-2。 这两个拿了一个json数据给我车险的价格。 我想通过部署在 wso2 esb.my 中的 api 同时调用它们,客户需要获取两家公司的价格并进行比较。 例如输入是:{"type":"Ford","model":"EcoSport"}

输出为{"company":"company1","price":"1000$"},{"company":"company2","price":"2000$"}

简单地说,我想同时调用两个端点,其中一个 sequence.i 我正在使用 wso2 esb 5。

我该怎么做? 还有别的办法吗? 谢谢你的建议。

您应该使用的是企业集成模式:Scatter-Gather

在此documentation is described that pattern with wso2 examples. Also the Split-aggregate described in WSO2 ESB 5.0.0 documentation应该会有帮助。这就是您所需要的。