Friday, March 23, 2012

How could I notify new subscribers with previous data?

Hi!

I have my NS running. Subscribers are reciving notifications right. How could I send past notifications to new users . Could it be possible?

I think we have all the previous data (the event data table as the notification table) what do you think is the best way or approach to do it?

i.e:

Insert an action item asigned to a user in my DB. If the user has a subscription to it, NS generate a notification and send an email to the user. In my case this user is not a subscriber yet, I add him 2 days after. How could I send the notification thas had been created for him before?

Regards ;)

If I ever have this problem, I will probably play with checking the <myNSApplicationName>Notifications table and look for the data matching the same criteria as those specified by this "late" client in his subscription(s).

...unless it's been already vacuumed, of course.

|||

Assuming this is a scheduled subscription, you can use a chronicles tables to keep track of the last time a subscription was processed. For new subscriptions, the datetime column should be set to something like '1900-01-01 00:00:00.000' so that it will match everything.

After the match, you then update the LastProcessedTime column of the chronicles table with the current datetime. That way, future quantums will only send the most recently added event data.

HTH...

Joe

No comments:

Post a Comment