You need to change cursorMemoryHighWaterMark from the default 70% to
100% to ensure you reach your memory limit.

the file cursor will spool to disk when cursorMemoryHighWaterMark is
reached, so you won't reach the memory limit.
the (default) store cursor will stop caching  at that value, so you
won't reach your memory limit.

 <policyEntry   .. cursorMemoryHighWaterMark="100">

so the cursor will use 100% of available memory resources.

btw: why do you use the fileCursor? Nearly always the store cursor is best.

On 21 March 2014 04:22, tikboy <tikboy.balat...@gmail.com> wrote:
> Hi,
>
> I've configured a policy for my broker to have 20 mb memory limit for a
> certain queue and the PFC turned off. I was expecting that when the memory
> limit is reached, the client would be unable to publish messages to that
> queue and would  receive exceptions while sending a message.
>
> But apparently this is not happening. My broker is still accepting messages.
> It would just stop receiving any new messages when either the storeUsage or
> the tempUsage has been filled up.
>
> An excerpt of my configuration below:
>
>                     <policyEntry
>                         queue="my.company.queue.WORKFLOW_PROCESS_EVENT"
>                         producerFlowControl="false"
>                         memoryLimit="20 mb"
>                         >
>                         <deadLetterStrategy>
>                             <sharedDeadLetterStrategy processExpired="false"
> processNonPersistent="false" />
>                         </deadLetterStrategy>
>                         <pendingQueuePolicy>
>                             <fileQueueCursor/>
>                         </pendingQueuePolicy>
>                     </policyEntry>
> ...
> ...
>         <systemUsage>
>             <systemUsage sendFailIfNoSpace="true">
>                 <memoryUsage>
>                     <memoryUsage limit="500 mb"/>
>                 </memoryUsage>
>                 <storeUsage>
>                     <storeUsage limit="50 gb"/>
>                 </storeUsage>
>                 <tempUsage>
>                     <tempUsage limit="10 gb"/>
>                 </tempUsage>
>             </systemUsage>
>         </systemUsage>
>
> Any enlightenment would be appreciated.
>
> Thanks,
>
>
>
>
> --
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/memoryLimit-behavior-5-5-1-tp4679389.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://redhat.com
http://blog.garytully.com

Reply via email to