activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: Producer flow control and hard lockup of 5.3.0
Date Wed, 02 Dec 2009 09:38:14 GMT
can you post your activemq.xml?
possibly compare you setup to what is known to work from the unit tests:
org.apache.activemq.ProducerFlowControlTest

http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ProducerFlowControlTest.java?view=markup

2009/12/1 Geir Magnusson Jr. <geir@pobox.com>

> 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
>
>
>
>
>


-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message