You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by SKBuser <Dm...@skblab.ru> on 2019/05/14 04:25:24 UTC

Why can't I get performance boost while changing persistent activemq messages to non-persistent?

I'm trying to get a higher speed for sending messages via ActiveMQ broker.

The problem is, that I don't get a great perfomence boost. It takes about 2
minutes 40 seconds to send 10000 persistent messages from queue №1 to queue
№2 via my service. And it takes about 2 minutes 20 seconds to send 10000
non-persistent messages. I'm expecting to get at lest x10 speed perfomence
for non-persistent mode. Actually I can get it setting transacted property
to "false":

<property name="transacted" value="false"/>
But this is not an option, I need transacted mode for messages that are
perstitent.

I have configured ActiveMQ like this:

<bean class="org.apache.activemq.ActiveMQConnectionFactory"
id="jmsConnectionFactory">
        <property name="brokerURL" value="${AMQ.URL}"/>
        <property name="userName" value="${AMQ.USER}"/>
        <property name="password" value="${AMQ.PASSWORD}"/>
    </bean>
    <bean class="org.apache.activemq.pool.PooledConnectionFactory"
        destroy-method="stop" id="jmsConnectionPool" init-method="start">
        <property name="maxConnections" value="10"/>
        <property name="connectionFactory" ref="jmsConnectionFactory"/>
    </bean>
    <bean class="org.apache.camel.component.jms.JmsConfiguration"
id="jmsConfig">
        <property name="connectionFactory" ref="jmsConnectionPool"/>
        <property name="concurrentConsumers" value="10"/>
        <property name="preserveMessageQos" value="true"/>
        <property name="transacted" value="true"/>
        <property name="cacheLevelName" value="CACHE_CONSUMER"/>
    </bean>
    <bean class="org.apache.activemq.camel.component.ActiveMQComponent"
id="activemq">
        <property name="configuration" ref="jmsConfig"/>
    </bean>
Camel test route:

<route id="SRV.TEST">
       <description>Test route</description>
       <from uri="{{mqName}}:queue:{{test.in}}"/>
       <to uri="{{mqName}}:queue:{{test.out}}"/>
</route>
Can anybody help, what am I doing wrong?



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html

Re: Why can't I get performance boost while changing persistent activemq messages to non-persistent?

Posted by Justin Bertram <jb...@apache.org>.
Couple of things:

  1) This is the "dev" list for developers who are actually working on
ActiveMQ to discuss topics related directly to said development. You should
use the "user" list [1] for questions like this.
  2) You should be getting the help you need on your Stack Overflow
questions [2].


Justin

[1] http://activemq.apache.org/contact/#mailing
[2]
https://stackoverflow.com/questions/56122936/why-cant-i-get-performance-boost-while-changing-persistent-activemq-messages-to

On Tue, May 14, 2019 at 8:44 AM SKBuser <Dm...@skblab.ru> wrote:

> I'm trying to get a higher speed for sending messages via ActiveMQ broker.
>
> The problem is, that I don't get a great perfomence boost. It takes about 2
> minutes 40 seconds to send 10000 persistent messages from queue №1 to queue
> №2 via my service. And it takes about 2 minutes 20 seconds to send 10000
> non-persistent messages. I'm expecting to get at lest x10 speed perfomence
> for non-persistent mode. Actually I can get it setting transacted property
> to "false":
>
> <property name="transacted" value="false"/>
> But this is not an option, I need transacted mode for messages that are
> perstitent.
>
> I have configured ActiveMQ like this:
>
> <bean class="org.apache.activemq.ActiveMQConnectionFactory"
> id="jmsConnectionFactory">
>         <property name="brokerURL" value="${AMQ.URL}"/>
>         <property name="userName" value="${AMQ.USER}"/>
>         <property name="password" value="${AMQ.PASSWORD}"/>
>     </bean>
>     <bean class="org.apache.activemq.pool.PooledConnectionFactory"
>         destroy-method="stop" id="jmsConnectionPool" init-method="start">
>         <property name="maxConnections" value="10"/>
>         <property name="connectionFactory" ref="jmsConnectionFactory"/>
>     </bean>
>     <bean class="org.apache.camel.component.jms.JmsConfiguration"
> id="jmsConfig">
>         <property name="connectionFactory" ref="jmsConnectionPool"/>
>         <property name="concurrentConsumers" value="10"/>
>         <property name="preserveMessageQos" value="true"/>
>         <property name="transacted" value="true"/>
>         <property name="cacheLevelName" value="CACHE_CONSUMER"/>
>     </bean>
>     <bean class="org.apache.activemq.camel.component.ActiveMQComponent"
> id="activemq">
>         <property name="configuration" ref="jmsConfig"/>
>     </bean>
> Camel test route:
>
> <route id="SRV.TEST">
>        <description>Test route</description>
>        <from uri="{{mqName}}:queue:{{test.in}}"/>
>        <to uri="{{mqName}}:queue:{{test.out}}"/>
> </route>
> Can anybody help, what am I doing wrong?
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html
>