You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "Suresh, Subashree RTX" <su...@rtx.com.INVALID> on 2023/04/24 16:52:46 UTC

Re: [External] Re: ActiveMQ-5.15.5 : InFlight showing negative number for Queue

Thanks Matt.  Have few questions though


  1.  I see one of the queues dispatched is considerably higher than dequeueCount.   Could you explain little more about the issue and what might be the underlying causes after running without issues all these years?
  2.  My understanding, dequeued messages are already consumed by the consumers, dispatched are messages that are dequeued and inflight. How can we see if the messages are already prefetched and how does it cause to increase queue size??
  3.  Does the bug exist in 5.15.5? Is it fixed only in 5.18.1? We are using activemq-5.17.2 in another application, should we switch that also too 5.18.1??

Thanks,
Suba Suresh
________________________________
From: Matt Pavlovich <ma...@gmail.com>
Sent: Monday, April 24, 2023 11:45 AM
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: [External] Re: ActiveMQ-5.15.5 : InFlight showing negative number for Queue

Hi Subashree-

This is a minor issue that has been fixed since 5.15.5 (recommend upgrading to 5.18.1) that is usually caused by consumers closing or rejecting messages.

Check the ‘dispatchedCount’ and see if it is noticeably higher than the dequeueCount. If so, your consumers are probably closing or rejecting messages that have been prefetched.

Thanks,
Matt

> On Apr 24, 2023, at 10:37 AM, Suresh, Subashree RTX <su...@rtx.com.INVALID> wrote:
>
> We have multiple internal queues which the consumers subscribe to for message retrieval in our application.  Recently we see messages increasing in one of the queue and the consumer is unable to retrieve message from the queue though it exists and the application stops after few tries.  The consumer uses selector to retrieve message and gets message not available response. We can see the message being in the queue using the webconsole.  In the ActiveMQ logs we see the  Inflight showing a negative value when this happens.  The application has been working well for many years.  There is no special configurations set for activemq. It is all default values.  Has anyone seen this issue before??
>
> Thanks,


Re: [External] ActiveMQ-5.15.5 : InFlight showing negative number for Queue

Posted by Matt Pavlovich <ma...@gmail.com>.

> On Apr 24, 2023, at 11:52 AM, Suresh, Subashree RTX <su...@rtx.com.INVALID> wrote:
> 
> Thanks Matt.  Have few questions though
> 
> 
>  1.  I see one of the queues dispatched is considerably higher than dequeueCount.   Could you explain little more about the issue and what might be the underlying causes after running without issues all these years?


Most likely caused by consumer applications using a prefetch (Default is 1000) and then closing before they acknowledge all messages that have been prefetched for them.

>  2.  My understanding, dequeued messages are already consumed by the consumers, dispatched are messages that are dequeued and inflight. How can we see if the messages are already prefetched and how does it cause to increase queue size??

Dispatched is the number of times a messages was sent inflight. So this covers resends to consumers.

>  3.  Does the bug exist in 5.15.5? Is it fixed only in 5.18.1? We are using activemq-5.17.2 in another application, should we switch that also too 5.18.1??

Most of the stats fixes were in later 5.15.x or 5.16.x. Going to 5.18.1 just gets you current to latest patches, no sense doing anything in-between.  5.15.x upgrades to 5.18.x really smooth. Just check the release notes. The only big change off the top of my head is that networkConnectors descreaseNetworkConsumers default value is now ’true’ instead of ‘false’.

Thanks,
Matt Pavlovich