Issue Details (XML | Word | Printable)

Key: AMQ-1789
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Rob Davies
Reporter: Mario Lukica
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

queue.send() throws ResourceAllocationException without checking usageManager when sendFailIfNoSpace is set

Created: 10/Jun/08 10:51 AM   Updated: 11/Jun/08 03:59 AM
Return to search
Component/s: Broker
Affects Version/s: 4.1.2
Fix Version/s: 5.1.0

Time Tracking:
Not Specified


 Description  « Hide
org.apache.activemq.broker.region.Queue send(ConnectionContext, Message) method always throws ResourceAllocationException if sendFailIfNoSpace is set, producerFlowControl is enabled, message response is not required and network connection is not used to connect to broker.

In this case thread execution ends up in following code block:

... 
            } else { 
                if (usageManager.isSendFailIfNoSpace() ) { 
                    throw new javax.jms.ResourceAllocationException("Usage Manager memory limit reached"); 
                } else { 
                    while( !usageManager.waitForSpace(1000) ) { 
                        if( context.getStopping().get() ) 
                            throw new IOException("Connection closed, send aborted."); 
                    } 
                } 
            }

... usageManager is never checked for space prior to throwing ResourceAllocationException("Usage Manager memory limit reached"), and no message can be sent to this queue, regardless of the usageManager set on queue.



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.