I use MSMQ to transfer an array byte.
Formatting is this BinaryMessageFormatter.
The final queue is private, and I use direct TCP communication.
The target computer is on a different local network, I get access to it by the external IP address.
There is a firewall that routes incoming TCP communications to the actual destination machine (port forwarding).
So, the system architecture looks like this:
[source machine] -> [destination firewall] -> [destination machine]
I have been using the system for several months and everything went well.
Recently, a firewall has failed.
Apparently, this led to data corruption:
While the transaction queue and message, according to MSMQ, were successfully delivered to the destination computer, the message contents were corrupted.
That is, the code to read the message from the queue raised an exception:
try
{
var message = queue.Receive(readTimeout, transaction);
if (message != null)
{
data = (byte[]) message.Body;
return true;
}
}
catch (Exception e)
{
Logger.Error("error reading queue", e);
}
I had to delete several messages from the (at the top) of the queue, and then the system returned to normal operation.
My question is:
Assuming that the reason for this was only a firewall failure, and knowing that it was a transactional queue, how did it happen that the message was considered delivered?
Doesn't MSMQ perform some kind of checksum to ensure data integrity in transactional queues?