Spring integration 忽略TcpOutboundGateway应答通道中的无效消息,并等待同一输出通道消息的另一个应答

Spring integration 忽略TcpOutboundGateway应答通道中的无效消息,并等待同一输出通道消息的另一个应答,spring-integration,Spring Integration,我有一个特定的要求,就是在TcpOutboundGateway的回复通道中消化一些不需要的消息类型,并继续等待,直到它带有有效的消息 我在TcpOutboundGateway的输出通道中发送消息,并在应答通道中获得确认。但是,我可能会收到一条对已发送消息无效的确认消息。所以我应该忽略在回复通道中得到的无效消息,仍然等待有效消息的到来 如何处理 AbstractConnectionFactory可随以下部件提供: public void setInterceptorFactoryChain(Tcp

我有一个特定的要求,就是在
TcpOutboundGateway
的回复通道中消化一些不需要的消息类型,并继续等待,直到它带有有效的消息

我在
TcpOutboundGateway
的输出通道中发送消息,并在应答通道中获得确认。但是,我可能会收到一条对已发送消息无效的确认消息。所以我应该忽略在回复通道中得到的无效消息,仍然等待有效消息的到来


如何处理

AbstractConnectionFactory可随以下部件提供:

public void setInterceptorFactoryChain(TcpConnectionInterceptorFactoryChain interceptorFactoryChain) {
TcpConnectionInterceptorFactoryChain
应与定制的
TcpConnectionInterceptorFactory
一起提供,以生成一些定制的
TcpConnectionInterceptorSupport
以在被覆盖的
公共布尔onMessage(message message)中拦截该消息{
并且不要让它进入
super.onMessage()


请参阅。

中的更多信息。
AbstractConnectionFactory
可随以下设备提供:

public void setInterceptorFactoryChain(TcpConnectionInterceptorFactoryChain interceptorFactoryChain) {
TcpConnectionInterceptorFactoryChain
应与定制的
TcpConnectionInterceptorFactory
一起提供,以生成一些定制的
TcpConnectionInterceptorSupport
以在被覆盖的
公共布尔onMessage(message message)中拦截该消息{
并且不要让它进入
super.onMessage()

请参阅中的更多信息