2015-10-16 52 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

回答