activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kloh <>
Subject Closing a consumer create more messages than sent
Date Mon, 02 Jun 2008 14:29:24 GMT

Hi *,

we're concerning with interested happenings, about which we're not sure,
wether this is caused by bad configuration, bad code or a bug.

The scenario:
ActiveMQ 5.1, persistence with the amq-store, transactional.
We have two producer, each sends 10.000 messages to the broker, to a queue.
We have 3 consumers; one of this consumers is closed every 5 seconds and a
new consumer is created and started. Each consumer just counts the messages
it recieved and commits.

What happens?
After the consumers don't recieve any messages, we take a look at the
web-console or the jmx-monitor and see, that the pending messages are
negative (about 3 to 5) and the recieved messages are not 20.000 but 20.005
(for example).

We just tried differents variants of closing the consumer, but the calls
should work. Or did we not get the point at this?

The configuration:


    <broker xmlns=""
brokerName="localhost" useJmx="true" persistent="true"

                    <policyEntry queue=">" producerFlowControl="true"
                    <policyEntry topic=">" memoryLimit="5mb">

            <managementContext connectorPort="1099"

            <networkConnector name="default-nc" uri="multicast://default"/>

            <amqPersistenceAdapter syncOnWrite="false"
directory="${activemq.base}/data" maxFileLength="20 mb"/>

                    <memoryUsage limit="100 mb"/> 
                    <storeUsage limit="1 gb" name="messageStorage"/>
                    <tempUsage limit="100 mb"/>

            <transportConnector name="openwire" uri="tcp://localhost:61616"

    <camelContext id="camel"

    <jetty xmlns="">
            <nioConnector port="8161"/>

            <webAppContext contextPath="/admin"
resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
            <webAppContext contextPath="/demo"
resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
            <webAppContext contextPath="/fileserver"
resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>

    <bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
      <property name="databaseName" value="derbydb"/>
      <property name="createDatabase" value="create"/>
<!-- END SNIPPET: example -->

We are interested, if someone else has occured this or there is just one
(simple) point, that we miss.
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message