activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Dulin <oleg.du...@gmail.com>
Subject Producer flow control on one queue blocks the whole connection ?
Date Wed, 19 Sep 2012 18:26:06 GMT
Here is my flow:

Queue A has a store limit set to 15% and producerFlowControl turned on.

Thread "foo" publishes on queue A
Thread "bar" listens for A, does something, and publishes on queue B
Thread "bat" listens for B, does something and publishes on queue C
Thread "boo" listens for C, does something and only ocassionally publishes on A

Store reaches 15%.

Foo gets stopped, rightfully so.

The whole thing is now blocked. Using Jconsole:

foo is blocked on this:

Stack trace:
 sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)


java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:315)
org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:87) 

org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1284) 

org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1760)
   - locked java.lang.Object@407f434d
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231) 

org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)



bar is now blocked on this as well it seems waiting for foo to free up 
this lock:

Stack trace:
 sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)


java.util.concurrent.ArrayBlockingQueue.take(ArrayBlockingQueue.java:315)
org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:40)
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:87) 

org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1284) 

org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1760)
   - locked java.lang.Object@202ed609
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231) 

org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)



and boo is blocked trying to send it back to queue A, as expected.

So, store is not getting freed up.

Why ? This has got to be a misconfiguration...



-- 
Regards,
Oleg Dulin
NYC Java Big Data Engineer
http://www.olegdulin.com/



Mime
View raw message