简体   繁体   English

JAVA-Spring Integration Router的性能瓶颈

[英]JAVA - Performance Bottleneck with Spring Integration Router

im woring in a system with Spring integration and i need to activate differents services depending on the messages recived from an MQ Queue, i'm routing this messages based on its content, for that purpose im using an Spring Integration recipient-list-router with selector-expression . 我正在与Spring集成的系统中工作,我需要根据从MQ队列接收到的消息激活不同的服务,为此,我根据其内容路由此消息,为此,我使用了带有以下功能的Spring Integration 收件人列表路由器: 选择器表达式

Testing the performance of this config, im getting a bottleneck on this router. 测试此配置的性能,会遇到此路由器的瓶颈。

<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>

After routing the messages, i'm using a Spring Integration Filter and transformer, then the messages are sent to a service activator. 路由消息后,我正在使用Spring Integration Filter和Transformer,然后将消息发送到服务激活器。

What can i do to improve the router's performance? 我该怎么做才能提高路由器的性能? and would be better to do this routing, filtering and service call with a JAVA class? 并且最好用JAVA类进行此路由,筛选和服务调用?

Thanks. 谢谢。

enter image description here 在此处输入图片说明

SpEL不太可能成为这里的巨大瓶颈,但是您可以编写Java路由器,也可以尝试配置SpEL编译器来编译表达式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM