You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by AndreiD <th...@gmail.com> on 2011/09/01 00:07:21 UTC

setProducerWindowSize inhibits propagation of ResAllocEx + producer stays forever blocked once it blocks

I've been experimenting with various flow control scenarios and all the
"standard" scenarios worked as expected (sync/async sends with
sendFailIfNoSpace set/not on the broker side) - I'm seeing
blocking/AllocationException/nothing in the client depending on the
scenario.

What I really want is what the producerWindowSize promises - async sends +
flow control.
But if I set the producerWindowSize the producer blocks (after a few msgs)
and then it stays blocked even after a consumer successfully gets the
messages successfully received by broker.

My questions are:

1.Given my broker flow control settings, why does the producer block in the
first place? I've set the sendFailIfNoSpace=true in the broker, so I'm
expecting the ResourceAllocationException (which I do see on the broker
console) to be propagated to the client, once the producer window size limit
is reached and the broker throws the ex.

2.Why doesn't the producer unblock once a consumer consumes the msgs
successfully stored in the broker?

I'm using the prod/cons from the 5.4.2 examples, with 2 ProducerTool tweaks:
-connectionFactory.setProducerWindowSize(5000);
-I explicitely set DeliveryMode to NON_PERSISTENT

My broker config:
....
<policyEntry queue="TEST.FOO"
                   producerFlowControl="true"
                   memoryLimit="50kb">
      <pendingQueuePolicy>
           <vmQueueCursor />  
      </pendingQueuePolicy>
</policyEntry>
....
<systemUsage>
    <systemUsage sendFailIfNoSpace="true">
<systemUsage>


Thanks in advance!

--
View this message in context: http://activemq.2283324.n4.nabble.com/setProducerWindowSize-inhibits-propagation-of-ResAllocEx-producer-stays-forever-blocked-once-it-blocs-tp3782348p3782348.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: setProducerWindowSize inhibits propagation of ResAllocEx + producer stays forever blocked once it blocks

Posted by jamesTheCruncher <ja...@mcruncher.com>.
This, I believe has been fixed in 5.9.0. I tested using the latest versions
and found this to be working correctly.



--
View this message in context: http://activemq.2283324.n4.nabble.com/setProducerWindowSize-inhibits-propagation-of-ResAllocEx-producer-stays-forever-blocked-once-it-blocs-tp3782348p4701390.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: setProducerWindowSize inhibits propagation of ResAllocEx + producer stays forever blocked once it blocks

Posted by jamesTheCruncher <ja...@mcruncher.com>.
Can someone explain this please? This question was asked in 2011 and yet I
see a similar behaviour with ActiveMQ 5.10.0.
The producer never recovers after the ResourceAllocationException.
There is very little or no documentation related to Producer Window Size.
It would be really helpful to the community if some of you can explain
exactly how does it work.



--
View this message in context: http://activemq.2283324.n4.nabble.com/setProducerWindowSize-inhibits-propagation-of-ResAllocEx-producer-stays-forever-blocked-once-it-blocs-tp3782348p4701364.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: setProducerWindowSize inhibits propagation of ResAllocEx + producer stays forever blocked once it blocks

Posted by AndreiD <th...@gmail.com>.
Any suggestions/hints? Let me know what additional details I can provide.

--
View this message in context: http://activemq.2283324.n4.nabble.com/setProducerWindowSize-inhibits-propagation-of-ResAllocEx-producer-stays-forever-blocked-once-it-blocs-tp3782348p3807775.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.