[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ActiveMQ: producer flow control and temp store

Dear community,

We want to enable producer flow control to protect a broker from running out
of memory if slow topic consumers appear (we had OOMs through several runs
on our staging environment, and so far PFC off is one of the versions why
this has happened). However, we would want to keep our previous approach: if
memory not enough, use temp store for our topic messages so that the
producer keeps producing and fast consumers are up-to-date. So we expect
(almost) no backpressure if ActiveMQ has enough CPU and IO to write those
messages to disk.

I can see that simply enabling producer flow control keeps utilizing temp

      <policyEntry topic=">" producerFlowControl="true">

      <memoryUsage limit="2 gb"/>
      <storeUsage limit="100 gb"/>
      <tempUsage limit="10 gb"/>

However, our concerns are that single case of slow consumer can flood most
of the available heap with messages before flowing to temp store. The
following might seem as a perfect solution:
*<policyEntry topic=">" producerFlowControl="true" memoryLimit="20 mb">*

However, with this configuration ActiveMQ start throttling producers as soon
as topic memory limit reached, without going to temp store.

Any chance there's some trick to limit memory per destination, and at the
same time keep using temp store?

Thank you,

Sent from: