Audit logging of message send and consume events. For example, I'm inspecting headers and properties which are included in the square braces after CoreMessage. (there also can be LargeServerMessage, Reference and PagedReferenceImpl with some additional details and variations)
AMQ601500: User admin(amq)@127.0.0.1:54659 sent a message CoreMessage[messageID=1028, durable=true, userID=7a8579ef-9091-11ef-a78b-207bd234bec6, priority=4, timestamp=Tue Oct 22 16:19:57 UTC 2024, expiration=0, durable=true, address=TEST, size=372, properties=TypedProperties[__AMQ_CID=791483e5-9091-11ef-a78b-207bd234bec6, count=999, ThreadSent=Producer ActiveMQQueue[TEST], thread=0, _AMQ_ROUTING_TYPE=1]]@394224803, context: RoutingContextImpl(Address=TEST, routingType=ANYCAST, PreviousAddress=TEST previousRoute:ANYCAST, reusable=true, version=-2147483644) .................................................. ***** durable queues TEST: - queueID=26 address:TEST name:TEST filter:null ***** non durable for TEST: .................................................. , transaction: null I've found that this part of the event is generated by the toString() method of the Message object, but did not find its definition. вт, 22 окт. 2024 г. в 18:58, Justin Bertram <jbert...@apache.org>: > What specific logging code is in the audit message you're inspecting? > > > Justin > > On Tue, Oct 22, 2024 at 10:25 AM Alexander Milovidov <milovid...@gmail.com > > > wrote: > > > Hi All, > > > > Recently I tried to parse Artemis audit logs to get information about > > message size. It is needed to gather information about client > applications > > that cause the most of the message broker load. > > I mentioned that message headers in the audit log usually include > duplicate > > "durable" property. Is it the same property of the message, or properties > > of two different objects? > > > > For example: > > messageID=123, durable=true, userID=some_uuid, priority=4, timestamp=some > > timestamp, expiration=some expiration date, durable=true, address=TEST, > > size=309, properties=TypedProperties[...] > > > > I also mentioned that message size is not logged in the large message > > header, but it can be extracted from _AMQ_LARGE_SIZE message property. > > And some headers are separated using comma and space, some with comma > only. > > > > By the way, is there a possibility to add metrics with sent/received > bytes > > to each address or queue? > > Is it complicated to implement or may cause significant overhead? > > > > -- > > Regards, > > Alexander > > >