Home Forums Programming Service Broker SQL server Service Broker -- Reading same Message by multiple Users in the queue RE: SQL server Service Broker -- Reading same Message by multiple Users in the queue

  • Technically, yes, multiple users can "read" the same message, but this trick lacks queuing delivery and synchronization control and is almost certainly not what you want.

    If you want "guaranteed multiple delivery" to multiple receivers, then no that is not built-in to Service Broker, but it is not hard to implement it yourself. You have to first make three new copies of your delivery queue and attach your three receivers each to one of these. then you need to use your original delivery queue as an intermediate queue and service it with an activation procedure that receives a new message and then sends three copies of it, one to each of the new delivery queues. Finally, the receive-copy-send(x3) sequence of the intermediate activation procedure needs to be wrapped in a transaction to insure the multiple-delivery feature.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]