2015-10-16 103 views
0

即时通讯在使用Spring集成的系统中工作,我需要根据从MQ队列中收到的消息激活不同的服务,为此我将根据其内容路由此消息即时通讯使用弹簧集成收件人列表路由器选择器表达式JAVA-弹簧集成路由器的性能瓶颈

测试这个配置的性能,即时通讯在这个路由器上遇到瓶颈。

<int:recipient-list-router id="Router" input-channel="inputChannel" default-output-channel="tslOutputChannel"> 
    <int:recipient channel="xmlOutputChannel" 
     selector-expression="payload.startsWith('&lt;?xml')" /> 
</int:recipient-list-router> 

路由的消息后,我使用的是Spring Integration的过滤器和变压器,然后将消息发送到服务激活。

我该如何改善路由器的性能?最好是用JAVA类做这个路由,过滤和服务调用?

谢谢。

enter image description here

+0

因为选择器应该很快,所以知道路由器的哪一部分很慢会很有趣。或者,您可以构建自己的路由器......只需扩展“RecipientListRouter”即可。 – Augusto

回答