我正在使用 spring 集成通过提供一些消息并获得响应来对服务器进行 TCP 调用。我更喜欢使用通道适配器来发送和接收批量消息。我面临的问题是响应渠道。为响应频道获取“调度程序没有频道订阅者”。一切正常,除了响应没有在响应通道上传输。我可以看到服务器上的握手以及日志中的响应被放在响应和记录器通道上。但是在抛出异常之后。配置设置是:
<gateway id="clientPositionsGateway" service-interface="MyGatewayInterface">
<method name="fetchClientPositions" request-channel="clientPositionsRequestChannel" />
</gateway>
<channel id="clientPositionsRequestChannel" />
<splitter input-channel="clientPositionsRequestChannel"
output-channel="singleClientPositionsRequestChannel" />
<channel id = "singleClientPositionsRequestChannel" />
<transformer
input-channel="singleClientPositionsRequestChannel"
output-channel="dmQueryRequestChannel"
ref="dmPosBaseQueryTransformer" />
<channel id = "dmQueryRequestChannel">
<!-- <dispatcher task-executor="executor"/> -->
</channel>
<ip:tcp-connection-factory id="csClient"
type="client"
host="somehost"
port="12345"
single-use="true"
deserializer="connectionSerializeDeserialize"
/>
<ip:tcp-outbound-channel-adapter id="dmServerOutboundAdapter"
channel="dmQueryRequestChannel"
connection-factory="csClient"
order="2"
/>
<ip:tcp-inbound-channel-adapter id="dmServerInboundAdapter"
channel="dmQueryResponseChannel"
connection-factory="csClient"
error-channel="errorChannel"/>
<channel id="dmQueryResponseChannel"/>