Hi Le

Not sure I understand the problem fully so I hope my answer makes sense.
In my usage of ActiveMQ I have many microservices which write and read from
queues.
In my experience the messages become available to the reading activeMQ
client as soon as the writing client has committed the message or batch of
messages. As such there is not really any „delivery time“ required although
I assume the few microseconds between writing and possible reading could
count.

For performance checks I’ve found that the most useful things are load
testing and watching which queues start to backlog -> indicating reader
delays,
Checking logs in the writer and reader processes with special focus on the
difference between read / write timestamps and final commits. If these are
substantially different (if writing 100 msgs in a batch completes but then
takes seconds to get a commit from the ActieMQ server) then there is likely
a disk performance issue.
Final check besides performance testing and clients logs is to setup
monitoring for the max msg age on the various queues. There is
unfortunately no directly accessible exposed metric for this that I‘ve seen
but there are many online examples of how to use scripts to check the age
of the first msg on any queues with pending messages. This first msg is in
general the oldest so this helps alert for issues.

Hope this provides some ideas to progress

On Fri, 20 Dec 2024 at 21:01, Thai Le <lnthai2...@gmail.com> wrote:

> Hello,
> We are using artemis 2.33 and from time to time we receive complaints from
> users that either the message processing is too long or the queue takes too
> long to deliver messages. We want to log some info about the messages when
> they are sent, received, acked,... Is it possible to write a class that got
> triggered when such events (sent, received, acked,..) happen to log the
> necessary info about the message (time + some header related to tenant
> info)? I am not sure if it should write to an external log service or
> simply a text file in a broker so suggestions are all welcome.
>
> Regards
>
> Thai Le
>

Reply via email to