MSMQ and Logging
Asked Answered
P

1

7

I have a situation where I'd like to keep a history or log of all MSMQ messages which have been processed (at least for a period of time). I realize that I can look at the current Queues using Computer Management -> Services and Applications -> Message Queuing. But what I'd like is a history or log of the messages which have already been processed.

I have so far been unable to find a non-programmatic way to do this. Ideally, it's a simple as setting an MSMQ property so that all messages get logged to either a file or even the windows log.

Does anyone know if this (or something similar) is possible?

Pickerelweed answered 15/9, 2011 at 20:11 Comment(0)
N
7

You can do this with target journaling. This is assuming you want to store the message on the receiving machine? From MSDN:

Target journaling is the process of storing a copy of incoming messages. It is configured on a queue basis. When target journaling is enabled, a copy of each incoming message is placed in the target-journal queue when the message is removed (read) from the target queue. A target-journal queue (Journal) is created for each queue when the queue is created. MSMQ Explorer displays target-journal queues under each public queue.

Narial answered 15/9, 2011 at 20:54 Comment(1)
Important note - all these journal messages will consume resources so don't leave them to accumulate for too long. More than a million messages in the journal queues is not going to be a good thing.Burwell

© 2022 - 2024 — McMap. All rights reserved.