Tuesday 25 November 2014

MSMQ code sends message, doesn't error, but doesn't show

http://stackoverflow.com/questions/9911843/message-does-not-reach-msmq-when-made-transactional

For queue's that you have created as transanctional, you must use the version of Send() that includes the MessageQueueTransactionType parameter. The biggest frustration with this is that it doesn't throw any exceptions or errors as you have seen, but the message just doesn't ever show up.
So, in your code, change:
helpRequestQueue.Send(theMessage); 
to
helpRequestQueue.Send(theMessage, MessageQueueTransactionType.Single); 
 

No comments:

Post a Comment