0
votes

I have enabled message delivery logs on our Artemis instances using broker plugins according to this page. To draw some analytics by mapping end to end message delivery and receipt timings between publisher -> artemis server -> subscriber, I'm trying to see if the contents of the message that are being logged to artemis log file (To be specific Message ID) can be accessed by the publishing and subscribing .NET applications we have. Below are logs from the artemis.log file for a message with MessageId indicating various events.

20:50:24,552 INFO [org.apache.activemq.artemis.core.server.plugin.impl] AMQ841010: routed message with ID: 2231685496, result: OK

20:50:24,552 INFO [org.apache.activemq.artemis.core.server.plugin.impl] AMQ841009: sent message with ID: 2231685496, session name: 9d9c035b-176e-11ea-ab75-020ff9805db8, session connectionID: 68a7ec34, result: OK

20:50:24,553 INFO [org.apache.activemq.artemis.core.server.plugin.impl] AMQ841012: delivered message with message ID: 2231685496, to consumer on address: News.Source.T, queue: f0586137-5ad3-4c77-b2c7-5b68daad672c, consumer sessionID: fcbcd194-3295-11ea-a2c0-0a89c5c4c02a, consumerID: 0

20:50:24,554 INFO [org.apache.activemq.artemis.core.server.plugin.impl] AMQ841014: acknowledged message ID: 2231685496, messageRef sessionID: fcbcd194-3295-11ea-a2c0-0a89c5c4c02a, with messageRef consumerID: 0, messageRef QueueName: f0586137-5ad3-4c77-b2c7-5b68daad672c, with ackReason: NORMAL

We are using AMQPNetLite for this and haven't found anything that can help us tie these messages sent and received to the logs that are being written to the artemis.log file. I've been looking to understand if there is a way to get a hold of the MessageId from these logs on the publisher application. Any pointers on this topic are much appreciated.

1

1 Answers

0
votes

Messaging clients can't get data from the broker's log files since that data is just in a text-based log and not actually in the message broker itself. However, you could use something like the NotificationActiveMQServerPlugin which, instead of logging this information, will actually send messages with this information to the management notification address. Clients can create subscriptions on the management notification address and receive the messages and then take action based on that information. The notification messages may not contain all the information you need, but you can easily extend this class to create your own plugin which includes all the information you need.