James, Thanks for the additional information about the test you ran. Would you mind re-running it with a storeUsage limit of 2 MB? I'd like to test whether PFC isn't kicking in at all, or just isn't respecting the per-destination limit you set via the policy. I know you're interpreting the wiki page to say the PFC doesn't happen for async sends (and your observations so far seem in line with that interpretation), but that isn't what I thought was the case, and I want to make sure I understand what's going on.
As I said, I observed per-destination policy limits to induce PFC for what I think were queues with async sends under 5.8.0, so I believe I've seen exactly this scenario work, though it's been about a year so I may be misremembering some aspect of the scenario. To go back to what you originally tried, can you post the exception you got when trying to set a producer window size? On Aug 21, 2015 12:46 AM, "jamesTheCruncher" <ja...@mcruncher.com> wrote: > Hi Tim, > > Thanks once again for taking the time to help me out. I really appreciate > that. > I'm very sorry for not mentioning the ActiveMQ version that I am using. > I'm using ActiveMQ 5.10.0. > Though my concern is about /batch send/ and PFC, I also tested async send > to > answer your questions. > I sent around 1 million messages by specifying /jms.useAsyncSend=true/ in > the connection URI. I used a standard Camel consumer to consume the > messages > and write it to a text file. (I just used the example code that's shipped > with Camel) > My payload is around 2 kb per message. > > By the time my producer finished sending 1 million messages, there were > around 900k messages pending in the queue. I used per-destination memory > limit of /1 mb/. > > < > http://activemq.2283324.n4.nabble.com/file/n4701260/pfc-not-applied-when-using-async-send.png > > > > I could see PFC in action when I don't use async send. This is what I > expected and is consistent with the PFC documentation which states that PFC > won't kick in for async sends unless PWS (Producer Window Size) is > configured. > > While using async sends, I expect PFC to kick in and bring everything to a > stand still when the system /memory limit/ threshold is reached. > > However when I used / batch sends/ PFC did kick in only when system / store > limit / was reached. Moreover, I couldn't use PWS at all while using batch > sends. > > Here's my activemq.xml: > > > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/What-is-the-correct-way-to-throttle-ActiveMQ-producers-who-send-persistent-messages-in-batches-to-a--tp4701204p4701260.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >