Would need to see how you've configured the infamous JMSTemplate - to see what 
the problem is

On 17 Dec 2010, at 16:44, maarten.dirkse wrote:

> 
> Hi,
> It's often said that producer flow control (PFC) is one of the most
> misunderstood features of ActiveMQ, and I couldn't agree more. After what
> I'd like to think was a pretty close read on the subject of the online docs,
> ActiveMQ in Action and the mailing list, I still can't figure out why my
> producer stalls indefinitely after PFC kicks in. And as the indefinite
> blocking of a producer is, as AMQ in Action says, "rather inefficient", I
> was wondering if someone could help me out.
> 
> I have three components, lets call them A, B and C. My test is supposed to
> run like this: A produces roughly 11 million messages and puts them onto a
> topic (with a mem limit of 1mb). B listens to the topic and puts the
> messages on a queue, which is listened to by C which processes all incoming
> messages. B is somewhat slower than A, so I enabled producer flow control
> for topics. All messages are persistent (so enabling flow control for topics
> wasn't really necessary, I suppose).
> 
> If I run the test with just component A, it works fine. PFC doesn't kick in,
> as there is no client listening to the topic. So far so good. If I then add
> B and C to the test, it runs until roughly 190,000 messages, at which point
> PFC kicks in, A is blocked, and the whole thing comes to a screeching halt.
> Just to be sure I enabled producerWindowSize and alwaysSyncSend on the
> connection (even though I shouldn't need to, as far as I understand, as the
> messages are persistent). That didn't help.
> 
> So now I'm stuck as to why PFC has completely blocked my producer. As I
> understand it, the idea of PFC is to block the producer until there are
> sufficient resources to restart delivery. However, PFC does halt my
> producer, but doesn't start it up again, even when B and C have finished
> processing all their messages (and presumably freed up the necessary
> resources).
> 
> What am I doing wrong? How do I get component A to start sending again?
> 
> I'm running AMQ 5.4.2, Java 1.6 update 22, and the Spring (2.5.6)
> JMSTemplate and SimpleMessageContainer for sending/receiving.
> 
> Thanks in advance,
> Maarten 
> -- 
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/Producer-flow-control-question-tp3092808p3092808.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to