Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Service Bus Notification Hubs

glennblock edited this page Feb 1, 2013 · 31 revisions

This feature will enable developers to send push notifications from their node.js applications simultaneously to hundreds of thousands or mobile clients across IOS and Windows 8. Each message has a tag associated with it. When clients subscribe, they can choose which tags are of interest. As messages are published, Notification Hubs will ensure messages go only to those clients who subscribed to that.

Design

Below is a quick snippet for how to use the new api. In the snippet below a new Notification Hub is created, configuring credentials for both apns and wns. Two messages are then sent with different tags to both IOS and Windows 8 devices.

var azure = require('azure');

var credentials = {
  wns:{
    packageSid: "...",
    clientSecret: "..."
  },
  apns:{
    keyData: "...",
    certData: "..."
  }
}

var nh = azure.createNotificationHub('myhub', credentials)
nh.wns.send("tag1", payload);
nh.apns.send("tag2", payload);
Clone this wiki locally