You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by fengcanyue <15...@qq.com> on 2016/02/03 06:58:50 UTC

How fileCursor works? AMQ5.9.1

     hi:
I have one producer and one consumer, producer is fast,but consumer is
slower.
so i wish memroyLimit is reached,the message will store to disk .
but the fileCursor don not work well. The MemoryPercentUsage has reached
100,but i don not find file under tmp_storage/

who can tell me why?

   my xml config is as follow:
             <policyEntry topic=">" producerFlowControl="true"
memoryLimit="5mb" >
		  <pendingSubscriberPolicy>
                    <fileCursor />
                  </pendingSubscriberPolicy>
                </policyEntry>
 systemUsage is as follows:
      <systemUsage>
            <systemUsage>
                <memoryUsage>
		   <memoryUsage limit="100 mb"/> 
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="100 gb"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="50 gb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>



--
View this message in context: http://activemq.2283324.n4.nabble.com/How-fileCursor-works-AMQ5-9-1-tp4706865.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How fileCursor works? AMQ5.9.1

Posted by fengcanyue <15...@qq.com>.
the earliest non-dispatched message will be discarded when full.

i wish the more message buffer to disk when memory limit reach.

can you give me one xml file  that can do it ?
thanks!!



--
View this message in context: http://activemq.2283324.n4.nabble.com/How-fileCursor-works-AMQ5-9-1-tp4706865p4707496.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How fileCursor works? AMQ5.9.1

Posted by Tim Bain <tb...@alumni.duke.edu>.
Which messages do you lose when the topic becomes full?  Does the broker
discard the just-received message or the earliest non-dispatched message?
On Feb 10, 2016 3:54 AM, "Gary Tully" <ga...@gmail.com> wrote:

> any chance persistent=false is set on the broker? post your full xml config
> and peek at the unit test source for flow controll of memory limit tests to
> get working examples
>
> On Thu 4 Feb 2016 4:21 AM fengcanyue <15...@qq.com> wrote:
>
> > <http://activemq.2283324.n4.nabble.com/file/n4706897/nonpresistent.bmp>
> >
> > http://activemq.apache.org/message-cursors.html
> >
> > Here describe "buffer to disk if non-persistent pending cursor is full".
> >
> > My message is non-persistent.
> > when i use queue, non-persistent message will buffer to temp file.
> > but when i use topic ,non-persistent message will not buffer to temp
> file.
> > when memory limit reach,non-persistent message that sent to topic will be
> > discard.
> > this is not my expectation, i wish non-persistent message can buffer to
> > temp
> > file when topic memory limit reached .
> > how can i do it?
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/How-fileCursor-works-AMQ5-9-1-tp4706865p4706897.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>

Re: How fileCursor works? AMQ5.9.1

Posted by Gary Tully <ga...@gmail.com>.
any chance persistent=false is set on the broker? post your full xml config
and peek at the unit test source for flow controll of memory limit tests to
get working examples

On Thu 4 Feb 2016 4:21 AM fengcanyue <15...@qq.com> wrote:

> <http://activemq.2283324.n4.nabble.com/file/n4706897/nonpresistent.bmp>
>
> http://activemq.apache.org/message-cursors.html
>
> Here describe "buffer to disk if non-persistent pending cursor is full".
>
> My message is non-persistent.
> when i use queue, non-persistent message will buffer to temp file.
> but when i use topic ,non-persistent message will not buffer to temp file.
> when memory limit reach,non-persistent message that sent to topic will be
> discard.
> this is not my expectation, i wish non-persistent message can buffer to
> temp
> file when topic memory limit reached .
> how can i do it?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/How-fileCursor-works-AMQ5-9-1-tp4706865p4706897.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: How fileCursor works? AMQ5.9.1

Posted by fengcanyue <15...@qq.com>.
<http://activemq.2283324.n4.nabble.com/file/n4706897/nonpresistent.bmp> 

http://activemq.apache.org/message-cursors.html

Here describe "buffer to disk if non-persistent pending cursor is full".

My message is non-persistent.
when i use queue, non-persistent message will buffer to temp file.
but when i use topic ,non-persistent message will not buffer to temp file. 
when memory limit reach,non-persistent message that sent to topic will be
discard.
this is not my expectation, i wish non-persistent message can buffer to temp
file when topic memory limit reached .
how can i do it?



--
View this message in context: http://activemq.2283324.n4.nabble.com/How-fileCursor-works-AMQ5-9-1-tp4706865p4706897.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How fileCursor works? AMQ5.9.1

Posted by Rob Davies <ra...@gmail.com>.
IIRC filecursor will only be used for non-persistent messages and messages sent to a topic with no durable subscriber: i.e. for any messages that can’t be stored in the message store. Is it possible you are using persistent messages ?


> On 3 Feb 2016, at 05:58, fengcanyue <15...@qq.com> wrote:
> 
>     hi:
> I have one producer and one consumer, producer is fast,but consumer is
> slower.
> so i wish memroyLimit is reached,the message will store to disk .
> but the fileCursor don not work well. The MemoryPercentUsage has reached
> 100,but i don not find file under tmp_storage/
> 
> who can tell me why?
> 
>   my xml config is as follow:
>             <policyEntry topic=">" producerFlowControl="true"
> memoryLimit="5mb" >
> 		  <pendingSubscriberPolicy>
>                    <fileCursor />
>                  </pendingSubscriberPolicy>
>                </policyEntry>
> systemUsage is as follows:
>      <systemUsage>
>            <systemUsage>
>                <memoryUsage>
> 		   <memoryUsage limit="100 mb"/> 
>                </memoryUsage>
>                <storeUsage>
>                    <storeUsage limit="100 gb"/>
>                </storeUsage>
>                <tempUsage>
>                    <tempUsage limit="50 gb"/>
>                </tempUsage>
>            </systemUsage>
>        </systemUsage>
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/How-fileCursor-works-AMQ5-9-1-tp4706865.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.