Last post Dec 20, 2009 11:54 AM by rilov
Dec 20, 2009 09:49 AM|aspd|LINK
I am going to have a web service which appends rows to a database. These rows will effectively get displayed on a website in order of time added to the database. I'm thinking if there is a problem adding to the database, they should get appended to a MSMQ.
Each row of the msmq will then get added to the db as soon as possible.
Is this a good approach? If so, what is the benefit of using a MSMQ for this?
Dec 20, 2009 11:54 AM|rilov|LINK
MSMQ is used in the situation where you need to provide message-oriented
You can use it when you are developing an asynchronous app, and you need to accept messages and queue them up for a receiver application.
In a typical MSMQ scenario you are not sure that whether your receiver application is available of not. Still you can post the messages to the MSMQ .and whenever the receiver is available receiver will pick up the message and process it.
Say for example in your case. If you feel that in certain period of time your data base is very busy and u don’t want your web service call the update statement to the database when the data base is really very busy.
So you put the data in the MSMQ from your web service and you will write a an application to read the data from the queue and put in to the data base when the data base is free
If you feel like using MSMQ use it. But always remember before using makes sure that your application really needs that.