Hi,

I'm trying to impl a use case where a non-persistent msg producer can 
send msgs until no more disk space.   We want to flow the msgs to disk with a 
limit - and to detect when the space is full (instead of being throttled).

The attempt is to set tempUsage limit with sendFailIfNoSpace on the 
systemUsage.  The target queue is myqueue.

        <destinationPolicy>
            <policyMap>
              <policyEntries>
                <policyEntry topic=">" producerFlowControl="true" 
memoryLimit="1mb">
                  <pendingSubscriberPolicy>
                    <vmCursor />
                  </pendingSubscriberPolicy>
                </policyEntry>
                <policyEntry queue=">" producerFlowControl="true" 
memoryLimit="1mb">
                </policyEntry>
                <policyEntry queue="myqueue" producerFlowControl="true" 
memoryLimit="1mb">
                  <pendingQueuePolicy>
                    <fileQueueCursor/>
                  </pendingQueuePolicy>
                </policyEntry>
              </policyEntries>
            </policyMap>
        </destinationPolicy>

        <systemUsage>
            <systemUsage sendFailIfNoSpace="true" >
                <memoryUsage>
                    <memoryUsage limit="20 mb"/>
                </memoryUsage>
                <storeUsa
                    <storeUsage limit="1 gb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="33 mb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>


But the outcome was not exact.

1 - fileQueueCursor, flow control on, producer jms.useAsyncSend=false

The producer stopped after sending about 2600 msgs.  When a consumer was 
connected, no msgs were received, even though the queue has about 700 msgs.


2 - fileQueueCursor, flow control off, producer jms.useAsyncSend=false

Same as above - the flow control did not affect the outcome.
3 - vmQueueCursor, flow control on

Producer received onException call 
back after 1mb memory was exhausted.  No msg 
flowed to disk.  Producer can continue to send w/o error after a consumer had 
drained msgs from memory.

4 - vmQueueCursor, flow control off
Producer continued to send - beyond 32mb tempUsage limit.

Broker version 5.5.1
Java 1.6
64-bit linux system


Any suggestions on how to utilize all disk space but with notification when 
space is near depletion?


Thanks

Reply via email to