Question : 2 questions about messagequeue

Dear All,

I have 2 questions ask for help & suggestion:

1) I use MessageQueueTransaction (ie object is called "mqt") to receive my msmq and do other stuff. In the "try .. catch" block, if there is error, I call mgt.Abort();


What I want to achieve is: if there is error receiving or precessing that msmq, put it back to the end of system queue, because I don't want that one just by pass. How could I do that?



2) I found when I create the private messagequeue in "My Computer --> Manage --> Services and Applications --> Message Queuing", I must create NON-transactional one. If I create transactional one, no matter how did I program in my send() and receive() methods, the msmq cannot be sent & received.  Does anyone know why?


Thanks heaps!

 

Answer : 2 questions about messagequeue

Instead of always repassing the message back in you queue you might want to transfer those messages into a "bad messages" queue to not stress your system that much.
If you are using Vista you have a bunch of opportunities to do that.
Best would be a poisoned letter queue.

Microsoft has a very helpful article on that:
http://msdn.microsoft.com/en-us/library/ms789028.aspx
Some of the show techniques suit for W2K3 Server and Windows XP, too.

as far as I can see there is not a limit of ids that will be reached fast - of course there will be one somewhere. I was not able to find an info about that on the net.

There is a good blog that discusses some of the limitations of msmq;
http://blogs.msdn.com/johnbreakwell/archive/2008/02/29/what-are-msmq-s-limits-if-i-had-a-farthing-for-every-time.aspx

 
Random Solutions  
 
programming4us programming4us