namtn
namtn

Reputation: 71

wso2 message broker + spring integration performance

I'm using Spring integration + WSO2 message broker for my project. My flow is:

Step 1. CLient call restful webservice

Step 2. Restful get infomation from client and send to request queue (via gateway)

Step 3. Activator get message from request queue, do bussiness logic then send back result to reply queue

Step 4. Restful get the result and response for client

My question is: Why WSO2 too slow?

It's took me 1-2 second to completed the flow with WSO2 for only one message. But when i change to ActiveMQ so perfomance significantly increased ( completed flow in 6 second for 1000 message)???

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

Upvotes: 3

Views: 750

Answers (1)

namtn
namtn

Reputation: 71

I've done a test with rabbitmq, acticemq, wso2 for same flow and use spring integration 2.2 .

The result as below:

WSO2: 1-2 second for 1 message

ActiveMQ: 70 second for 10.000 messages

RabbitMQ: 1 second for 10.000 messages.

I don't know why wso2 too slow. Anyway, RabbitMQ is really robust.

Upvotes: 2

Related Questions