Spring integration 即使超时超过,Spring集成消息通道也会挂起

Spring integration 即使超时超过,Spring集成消息通道也会挂起,spring-integration,Spring Integration,我的集成环境如下: <int:channel id="fileInboundChannelAdapter"/> <int-file:inbound-channel-adapter directory="${directory}" channel="fileInboundChannelAdapter" auto-startup="false" > <int:poller fixed-rate="5000" max-messages-per-poll="1" /

我的集成环境如下:

<int:channel id="fileInboundChannelAdapter"/>
<int-file:inbound-channel-adapter directory="${directory}" channel="fileInboundChannelAdapter" auto-startup="false" >
    <int:poller fixed-rate="5000" max-messages-per-poll="1" />
</int-file:inbound-channel-adapter>
里面有一些方法

Message<File> fileMessage = MessageBuilder.withPayload(fileObject).build();
boolean success = messageChannel.send(fileMessage, 1000 * 60);
messagefilemessage=MessageBuilder.withPayload(fileObject.build();
boolean success=messageChannel.send(fileMessage,1000*60);

在这一行,messageChannel.send即使在超时超过并且没有其他请求被服务后也不会响应,需要重新启动服务器。

您必须为该
文件InboundChannelAdapter
共享一个
订户。有了这些,我们将努力了解发生了什么。并查看日志,从您的角度找出问题所在

timeout
param(
1000*60
在您的情况下)对于
DirectChannel
没有值:

protected boolean doSend(Message<?> message, long timeout) {
    try {
        return this.getRequiredDispatcher().dispatch(message);
    }
    catch (MessageDispatchingException e) {
        String description = e.getMessage() + " for channel '" + this.getFullChannelName() + "'.";
        throw new MessageDeliveryException(message, description, e);
    }
}
protected boolean doSend(消息,长超时){
试一试{
返回此.getRequiredDispatcher().dispatch(消息);
}
捕获(MessageDispatchingException e){
字符串描述=e.getMessage()+“对于通道'”+此.getFullChannelName()+“”;
抛出新的MessageDeliveryException(message,description,e);
}
}
因此,看起来您的
订户
只是以某种方式阻止了调用线程。。。
需要查看其代码

protected boolean doSend(Message<?> message, long timeout) {
    try {
        return this.getRequiredDispatcher().dispatch(message);
    }
    catch (MessageDispatchingException e) {
        String description = e.getMessage() + " for channel '" + this.getFullChannelName() + "'.";
        throw new MessageDeliveryException(message, description, e);
    }
}