简体   繁体   English

wso2消息代理+ spring集成性能

[英]wso2 message broker + spring integration performance

I'm using Spring integration + WSO2 message broker for my project. 我正在为我的项目使用Spring集成+ WSO2消息代理。 My flow is: 我的流程是:

Step 1. CLient call restful webservice 步骤1. CLient调用restful webservice

Step 2. Restful get infomation from client and send to request queue (via gateway) 步骤2.从客户端获取Restful获取信息并发送到请求队列(通过网关)

Step 3. Activator get message from request queue, do bussiness logic then send back result to reply queue 步骤3.激活器从请求队列中获取消息,执行业务逻辑然后将结果发送回应答队列

Step 4. Restful get the result and response for client 步骤4. Restful获取客户端的结果和响应

My question is: Why WSO2 too slow? 我的问题是:为什么WSO2太慢了?

It's took me 1-2 second to completed the flow with WSO2 for only one message . 我花了1-2秒才用WSO2完成了只有一条消息的流程。 But when i change to ActiveMQ so perfomance significantly increased ( completed flow in 6 second for 1000 message )??? 但是当我改为ActiveMQ时性能显着提高( 1000条消息完成流程为6秒 )???

My configuration as below: 我的配置如下:

 <!-- WSO2 connection -->
<!--  <jee:jndi-lookup id="connectionFactory" jndi-name="qpidConnectionfactory" cache="true">
    <jee:environment>
            java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory
            connectionfactory.qpidConnectionfactory=amqp://admin:admin@carbon/carbon?brokerlist='tcp://localhost:5672'
    </jee:environment>
</jee:jndi-lookup>  -->

<!-- ActiveMQ connection -->
<bean name="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="brokerURL">
        <value>tcp://localhost:61616</value>
    </property>
</bean> 

<!-- CB Configuration -->
<int:channel id="cbRequestChanel" ></int:channel>
<int:channel  id="cbResponseChanel"></int:channel >

 <jms:inbound-gateway 
       request-channel="cbRequestChanel" 
       request-destination-name="cbQueueRequest" 
       connection-factory="connectionFactory" />

<jms:outbound-gateway id="cbOutGateway"
    request-destination-name="cbQueueRequest"
    reply-destination-name="cbQueueResponse"
    request-channel="cbRequestChanel" 
    reply-channel="cbResponseChanel"
    connection-factory="connectionFactory" />

<int:gateway id="cbGateway" default-request-channel="cbRequestChanel" 
    default-reply-channel="cbResponseChanel"
    service-interface="com.test.gateway.ICBGateway" />

 <int:service-activator 
    input-channel="cbRequestChanel" method="receive"
    ref="cBServiceActivator">
</int:service-activator>

<bean id="cBServiceActivator" class="com.test.activator.CBServiceActivator" />

I've done a test with rabbitmq, acticemq, wso2 for same flow and use spring integration 2.2 . 我已经用rabbitmq,acticemq,wso2进行了相同流程的测试,并使用了spring integration 2.2。

The result as below: 结果如下:

WSO2: 1-2 second for 1 message WSO2: 1条消息1-2秒

ActiveMQ: 70 second for 10.000 messages ActiveMQ:对于10.000条消息,为70秒

RabbitMQ: 1 second for 10.000 messages. RabbitMQ: 10,000条消息的1秒。

I don't know why wso2 too slow. 我不知道为什么wso2太慢了。 Anyway, RabbitMQ is really robust. 无论如何,RabbitMQ非常强大。

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

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