You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Jose María Zaragoza <de...@gmail.com> on 2015/12/10 16:52:00 UTC

Message dispatching from cache

Hello:

I'm trying to understand how message priority works in AMQ 5.10

I'm reading

http://activemq.apache.org/how-can-i-support-priority-queues.html

and I don't understand this sentence

"Since the message cursors (and client side) implement strict ordering
of priorities, it's possible to observe strict priority ordering if
message dispatching can happen from the cache and not have to hit the
disk (i.e., your consumers are fast enough to keep up with producers)"

Is there a message cursor processing messages from cache ? Or cache is
implemented as a message cursor ?
I thought that when "your consumers are fast enough to keep up with
producers" , messages were moved directly into a dispatch queue for
the consumer

Thanks and regards

Re: Message dispatching from cache

Posted by Tim Bain <tb...@alumni.duke.edu>.
The cache and the cursor are the same thing.  When your consumers are
keeping up, all messages are in memory and priority dispatch works
correctly.  When consumers fall behind, eventually some messages will be in
memory while others will be on disk waiting for space to be available in
memory.  Once a message gets into memory, priority will be respected, but
while it's on disk it will be ignored.  This means you may dispatch
lower-priority messages from memory (but the highest priority messages that
are in memory) while higher-priority messages languish on disk waiting to
be read into memory (and then immediately dispatched once they are).

Tim
On Dec 10, 2015 8:52 AM, "Jose María Zaragoza" <de...@gmail.com> wrote:

> Hello:
>
> I'm trying to understand how message priority works in AMQ 5.10
>
> I'm reading
>
> http://activemq.apache.org/how-can-i-support-priority-queues.html
>
> and I don't understand this sentence
>
> "Since the message cursors (and client side) implement strict ordering
> of priorities, it's possible to observe strict priority ordering if
> message dispatching can happen from the cache and not have to hit the
> disk (i.e., your consumers are fast enough to keep up with producers)"
>
> Is there a message cursor processing messages from cache ? Or cache is
> implemented as a message cursor ?
> I thought that when "your consumers are fast enough to keep up with
> producers" , messages were moved directly into a dispatch queue for
> the consumer
>
> Thanks and regards
>