SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL server Service Broker -- Reading same Message by multiple Users in the queue


SQL server Service Broker -- Reading same Message by multiple Users in the queue

Author
Message
deepakkn
deepakkn
SSC Veteran
SSC Veteran (254 reputation)SSC Veteran (254 reputation)SSC Veteran (254 reputation)SSC Veteran (254 reputation)SSC Veteran (254 reputation)SSC Veteran (254 reputation)SSC Veteran (254 reputation)SSC Veteran (254 reputation)

Group: General Forum Members
Points: 254 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?
RBarryYoung
RBarryYoung
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14754 Visits: 9518
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."
Peter Wollenweber
Peter Wollenweber
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search