简体   繁体   English

现有 spring 应用程序扩展通过添加骆驼功能

[英]Existing spring application extension by adding camel features

I have my web application written in Spring MVC.我的 web 应用程序是用 Spring MVC 编写的。 It is quite simple app for registering some activities and generating reports after some time.这是一个非常简单的应用程序,用于注册一些活动并在一段时间后生成报告。 Now I have it done fully in Spring.现在我已经在 Spring 中完全完成了。 The only entry point is HTTP webapp request.唯一的入口点是 HTTP webapp 请求。 I'd like to add other entry points to allow user to trigger application via JMS queue, FTP files and SOAP-based web service.我想添加其他入口点以允许用户通过 JMS 队列、FTP 文件和基于 SOAP 的 web 服务触发应用程序。 I know I can do this all using Spring own features somehow, but I wonder if it is desirable to involve Apache Camel into all that stuff?我知道我可以以某种方式使用 Spring 自己的功能来完成这一切,但我想知道是否需要让 Apache Camel 参与所有这些事情? I think about leaving web application as it is (communicating directly with services), only add some Camel magic to spring context and expose several endpoints from Camel and then after messages processing and transformations call existing services.我考虑让 web 应用程序保持原样(直接与服务通信),只在 spring 上下文中添加一些 Camel 魔法,并从 Camel 公开几个端点,然后在消息处理和转换之后调用现有服务。

I think about using Camel to be able to use some asynchronous processing and threads/scalability features.我考虑使用 Camel 能够使用一些异步处理和线程/可扩展性功能。 Is it the right way to go?它是 go 的正确方法吗?

I will recommend you to use Apache Camel.我会推荐你使用 Apache Camel。 I have used it for a similar purpose.我已经将它用于类似的目的。 The solution is an appropriate one from a 'Separation of Concerns' point.从“关注点分离”的角度来看,该解决方案是一个合适的解决方案。 Camel implement Enterprise Integration Patters and is a better solution for integrating various protocols and interfaces. Camel 实现了企业集成模式,是集成各种协议和接口的更好解决方案。 Your application should deal with functionality only and as designed should just expose a servlet to get requests and process it.您的应用程序应该只处理功能,并且按照设计应该只公开一个 servlet 来获取请求并处理它。

Handling of interfaces and protocols are well structured in Camel and its easy to maintain and configure in the long run. Camel 对接口和协议的处理结构良好,从长远来看易于维护和配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM