locked
WCF Routing Service to route messages from database RRS feed

  • Question

  • HI,

     I would like to know,if a wcf service hosted as windows service can read messages from a database table and route those messages based on its content.

    If we can, please give me details on how i can make it possible.

    Friday, March 2, 2012 8:59 AM

All replies

  • Hi,

    Please provide more details on the scenario you are looking for.

    If you are looking like a Queue concept where a WCF Client can listen to a MSMQ Endpoint and route messages accordingly then there is no SQL Endpoint available.

    In such scenario in your service you may check the SQL Database Table and if any row exist process it using your code and route it accordingly.

    For more advanced scenarios you can refer to WCF LOB.

    http://msdn.microsoft.com/en-us/library/bb798090.aspx

    But SQL Server is not meant for handling messages in this scenario. The best solution is to use MSMQ.

    The below scenario will help with SQL Dependency.

    http://rusanu.com/2007/11/01/remove-pooling-for-data-changes-from-a-wcf-front-end/

    in all these cases it is not easy to handle message and process which is very easy to do with WCF 4 / MSMQ Endpoint and Routing Table.

    Thanks,


    Welcome to MSDN Forums. Feel free to ask your questions and Please Note to Vote helpful topics and Mark answering posts. Sudhakar

    Friday, March 2, 2012 9:14 AM
  • There will  a website that will be inserting messages into the table (queue) .I'm planning to have sql service broker send these messages to a separate queue, from where a wcf client can pick these messages and send to wcf endpoints and update the status/delete the message from the queue.

    Will this be a viable solution in terms of performance and scalability.

    Friday, March 2, 2012 1:56 PM
  • Hello, as far as WCF is concerned, what do you want to achieve? First you talked about route messages based on content, later you talked about send messages to a queue. What are you actually trying to achieve? You also mentioned two queues. What are they? Are they MSMQs? Do you want to use the queue as a communication mechanism, or do you want to store some data?

    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    If you have feedback about forum business, please contact msdnmg@microsoft.com. But please do not ask technical questions in the email.

    Sunday, March 4, 2012 1:17 PM