Message order, duplication; Transactions

Unanswered Message order, duplication; Transactions

  • Tuesday, July 26, 2011 10:34 PM
     
     

    The introduction to Service Broker (SB) at http://msdn.microsoft.com/en-us/library/ms345108(v=sql.90).aspx says that message order is retained and that duplicate deliveries never happen. In MSMQ there is a sender queue and a receiver queue, and this seems to cause the message ordering or duplication problems in MSMQ. (Correct me if I'm wrong.) SB has similar sender and receiver queues (when the sender and receiver are on different machines), so why wouldn't SB have the same problem?

    Btw why is MS silent in the official documentation, namely the MSDN Library, on where to use MSMQ and where to use SB? I have come several across posts here on the same topic but none in the MSDN Library.

    A question on transactions: I think I've read that SB eliminates the overhead of the DTC to be in the same transaction as another database operation. But this is only if I use the same database server instance for both the 'regular' operations and the message queuing. I may want to have SB do the queuing on another box so as to distribute the load. In this case if I need it in the same transaction as the main db operation, DTC would still be used, right?

    -Venkatesh