You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by osatien <os...@gmail.com> on 2015/02/19 15:34:20 UTC

queued messages more than dequeued

hello,

in topics overview i am seeing that dequeued messages are much more that
queued messages. how can it be possible?



--
View this message in context: http://activemq.2283324.n4.nabble.com/queued-messages-more-than-dequeued-tp4691763.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: queued messages more than dequeued

Posted by Tim Bain <tb...@alumni.duke.edu>.
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 <os...@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" <ar...@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.
> >
>

Re: queued messages more than dequeued

Posted by ALi <os...@gmail.com>.
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" <ar...@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.
>

Re: queued messages more than dequeued

Posted by artnaseef <ar...@artnaseef.com>.
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.