Daniel- The documentation looks correct. The “triggers” for producer flow control vary based on the configurations and message type (persistent or non-persistent). What is different in the various configuration noted below are what what constitutes “resources” for non-persistent messages.
For non-persistent messages: a. Default cursor will flow control when memoryLimit and/or tempUsageLimit reached -or- b. vmQueueCurosr will flow control on memoryLimit only (since temp and store usage are not used) Hope this helps. -Matt Pavlovich > On Jan 5, 2022, at 4:58 PM, Daniel Navrotsky <daniel.navrot...@driivz.com> > wrote: > > Hello, > > It looks like there is a mismatch in the documentation. From piece 1 (below) > I understand that messages would be shunted into the temporary file even if > producerFlowControl=true, but from piece 2 it sounds like it only would > happen if producerFlowControl=false > > > Piece 1 > https://activemq.apache.org/producer-flow-control.html > Note that, since the introduction of the new file cursor in ActiveMQ 5.x, > non-persisted messages are shunted into the temporary file store to reduce > the amount of memory used for non-persistent messaging. As a result, you may > find that a queue’s memoryLimit is never reached, as the cursor doesn’t use > very much memory. If you really do want to keep all your non-persistent > messages in memory, and stop producers when the limit is reached, you should > configure the <vmQueueCursor> > > Piece 2 > https://activemq.apache.org/per-destination-policies > producerFlowControl - If true the broker will throttle (flow-control) the > producer. Throttling is achieved either by withholding the producer’s ACK or > by raising a javax.jms.ResourceAllocationException (that’s propagated back to > the client) when local resources, e.g., memory and/or storage, have been > exhausted. If false excess messages will be written to the message store to > prevent memory exhaustion. However, when the message store reaches capacity > the producer will be throttled until resources are freed. > > > Best regards, > Daniel