Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL server Service Broker -- Reading same Message by multiple Users in the queue Expand / Collapse
Author
Message
Posted Saturday, January 30, 2010 4:15 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, September 27, 2010 2:33 AM
Points: 186, Visits: 238
SQL server Service Broker -- Reading same Message by multiple Users in the queue

Can a message in a queue can be read by multiple users?

I have an Admin Role.
Created three users with Admin Role.

I m inserting a message into the queue.
Is it possible to make the message read by all the three users?
Post #856617
Posted Tuesday, February 2, 2010 6:19 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Thursday, June 5, 2014 10:54 AM
Points: 9,294, Visits: 9,480
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.


-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #857891
Posted Tuesday, December 6, 2011 5:31 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, February 13, 2012 6:09 AM
Points: 1, Visits: 8
Hi everybody,
I'm just starting with ServiceBroker and i'm looking for a solution to following problem:
Is there a possibility, to create a new Service / Queue while a user login to the database? I need to send a message to this new connection if changes happens.
How can I attach this to the existing conversations like described from RBarryYoung?
Thanks in advance.
Post #1216962
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse