【发布时间】:2019-06-21 16:35:52
【问题描述】:
我有一个使用 spring 集成框架进行消息处理的应用程序(网关 -> 转换 -> 服务激活器)。我面临的问题之一是处理消息有相当长的延迟,从几毫秒到几秒不等。滞后并不一致,似乎消息被搁置并一次处理。
我尝试使用 YourKit 分析应用程序,但找不到任何死锁或阻塞的线程。打开 org.springframework.integration 的调试日志也没有提供太多信息。这是spring集成xml:
<int:gateway service-interface="com.test.MessageGateway"
id="msggateway" default-request-channel="msginputchannel" />
<int:channel id="msginputchannel">
<int:queue capacity="5000" />
</int:channel>
<int:bridge id="msginputbridge" input-channel="msginputchannel" output-channel="msgchannel">
<int:poller fixed-delay="100"/>
</int:bridge>
<int:channel id="msgchannel">
<int:queue capacity="5000" />
</int:channel>
<int:transformer input-channel="msgchannel"
output-channel="msgPubSubchannel" id="msgtransformer" ref="msgserializer" method="serialzeTo" >
<int:poller fixed-delay="100" />
</int:transformer>
<int:publish-subscribe-channel id="msgPubSubchannel" />
<int:bridge id="msgQueueSystembridge" input-channel="msgPubSubchannel" output-channel="msgQueueSystemqueuechannel"/>
<int:channel id="msgQueueSystemqueuechannel">
<int:queue capacity="5000"/>
</int:channel>
<int:service-activator id="msgQueueSystempublisher" ref="msgQueueSystemadapter" input-channel="msgQueueSystemqueuechannel" method="publish" >
<int:poller fixed-delay="100"/>
</int:service-activator>
<int:bridge id="msgbridge" input-channel="msgPubSubchannel" output-channel="msgFileSystemchannel"/>
<int:channel id="msgFileSystemchannel">
<int:queue capacity="5000"/>
</int:channel>
<int:service-activator id="msgfilewriter" ref="msgadapter" input-channel="msgFileSystemchannel" method="publish" >
<int:poller fixed-delay="100"/>
</int:service-activator>
关于如何进行调试的任何指针?
【问题讨论】: