Writing in MSMQ's personal journal

If you are doing some testing and want to enable journal messages so you can track what's going on, make sure you know what sort of journaling you've picked because there are two types:

 

Positive Source Journaling

If you set the MESSAGE to Journal (via application code) then this tells the Sending queue manager to put a copy in the "Journal messages" queue under "System Queues" in Computer Management on the sending machine. This copy is only created when the message successfully leaves the machine. 

 

Negative Source Journaling

If you set the MESSAGE to Dead Letter (via application code) then this tells the Sending queue manager to put a copy in the "Dead-letter messages" or "Transactional dead-letter messages" queue under "System Queues" in Computer Management on the sending machine. This copy is only created when the message fails to leave the machine (or fail to be read in the case of transactional messages).  

 

 

Target Journaling 

If you set the QUEUE to Journal (via ticking the "Enabled" box) then this tells the Receiving queue manager to put a copy in the "Journal messages" queue under the destination queue in Computer Management on the receiving machine. This copy is only created when the message is successfully read from the queue.

 

 

Important Notes

  • The sending machine is not always the machine you think it is. If you are making use of Routing Servers then each machine is a sender to the next one in the chain. Messages can therefore fail to send at any point so check the System Queues on all of the servers.
  • MSMQ will not clean up journal messages for you. Unless you have some process in place, be it automated or manual, to purge the queues or process these messages then your machine will eventually implode.To prevent this happening:
    • Use Performance Monitor to check how many Journal messages there are in the system.
      • On the sender: "MSMQ QueueMessages in Journal QueueComputer Queues"
      • On the receiver: "MSMQ QueueMessages in Journal Queue<serverqueuename>"
    • If you enable the Journal property of a queue, make sure you also choose "Limit journal storage to (KB):"
    • If you enable the Journal property of a message, make sure you also choose  "Limit journal storage to (KB):" in Storage limits for the sending machine.