activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <g...@pobox.com>
Subject Producer flow control and hard lockup of 5.3.0
Date Tue, 01 Dec 2009 21:43:36 GMT
I'm doing some simple stress experiments and am able to lockup 5.3.0.  I have a simple producer
and consumer as described below.  The queue is non-perstent, moving small text messages. 
Flailing about, I've set my producer window size to 1024000.

Upshot is that I can flood the queue for about 250k to 300k messages overall, and the producer
eventually gets stopped.  THe consumer seems to get all of them, at least according to the
console which shows 0 messages in queue, eventually.

At this point, the producer never starts again, and even bouncing the producer doesn't get
messages flowing again.  The only thing that works is bouncing the broker, but clearly that's
a crappy solution.

What am I doing wrong?

geir



Producer - single one, thread...

        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://10.0.0.2:61616");
        factory.setProducerWindowSize(1024000);

        Connection connection = factory.createConnection();
        connection.start();

        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Queue queue = session.createQueue("svc");
        MessageProducer producer = session.createProducer(queue);
        producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);

        while(true) {

            while(true) {
            	TextMessage tm = session.createTextMessage(theMessage);
                producer.send(tm);
            }
        }

That simply floods the queue with small text messages.

On the consumer side, I have 15 threads, each of which does something like : 

        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(_brokerURL);

        _connection = factory.createConnection();
        Session _session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

       Queue queue = _session.createQueue(name);

       MessageConsumer consumer = _session.createConsumer(queue);

       consumer.setMessageListener(new MessageHandlerAdapter(_session, msgHandler));

where my MessageHandlerAdapter has a pretty boring onMessage() method.

Things go fine until I see the now-dreaded

INFO | Usage Manager memory limit reached on queue://svc. Producers will be throttled to the
rate at which messages are removed from this destination to prevent flooding it. See http://activemq.apache.org/producer-flow-control.html
for more info





Mime
View raw message