Active topics

Running ActiveMQ 5.4.0. I have a group of users who subscribe and publish to each other on various topics through a common JMS ActiveMQ provider. After a while, the ActiveMQ console activity will begin to display

INFO|USAGE MANAGER memory limit reached. Stopping producer (ID ...... to prevent flooding topic .....

This message is repeated for different topics. I know that in some cases some messages are never delivered. None of the manufacturers in the “network” have any flow control. They just send and forget. Obviously, some of the manufacturers are blocked, but eventually freed. I believe that topics are not durable / intermittent.

I just use the default activemq configuration. So, what is the best way to solve this problem? Is it wise to disable flow control and how?

+3
source share
1 answer

If you use the default ActiveMQ configuration, flow control is enabled. That is why you receive these messages.

If you do not want to use flow control, you can do something like this:

<policyEntry topic="myTopic" producerFlowControl="false">

What this will do is use as much memory as ActiveMQ gives you. Keep in mind, however, that at some point ActiveMQ will start buffering messages through the disk if it thinks you might cause problems for other queues, etc. - This will lead to increased performance because it hits the disks. This is completely different from perseverance. However, if you set a reasonable heap limit for java on startup compared to your full data needs, you should be fine.

, , , , :

<policyEntry topic="myTopic" producerFlowControl="true" memoryLimit="200mb">
    <pendingQueuePolicy>
    <vmQueueCursor/>
</pendingQueuePolicy>
</policyEntry>

, memoryLimit. , , .

: http://activemq.apache.org/producer-flow-control.html

+3

All Articles