History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: AMQ-391
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Daniel Aioanei
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

message consumption is too slow, only 40/s

Created: 20/Oct/05 11:31 PM   Updated: 03/Jul/06 05:40 PM
Component/s: None
Affects Version/s: 3.1
Fix Version/s: 4.0.1

Time Tracking:
Not Specified

Environment: java version "1.5.0_05", Windows XP, Pentium IV 2.6 GHz, 1 Gb memory


 Description  « Hide
For this test I used text messages with two Long properties, two String properties and one text message, all of them with "normal" sizes. The text message is 80 characters long, while the String properties have 12 characters. I'm using the following activemq configuration:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd">
<beans>

<!-- ==================================================================== -->
<!-- ActiveMQ Broker Configuration -->
<!-- ==================================================================== -->
<broker>
<connector>
<tcpServerTransport uri="tcp://localhost:61616" backlog="1000" useAsyncSend="false" maxOutstandingMessages="50"/>
</connector>

<persistence>
<cachePersistence>
<journalPersistence directory="../var/journal">
<jdbcPersistence dataSourceRef="derby-ds"/>
</journalPersistence>
</cachePersistence>
</persistence>

<redeliveryPolicy maximumRetryCount="416" backOffMode="true" backOffIncreaseRate="1" initialRedeliveryTimeout="1000"/>

</broker>

<!-- ==================================================================== -->
<!-- JDBC DataSource Configurations -->
<!-- ==================================================================== -->

<!-- The Derby Datasource that will be used by the Broker -->
<bean id="derby-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName">
<value>org.apache.derby.jdbc.EmbeddedDriver</value>
</property>
<property name="url">
<!-- Use a URL like 'jdbc:hsqldb:hsql://localhost:9001' if you want to connect to a remote hsqldb -->
<value>jdbc:derby:derbydb;create=true</value>
</property>
<property name="username">
<value></value>
</property>
<property name="password">
<value></value>
</property>
<property name="poolPreparedStatements">
<value>true</value>
</property>
</bean>

</beans>

where activemq runs in its own jvm. After I produced about 1000 messages with a producer, I shut it down and then start a consumer jvm. Unfortunately it can only consume about 40 msg/second while I'd like to get about 400/s. The consumer is configured like this:

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

<!-- START SNIPPET: spring -->
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>

<!-- 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="25"/>
</bean>
</property>

<!-- the JCA Resource Adapter -->
<property name="resourceAdapter">
<bean id="activeMQResourceAdapter" class="org.activemq.ra.ActiveMQResourceAdapter">
<property name="serverUrl" value="reliable:tcp://localhost:61616?asyncSend=false&copyMessageOnSend=false&disableTimeStampsByDefault=true&doMessageCompression=false&doMessageFragmentation=false&prepareMessageBodyOnSend=false&cachingEnabled=false"/>
</bean>
</property>
</bean>
<!-- 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.activemq.ra.ActiveMQActivationSpec">
<property name="destination" value="InboundQueue"/>
<property name="destinationType" value="javax.jms.Queue"/>
</bean>
</property>

<property name="ref" value="echoBean"/>
</bean>

<bean id="echoBean" class="com.foo.bar.Mdp" singleton="true"/>
<!-- END SNIPPET: inbound -->

</beans>

Mdp only reads the properties and nothing more. I tried varying threadPoolSize from 25 to 250 to no avail. I think 40 msg/second is too slow in this configuration.



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
James Strachan - 03/Jul/06 05:40 PM
This should be fixed in 4.0.1 now. If its not let us know and we can reopen the issue