locked
Message Queuing Design Questions RRS feed

  • Question

  • I'm trying to decide on a system design and would like some feedback.

    System Description:
    I have an ASP.NET webapplication hosted on a server. The web application waits for incomming requests and saves the "message" a database on the server.
    I want an application (call it App A) that continually checks the database for new messages. Then App A should check what "type" of message it is, and then send the message to a specific message queue for that message type.

    Next, there would be a receiving application called a parser. A parser can only parse messages with a specific type. A parser would need look at it's queue, and receive messages from the queue.
    It is important to be able to add a new parser to handle new "types" of messages without affecting already running parsers.
    Also it would be nice to be able to stop App A from checking the database for new messages.

    Questions:
    What type of application should I use to build App A?
    What type of application should I use to build the parsers?

    Thursday, July 2, 2009 4:04 PM

Answers

  • You might actually want to look into MSMQ for this type of solution. Then app A and the parsers could be just (pauseable/stoppable) services. If you're working just from the DB then you'd have to either have the apps poll the DB or respond to a notification from a stored proc or trigger.

             -Steve
    Programming blog: http://nitoprograms.blogspot.com/
      Including my TCP/IP .NET Sockets FAQ
    MSBuild user? Try out the DynamicExecute task in the MSBuild Extension Pack source; it's currently in Beta so get your comments in!
    • Proposed as answer by Stephen ClearyMVP Wednesday, July 8, 2009 1:22 PM
    • Marked as answer by BTabios Wednesday, July 8, 2009 4:19 PM
    Thursday, July 2, 2009 4:15 PM

All replies

  • You might actually want to look into MSMQ for this type of solution. Then app A and the parsers could be just (pauseable/stoppable) services. If you're working just from the DB then you'd have to either have the apps poll the DB or respond to a notification from a stored proc or trigger.

             -Steve
    Programming blog: http://nitoprograms.blogspot.com/
      Including my TCP/IP .NET Sockets FAQ
    MSBuild user? Try out the DynamicExecute task in the MSBuild Extension Pack source; it's currently in Beta so get your comments in!
    • Proposed as answer by Stephen ClearyMVP Wednesday, July 8, 2009 1:22 PM
    • Marked as answer by BTabios Wednesday, July 8, 2009 4:19 PM
    Thursday, July 2, 2009 4:15 PM
  • Thanks for the reply Steve.

    I've implemented app A and the parsers as windows services. App A has a timer which queries for new messages in the database at a specified interval. The parsers are also windows services and execute an async receive when a new message is found in it's queue. I've also use MSMQ for the queuing layer.
    Wednesday, July 8, 2009 4:22 PM