Hi guys, I have a problem related to throttling in ActiveMQ. We are using the ResourceAllocationException from ActiveMQ for throttling error handling. Because we have encountered some problems related to throttling I am doing some tests. The test scenario is relatively simple: - my application sends two messages in a queue - I have disabled the consumer for this test because I want the queue to be filled up as I need it - in activemq.xml I have configured the queue like this:
<policyEntry queue="TEST_QUEUE" producerFlowControl="true" memoryLimit="1b" useCache="false"/> memoryLimit="1b" - because of this, one message will be allowed in the queue and all other attempts to put messages will receive a ResourceAllocationException (is this correct?) When executing the test with two messages I expected to receive a ResourceAllocationException when I tried to put the second message inside the queue. But no exception came. At this point there were two messages hanging in the queue. When executing the test again, both of the two new messages received the exception. I have then purged the queue (0 messages in the queue), retried the test and again no exception. What I did after this is set up a loop that sent a message every second for 30 seconds (purged the queue before executing the test ofc). After 10 messages my application started receiving the ResourceAllocationException that I have expected. (At this point there were 10 messages stuck in the queue) It seemed that AMQ started sending the exception 10 seconds after receiving the first one. I retried my first test (with the two messages and with the queue empty) but with a delay. The test sent 1 message, waited for 11 seconds and then sent the second one. This time the test was successful. The second message received the expected exception. After further testing it seems that there is a delay with which AMQ sends the ResourceAllocationException, 10 seconds after the memoryLimit for the queue is reached. Why is this happening? Have I done something wrong or am I missing something? Why is this apparent 10 seconds delay and how can I turn this off? Thanks L. -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-ResourceAllocationException-is-delayed-tp4669871.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.