You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Rob Davies (JIRA)" <ji...@apache.org> on 2008/05/15 13:16:43 UTC

[jira] Updated: (AMQ-1717) sendFailIfNoSpace only works for MemoryUsage, not disk usage

     [ https://issues.apache.org/activemq/browse/AMQ-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies updated AMQ-1717:
----------------------------

    Fix Version/s: 5.2.0

> sendFailIfNoSpace only works for MemoryUsage, not disk usage
> ------------------------------------------------------------
>
>                 Key: AMQ-1717
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1717
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>            Reporter: Steve Shabino
>             Fix For: 5.2.0
>
>
> We have a use case where we do not want to wait for ActiveMQ if allocated disk space is used up.   So, we set sendFailIfNoSpace to true in the SystemUsage object.
> Expected: Setting sendFailIfNoSpace should cause an immediate exception when attempting to send a message if StoreUsage is at or above the max allowed.
> Actual: ActiveMQ blocks until disk space is available.
> Some analysis of the code shows that org.apache.activemq.broker.region.Queue's send method only throws an exception if MemoryUsage is full:
> {code}
>         if (isProducerFlowControl() && context.isProducerFlowControl() && memoryUsage.isFull()) {
>             if (systemUsage.isSendFailIfNoSpace()) {
>                 throw new javax.jms.ResourceAllocationException("SystemUsage memory limit reached");
>             }
> }
> {code}
> We worked around the problem with our embedded broker set-up by explicitly calling StoreUsage.isFull() before sending messages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.