Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Consuming MSMQ at a faster speed using asp.net C# console application

$
0
0

I currently have a console application that has this algorithm

Consume from MSMQ using Peek

Get message out from MSMQ , do sql insert statement

if insert is successful, get message out from MSMQ using Receive()

Using the above consumes 20 messages from MSMQ /sec(20 sql tx per sec), with 1 consume thread

Now , I would want to increase the threads consuming MSMQ , however I discovered that messages get inserted 2 times compared to 1, using peek.

But if I use receive instead of Peek(), if sql statement fails, I have to throw back the object back into the MSMQ?

Please advise.



Viewing all articles
Browse latest Browse all 31927

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>