activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: queued messages more than dequeued
Date Mon, 23 Feb 2015 00:01:11 GMT
It wasn't clear in your second email what you were asking.

To re-iterate what Art said, for Topics the enqueue count goes up once per
message and the dequeue count goes up once per message per subscriber that
consumes that message.  This can mean that for N consumers, you'll get N
dequeues for each enqueued message if each message matches the selector for
each consumer.  Or it can mean that you'll get 0 dequeues if each message
fails to match the selector for each consumer.  Or it can mean anything in
between, depending on the specifics of how each message matches up against
the selectors for each consumer.  And of course a message that is still in
the consumer's dispatch queue won't yet be counted as dequeued (though it
will be once the consumer actually consumes it), so that's a second reason
that the dequeue count could sometimes be less than you'd expect.

So if you have no selectors and your consumers are faster than your
producers and if all consumers subscribed before the first message was
sent, then yes, the dequeue count will be linear with the number of
consumers.  But if you have selectors that exclude some messages for some
consumers, or consumers that subscribe after messages began flowing, or
consumers that are running slow and have messages in their pending queues,
then the dequeued count won't be linear.  Does that answer your question?

On Thu, Feb 19, 2015 at 3:26 PM, ALi <osatien@gmail.com> wrote:

> But there are more than one connected and it is not as I expect one
> subscriber one ack two subscriber two ack?? It is not linear isn't it?
> El 19/02/2015 22:54, "artnaseef" <art@artnaseef.com> escribió:
>
> > The dequeue count for Topics is based on the numbers of subscribers, so
> it
> > will be higher than the enqueue count when more than one subscriber is
> > active.
> >
> > Unlike Queues, statistics on Topics are generally less useful than those
> on
> > the individual subscriptions.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/queued-messages-more-than-dequeued-tp4691763p4691792.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message