Wednesday, March 21, 2012

Multiple devices for a subscription

We have a need to send events out to multiple devices for a single subscription, the user may be able to decide what devices with what subscriptions. So far we have the following two ideas for accomplishing this:

1) create a multiple subscriptions, one for each device the user wants the events to go to
2) create a multiple unique device entries for each subscription


So far as I’ve been able to tell there is no transaction support when using the notification services API, so having to update multiple records for a single subscription can lead to further maintenance issues if the updating were to fail part way through.

Is there a simpler way to have events for a single subscription to go out to multiple devices?

Typically you want to separate out subscriber management from subscription management in your application.

In subscriber management you would want the subscribers to configure which devices they have. This typically would happen only once and this list of devices is maintained only once in the instance database/schema. This list of subscribers and their respective devices is common across all applications and maintained only once per instance.

Yes, during subscription management the subscriber would need to create a subscription for each of their devices (your option 1), to ensure the notification is sent to each device.

You correctly cite, there is no transaction support when adding devices or subscriptions. We will evaluate support for for this in next release as we have received this request before in different forms.

Thanks,
Anand

|||

Next release? you mean the 2005 gold release? or next version of SQL server and notification services?

We need the ability to show the user one subscription with multiple devices, so we will handle creating the devices and multiple subscriptions on the back end, and to abtain transaction support we may have to go directly to the stored procedures for the time being.

|||Sorry, I should have been more clear. By next realease I meant the release AFTER SQL Server 2005.|||

Check out this related thread. It links to a posting from Shyam that offers a clever alternative for the current version.

http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=72056
--
Joe Webb
SQL Server MVP


~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811

I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)

No comments:

Post a Comment