We have a struct that we convert to a byte array and pack it into an MSMQ extension property. One of the values in the struct is a TimeToDelay value. We iterate over the received messages looking for a message with a TimeToDelay + arrivedTime value less than the current time. Basically, has the message been in the queue for at least TimeToDelay. If it has then we pull the message out and process it, so not FIFO. I've come across a situation where a customer has put the queue under load and some of the extension byte arrays are received as garbage. The byte array should look something like this:
4A-BF-CE-DB-EB-F3-29-41-BE-37-A5-27-1F-1F-3C-36-03-00-00-00-00-00-00-00-00-00-00-00-01-00-00-00
But instead it looks like:
53-6E-67-3D-48-64-72-2A-6E-6F-74-78-64-65-74-65-63-74-3D-54-72-75-65-2A-63-74-72-6C-67-75-69-64-3D-31-35-37-34-36-35-37-39-37-37-2A-61-70-70-49-64-3D-31-32-35-36-39-35-2A-6E-6F-64-65-69-64-3D-31-37-32-33-34-35-35-36
I've read all over that MSMQ can't be corrupted but I don't see any other explanation. The message is written as the first byte array every time. I also read that MSMQ should always be read FIFO but with no explanation as to why or what the side effect would be if we don't