0
我有以下要求Spring集成:TCP禁用respnse阅读
- 与插座(TCP)
- 发送初始化消息[不会有任何来自服务器的响应]
- 检查该连接是活的,如果是,则发送轮询消息。
- 如果有响应过程它。
我想用户Spring的集成TCP连接,但是当我尝试执行第二步框架等待响应。有没有办法配置它不等待第2步中的响应?
以下是Spring配置:
<int:gateway default-request-channel="msOutbound"
service-interface="com.home.tcp.UserService" id="gw" />
<int-ip:tcp-outbound-gateway id="tcpObGw"
connection-factory="client" request-channel="msOutbound"
/>
<int-ip:tcp-connection-factory id="client"
type="client" deserializer="serDeSer" serializer="serDeSer"
host="remoteServer" port="valid port" single-use="true" />
<bean id="serDeSer"
class="org.springframework.integration.ip.tcp.serializer.ByteArrayStxEtxSerializer" />
Java代码:
service.send("init msg"); // The program exits with no response exception.
service.send("polling message"); //Never executed.