我想在我的项目中使用春季集成,请根据我的要求帮助我应采用的模式

发布于 2025-02-10 04:53:33 字数 1457 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

木森分化 2025-02-17 04:53:34

因此,要对相同的有效载荷进行3个并行呼叫,然后汇总结果,您需要研究一个散点图: https://docs.spring.io/spring-integration/docs/docs/current/current/current/referent/referent/reference/html/html/message-routing.html #散点机

根据您的描述,您必须使用基于PublishSubscribechannel(拍卖)的配置,并提供taskexecutor提供的配置。此通道的订阅者可以是普通的HTTP消息处理程序,服务激活程序,甚至是变压器,以在目标服务调用之前操纵有效负载。

So, to make a 3 parallel calls for the same payload and then aggregate their result, you need to look into a Scatter-Gather pattern: https://docs.spring.io/spring-integration/docs/current/reference/html/message-routing.html#scatter-gather.

According to your description, you have to use a configuration based on the PublishSubscribeChannel (Auction) with a TaskExecutor provided. The subscribers to this channel could be plain HTTP message handler, service activator or even transformers to manipulate a payload before target service call.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文