activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Aioanei (JIRA)" <>
Subject [jira] Created: (AMQ-905) A single JMS Listener is way too slow
Date Thu, 31 Aug 2006 12:36:23 GMT
A single JMS Listener is way too slow

                 Key: AMQ-905
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 4.0.1
            Reporter: Daniel Aioanei
         Attachments: activemq.xml

I'm using ActiveMQ 4.0.1 with a DerbyDB backend and I have a single JMS listener for a queue
with loads of messages. In order to see how many msg/second are processed by a no-op JMS listener,
with a single concurrent session, I used the following configuration:

<?xml version="1.0" encoding="UTF-8"?>


  <!-- START SNIPPET: jca -->
  <bean id="jencks" class="org.jencks.JCAContainer">

    <!-- lets use the default configuration of work manager and transaction manager-->
    <property name="bootstrapContext">
      <bean class="org.jencks.factory.BootstrapContextFactoryBean">
        <property name="threadPoolSize" value="200"/>

    <!-- the JCA Resource Adapter -->
    <property name="resourceAdapter">
      <bean id="activeMQResourceAdapter" class="org.apache.activemq.ra.ActiveMQResourceAdapter">
        <property name="serverUrl" value="tcp://localhost:61616?wireFormat.cacheEnabled=false&amp;wireFormat.tightEncodingEnabled=false&amp;jms.useAsyncSend=false"/>
  <!-- END SNIPPET: jca -->

    || an inbound message connector using a stateless, thread safe MessageListener
  <!-- START SNIPPET: inbound -->
  <bean id="inboundConnectorA" class="org.jencks.JCAConnector">

    <property name="jcaContainer" ref="jencks" />

    <!-- subscription details -->
    <property name="activationSpec">
      <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
        <property name="destination" value="queue/MyQueue"/>
        <property name="destinationType" value="javax.jms.Queue"/>
        <property name="acknowledgeMode" value="Auto-acknowledge"/>
        <property name="useRAManagedTransaction" value="false"/>
		<property name="maximumRedeliveries" value="10"/>
		<property name="initialRedeliveryDelay" value="1000"/>
		<property name="useExponentialBackOff" value="true"/>
		<property name="backOffMultiplier" value="5"/>
        <property name="maxSessions" value="1"/>
        <property name="maxMessagesPerSessions" value="1"/>

    <property name="ref" value="testOutboundMdp"/>
	<bean id="testOutboundMdp" class="TestOutboundMdp"/>

The problem is that the consumption speed is 11 msg/second and cpu consumption is about 1-2%.
To get almost 100% cpu usage I have to increase threadPoolSize and maximumRedeliveries to
1000 (!) and at that point the consumption speed reaches 142 msg/sec, which is not too impressive
either. I'm not sure if it's a Jencks or ActiveMQ issue here.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message