使用 Spring Integration 的 REST API 层编排 [英] REST API Layer Orchestration using Spring Integration

查看:65
本文介绍了使用 Spring Integration 的 REST API 层编排的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有大约 6 个单独的 REST 服务,我们将在我们的编排层中调用它们.例如致电 service-1 以检查银行帐户是否属于某种类型,如果是,则致电 service-2,否则致电 service-3".

We have around 6 individual REST services which we would be calling in our orchestration layer. for example "Calling service-1 to check if a bank account is of certain type, if yes, then call service-2, else call service-3".

Spring Integration 消息传递框架是编排对这些服务的调用的正确工具还是矫枉过正?请建议是否有更好的方法来完成相同的操作.

Is Spring Integration messaging framework is a right tool for orchestrating calls to those services or its an overkill? Please suggest if there is a better way to accomplish the same.

推荐答案

我无法向您推荐更好的工具,因为过去 Spring Integration 对我来说是最好的,现在它是我的全职工作.所以,试着在别处寻找其他答案.

I can't suggest you better tool, because Spring Integration was the best one for me in the past and now it is my full time job. So, try to find other answers somewhere else.

现在关于编排与Spring集成的要点.老实说,它只是一个词,它试图描述一个应用程序根据某些条件调用其他外部应用程序时的业务逻辑.

Now about the point of orchestration with the Spring Integration. To be honest it's just a word which tries to describe the business logic in one application when it calls other external application according some conditions.

因此,从高处来看,Spring Integration、Transformers、Splitters、Routers 和 Gateways 之间有 HTTP 适配器,我们可以自信地说,Spring Integration 上的消息传递层符合您的要求,确实可以帮助您区分业务逻辑和编排逻辑.

So, from big height having HTTP adapters in the Spring Integration, Transformers, Splitters, Routers and Gateways between them, we can say with confidence that messaging layer on Spring Integration fits your requirements and really can help you to distinguish business logic from the orchestration logic.

不知道该说什么,但我可以推荐看看 Spring Integration 参考手册 并注意Routing SlipScatter-Gather 模式.

Not sure what to say else, but I can recommend take a look to the Spring Integration Reference Manual and pay attention to the Routing Slip and Scatter-Gather patterns.

这篇关于使用 Spring Integration 的 REST API 层编排的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆