简体   繁体   English

JCA或Spring Integration / Camel困境

[英]JCA or Spring Integration/Camel dilemma

Our application needs to accept client requests on a socket (TCP). 我们的应用程序需要在套接字(TCP)上接受客户端请求。 I have two options 我有两个选择

Use spring integration TCP support 使用Spring Integration TCP支持

Pros: 1. We already use spring heavily so there will be less learning curve here. 优点:1.我们已经大量使用spring了,因此这里的学习曲线会更少。 2. Simplified end-to-end testing without a container 2.无需容器的简化的端到端测试

Concerns: My concerns are wrt handling of concurrent requests and scaling. 问题:我关心的是并发请求的处理和扩展。 Can it use managed thread pools? 它可以使用托管线程池吗? Are there any other things I need to worry about? 我还有其他需要担心的事情吗?

Use JCA TCP Inbound adapter 使用JCA TCP入站适配器

Pros: 1. Plays well with a Java EE container as it is the suggested way of implementing this. 优点:1.与Java EE容器一起很好地玩,因为它是实现此目的的建议方法。

Concerns: 1. Hard to find well tested TCP adapter (open source) 2. Requires container 问题:1.很难找到经过良好测试的TCP适配器(开源)2.需要容器

Would appreciate your thoughts on this. 感谢您对此的想法。 Also, any gothcas I should be knowing about? 还有,我应该知道的哥斯卡?

Spring provides WorkManagerTaskExecutor and TimerManagerTaskScheduler to use managed thread pools. Spring提供了WorkManagerTaskExecutorTimerManagerTaskScheduler来使用托管线程池。 Any place in Spring Integration that needs a scheduler (eg pollers) or task executor can use these abstractions. Spring Integration中需要调度程序(例如轮询器)或任务执行程序的任何地方都可以使用这些抽象。 See the Spring Integration and Spring reference docs for more information. 有关更多信息,请参见Spring Integration和Spring参考文档。

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

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