Geeks With Blogs


View Anthony Trudeau's profile on LinkedIn

Add to Technorati Favorites

Anthony Trudeau

In my unit tests I'm consistently getting a MessageQueueException when testing an object that queues and receives back messages from a message queue (in this case it is private, but public is supported).  The exception occurs with the first message that is processed through an empty queue and then I don't see it again.

The odd thing about this exception is that the MessageQueueErrorCode does not match up with one of the enumeration values and the Message is a null value.  The MessageQueueErrorCode has a value of -1073741536.  The ErrorCode in these cases is -2147467259.

I found several web pages that talk about people receiving this problem, but no real solution.  Inevitably, my workaround is to check for that value and swallow those exceptions when they occur.  Not elegant, but everything important works as designed in this scenario.

There kind of is a Microsoft Connect submission for this issue.  The main difference is that the submission points to the issue of a missing enumeration value.  Whereas, I believe the issue is a bug in the Framework.  The Connect Id is 206533 if you're curious.

Posted on Thursday, December 31, 2009 4:45 PM .NET , bugs | Back to top

Comments on this post: Odd Error on ReceiveCompleted Operation of MessageQueue

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Anthony Trudeau | Powered by: