activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesTheCruncher <>
Subject Re: What is the correct way to throttle ActiveMQ producers who send persistent messages in batches to a queue?
Date Fri, 21 Aug 2015 06:41:58 GMT
Hi Tim,

Thanks once again for taking the time to help me out. I really appreciate
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/.


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

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

Here's my activemq.xml:

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message