Hi Morten,
How are you and the other guys doing?
On Win7 you don't use the FlatQueueStrategy, but the SubQueueStrategy, since Win7 uses MSMQ 4.0 which supports sub queues.
Not sure if your problem is caused by an error in the SubQueueStrategy.SendToErrorQueue method, but it seems to behave differently than the one in the FlatQueueStrategy used on WinXP. Try Comparing the following code:
SubQueueStrategy.cs:
public void SendToErrorQueue(OpenedQueue queue, Message message)
{
queue.Send(message);
}
FlatQueueStrategy.cs
public void SendToErrorQueue(OpenedQueue queue, Message message)
{
using(var errQueue = new MessageQueue(GetErrorsQueuePath()))
{
// here we assume that the queue transactionalibilty is the same for the error sibling queue
// and the main queue!
errQueue.Send(message, queue.GetSingleTransactionType());
}
}
It seems that the implementation doesn't take the error queue into account?
As a work around, try using the below method instead:
queueStrategy.TryMoveMessage(queue, message, SubQueue.Errors,out msgId)
Anyone has an idea, whether this is a bug?
Say hi to everyone from me :)
Regards
René