Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D4A07018 for ; Mon, 12 Sep 2011 20:46:45 +0000 (UTC) Received: (qmail 27316 invoked by uid 500); 12 Sep 2011 20:46:44 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 27283 invoked by uid 500); 12 Sep 2011 20:46:44 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 27275 invoked by uid 99); 12 Sep 2011 20:46:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2011 20:46:44 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=FREEMAIL_FROM,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of bob.cotton@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2011 20:46:39 +0000 Received: from joe.nabble.com ([192.168.236.139]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1R3DOV-0002c9-47 for users@activemq.apache.org; Mon, 12 Sep 2011 13:46:19 -0700 Date: Mon, 12 Sep 2011 13:46:19 -0700 (PDT) From: "bob.cotton@gmail.com" To: users@activemq.apache.org Message-ID: <1315860379084-3808581.post@n4.nabble.com> Subject: Unexplained producer throttling when using a network of brokers MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit ActiveMQ 5.5.0 Name : IBM Performance Harness for Java Message Service. Version : 1.2 Build : 488 Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425) OSX 10.6.8 Producer perfharness commandline: java -Dactivemq.base=$ACTIVEMQ_HOME JMSPerfHarness -pc JNDI -ii org.apache.activemq.jndi.ActiveMQInitialContextFactory -iu $BROKER_URL -cf ConnectionFactory -d dynamicTopics/MyStaticTopic1 -tc jms.r11.Publisher -rl 500 -pp true Consumer perfharness commandline: java -Dactivemq.base=$ACTIVE_HOME JMSPerfHarness -pc JNDI -ii org.apache.activemq.jndi.ActiveMQInitialContextFactory -iu $BROKER_URL -cf ConnectionFactory -d dynamicTopics/MyStaticTopic1 -tc jms.r11.Subscriber -rl 500 I'm testing various broker toplogies during my evaluation of ActiveMQ. 1st scenario: Standalone ActiveMQ broker with BROKER_URL='tcp://localhost:61616' with producers and consumers in separate VMs. Everything works as expected. Test runs to completion. 2nd scenarion: Both producer and consumer contain an embedded brokers with a duplex networkConnector to the standalone broker. Standalone broker config http://pastie.org/2522981 here . Publisher BROKER_URL='vm://localhost?brokerConfig=xbean: http://pastie.org/2522896 embeded-broker-pub.xml ' Subscriber BROKER_URL='vm://localhost?brokerConfig=xbean: http://pastie.org/2522905 embeded-broker-pub.xml ' Test starts out with the consumer receiving messages as expected. Then the producer stops sending. There does not seem to be any warning about the producer being throttled. I get the same behavior even when setting producerFlowControl="false" I've turned up logging: log4j.logger.org.apache.activemq=DEBUG but I don't see anything indicating that the producer is being throttled. Run-time stack traces show the producer is doing this (full kill quit http://pastie.org/2522961 here ): "ActiveMQ Task-6" daemon prio=5 tid=1027f2000 nid=0x115774000 in Object.wait() [115772000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) at org.apache.activemq.broker.region.TopicSubscription.add(TopicSubscription.java:129) - locked <7f40d1bb0> (a java.lang.Object) at org.apache.activemq.broker.region.policy.SimpleDispatchPolicy.dispatch(SimpleDispatchPolicy.java:48) at org.apache.activemq.broker.region.Topic.dispatch(Topic.java:634) at org.apache.activemq.broker.region.Topic.doMessageSend(Topic.java:468) - locked <7f4be2db0> (a org.apache.activemq.broker.region.Topic) at org.apache.activemq.broker.region.Topic.send(Topic.java:404) at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:365) and this: "Publisher1" daemon prio=5 tid=10e01f800 nid=0x112204000 waiting on condition [112203000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <7f40ea900> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987) at java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:317) at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40) at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:87) at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1284) at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1760) Inspecting the topics in jconsole show all of them empty. This is repeatable. interestingly, if I detach the tty (sending stdout/stderr to /dev/null) I don't get this behavior. Is there something I'm doing wrong? Other logging I can enable to help me debug this? Thanks for reading this far. - Bob -- View this message in context: http://activemq.2283324.n4.nabble.com/Unexplained-producer-throttling-when-using-a-network-of-brokers-tp3808581p3808581.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.