Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSMQ and Logging

Tags:

msmq

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?

like image 348
Eric Avatar asked Sep 15 '11 20:09

Eric


1 Answers

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.

like image 80
tom redfern Avatar answered Oct 14 '22 01:10

tom redfern