我想知道对我的项目使用spring集成工具是否是正确的方法。我一直在阅读并玩弄这个有用的示例https://github.com/spring-projects/spring-integration-samples/blob/master/basic/tcp-client-server/src/test/java/org/springframework/integration/samples/tcpclientserver/TcpClientServerAnnotationDemoTest.java
我的项目可以侦听和回复多个客户端,并且正在侦听特定端口。 为此,我发现实现TcpInboundGateway和自定义(de)Serializer效果很好。
但是,该工具还必须能够向初始化时不知道端点的多个客户端发送和接收答案。但是,TcpNetClientConnectionFactory会在创建时定义唯一的主机和IP。 有没有一种方法可以定义多个TcpOutboundGateway来适应不同的连接目标(同时)?
还是我要使用它的目的不是它的设计目的?
谢谢。