I see you're using a metrics plugin. Is this what you're using to determine
the message count? If so, do you have any other way to determine the
message count (e.g. directly from the queue's MBean) in your embedded
environment? I'm asking because I want to eliminate the possibility that
something is breaking with the plugin itself or with the integration
between the plugin and the broker. If not, you can rely on the `artemis
data print` as the ultimate source of truth here.

It might also be worth inspecting the consumer count and delivering count
on the queue where the message count doesn't go to 0 to ensure the broker
knows about the consumers and to see whether or not it has dispatched
messages to them.

Regarding message expiration, are you setting this on the producing
application when you send the message? If not, then they won't expire by
default.


Justin

On Thu, Jan 5, 2023 at 6:00 AM Fredrik Jonson <fred...@jonson.org> wrote:

> Hi,
>
> Justin, thanks for your advice. I must say, the help given in Apache
> communities and on mailinglists are awesome. Cheers everyone! :)
>
> The reasons I believe the count is wrong are: For the period of a few weeks
> now, I have performed a handfull of orderly shutdowns and starts of the
> embedded broker with no change in message count. F.x one queue consistently
> never goes below 146. That queue always have consumers which should consume
> all messages on the queue, without selectors. Despite the consumers sitting
> ilde at times during the period, the count stays at 146 as a minimum.
>
> I have copied the files so I can analyze it further on a test system. I'll
> check if I can see anything illuminating with 'artemis data print' and try
> to see if I can reproduce the issue.
>
> If the messages really are there, perhaps there's an issue with
> delivery/consumption of those particular messages. I believe they should be
> expired automatically, but perhaps something is wrong with my
> implementation, application logging or DLQ configuration. I'll check.
>
> Obviously too soon to rule out PEBCAK yet. Anyway, I'll get back to you
> with
> my results. Thanks again!
>
> regards / Fredrik Jonson
>
> In <CAF+kE=Q_KhgAb2fY_uGta2M2pj_XHUgWiCOBLe0xWp=sgag...@mail.gmail.com>
> Justin Bertram wrote:
> >
> > > Is there anything I can do to encourage Artemis to perform a "recount"
> > > of the messages that actually are persisted in the queues?
> >
> >  The broker should recount the messages every time it starts and loads
> the
> >  journal from disk. You could use the `artemis data print` command to
> take
> >  a close look at the journal while the broker is shutdown, e.g.:
> >
> >  ./artemis data print --journal /path/to/journalDirectory --paging
> >  /path/to/pagingDirectory --large-messages /path/to/largeMessageDirectory
> >  --bindings /path/to/bindingsDirectory
> >
> >  Out of curiosity, why does it appear that those message counts are
> >  inaccurate? If you attach a consumer to that queue do you not get any
> >  messages even though the message count is > 0?
> >
> >  Would you be willing to upload your data directory somewhere so I could
> >  take a look?
> >
> >  Justin
>
>

Reply via email to