Search code examples
storagemsmqremote-servertransactional

msmq should storage match on sending and recieving servers


I am trying to send a load of messages to MSMQ in transactional. Had a storage issue and we bumped up the msmq storage on the receiving machine, with storage as is (1GB default) on sending machine. We still are receiving issue, and wanted to confirm if the storage should match up for both sending and receiving machines. Please let me know if you have come across a similar issue, and what should be the ideal solution.


Solution

  • With transactional messages, the message exists as follows:

    1. Message visible in outgoing queue on sender
    2. Message visible in destination queue on receiver; message invisible in outgoing queue on sender, pending ACK message
    3. Message visible in destination queue on receiver

    So you will expect to have a time when a message takes up space on both machines. That shouldn't be for long, though, so you don't need to match storage sizes on sender and receiver. Storage capacity should instead be set for a 'worst case' scenario. So assume a network outage. What is the maximum volume of unsent plus unacknowledged-but-sent messages you want to have sitting in the outgoing queue on the sender before you declare an emergency. Similarly, assuming the app on the receiver has crashed, what volume of unprocessed messages in the destination queue constitutes an emergency?

    Storage limits are there to protect your server.

    1. They prevent the hard drive filling up (important)
    2. They prevent kernel memory exhaustion (VERY important - see #4 https://blogs.msdn.microsoft.com/johnbreakwell/2006/09/18/insufficient-resources-run-away-run-away/)

    So storage limit should be high enough to accommodate worst case scenarios but low enough to avoid exhausting kernel memory.