locked
Should MSMQ be used for this or not??? RRS feed

  • Question

  • User436443328 posted

    Hi All,

    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?

    Sunday, December 20, 2009 9:49 AM

Answers

  • User-1065464348 posted

    MSMQ is used in the situation where you need to provide message-oriented
    communication.

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, December 20, 2009 11:54 AM