> Trying to understand the resetMessageCounter() API. Does this reset all
the queue counters to 0? Also, does it set a reset time, which we can
leverage further? If yes, which field would signify that?

Calling resetMessageCounter() will reset count, countDelta,
messageCountDelta, lastAddTimestamp, & udpateTimestamp.  The messageCount
is not reset as it comes directly from the underlying queue.  No reset time
is set.

> How can we determine the number of messages added/enqueued to a queue
since the last reset time?

Use the "count" property.

> How do we determine  the number of messages consumed/dequeued from a
queue since the last reset time?

I don't believe you can determine the number of messages consumed/dequeued
from a queue since the last reset time.  However, you can determine the
number of messages consumed/dequeued from a queue since the last counter
update by subtracting "messageCountDelta" from "countDelta."

> For 2 above, I do see a getMessagesAdded() API which states that this
returns the number of messages added to the queue since it was created. If
the queue message counters are reset, would this API still return number of
messages added since the queue was created or since the last reset?

Resetting the message counter has no impact on the metrics available on the
QueueControl itself.  If you want to reset the value returned by
getMessagesAdded() then you should call resetMessagesAdded() on the
QueueControl.

> Is there an API to get the high queue depth or the maximum number of
messages in a queue since the last reset time?

No.

> If there are no APIs that answer 2, 3, 4 and 5 above, can we somehow
derive or calculate these values from an API that Artemis provides today?

It varies.  I've included possible alternatives in the previous answers
where applicable.


Justin

On Mon, Jun 25, 2018 at 1:33 PM, Neha Sareen <neha.sar...@oracle.com> wrote:

> Iterating point 1 again,( not sure how this was converted to a Hyperlink)
>
> 1. Trying to understand the resetMessageCounter() API. Does this reset all
> the queue counters to 0? Also, does it set a reset time, which we can
> leverage further? If yes, which field would signify that?
>
> Thanks
> Neha
>
> -----Original Message-----
> From: Neha Sareen
> Sent: Monday, June 25, 2018 10:38 AM
> To: users@activemq.apache.org
> Subject: Questions on queue message counters
>
> Hi,
>
>
>
> We are working with Apache Artemis 2.4.0 and have some questions related
> to the queue message counters.
>
>
>
> I have been looking at the org.apache.activemq.artemis.
> api.core.management.QueueControl interface to get info around the queue
> message counter related APIs.
>
>
>
> 1.       Trying to understand the HYPERLINK "https://urldefense.
> proofpoint.com/v2/url?u=https-3A__activemq.apache.org_
> artemis_docs_javadocs_javadoc-2Dlatest_org_apache_activemq_
> artemis_api_core_management_QueueControl.html-23resetMessageCounter-2D-2D-
> 2522resetMessageCounter-28-29&d=DwIFAg&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIr
> MUB65eapI_JnE&r=a9YS1Z_IlHjjwrEIkK3pngi5xaGRZ0QdCmbyVuaLSBU&m=
> gkYvDx8RnaT70E66rKs5Jo0OkjeMVwp9CiHP_MPUCDI&s=
> 9whYnHNIAmfwgvYeuoC9Fl04FVLqiytMuwsvYGS9z1Y&e= API. Does this reset all
> the queue counters to 0? Also, does it set a reset time, which we can
> leverage further? If yes, which field would signify that?
>
> 2.       How can we determine the number of messages added/enqueued to a
> queue since the last reset time?
>
> 3.       How do we determine  the number of messages consumed/dequeued
> from a queue since the last reset time?
>
> 4.       For 2 above, I do see a getMessagesAdded() API which states that
> this returns the number of messages added to the queue since it was
> created. If the queue message counters are reset, would this API still
> return number of messages added since the queue was created or since the
> last reset?
>
> 5.       Is there an API to get the high queue depth or the maximum number
> of messages in a queue since the last reset time?
>
> 6.       If there are no APIs that answer 2, 3, 4 and 5 above, can we
> somehow derive or calculate these values from an API that Artemis provides
> today?
>
>
>
> Would appreciate if someone can clarify these.
>
>
>
>
>
> Thanks
>
> Neha
>
> Oracle Marketing Cloud
>
>
>

Reply via email to