Azure Notification Hubs vs Service Bus for Mobile push notification

Casper Rubæk 246 Reputation points
2022-07-29T14:15:21.897+00:00

I would like to know if Service Bus could be a suitable alternative for sending push notifications to mobile devices.

I understand both Notification hub architecture and Service Bus and it got me wondering if you could actually just have a Service Bus topic subscription that mobile devices subscribe to which contains the payload for displaying a push notification.

What would be the pros and cons of this approach, what does Notification Hubs deliver as well besides some analytics?

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
257 questions
Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
542 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,817 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 68,066 Reputation points
    2022-08-01T10:24:10.397+00:00

    @Casper Rubæk Thanks for reaching out.

    Service Bus is a fully managed enterprise message broker with message queues and publish-subscribe topics. The service is intended for enterprise applications that require transactions, ordering, duplicate detection, and instantaneous consistency. I will not suggest you to leverage the service bus for push notification to mobile devices as there would be multiple issues as you need to manage the device registration (adding, deleting, tag feature etc.) along with the mapping of individual devices to the individual subscription at your end. Your individual devices will be connecting to the single subscription for getting the message content of your notification. There is a limitation of 2K subscription per topic so you can only have 2K subscription, but you can auto forward feature. As the service bus is the pull model your devices should always be checking if there is any message that is available to be consumed. It will be more like building your own solution for handling all the features that notification hub already provides for you.

    Notification Hub already provides an easy-to-use and scaled-out push engine that enables you to send notifications to any platform (iOS, Android, Windows, etc.) from any back-end (cloud or on-premises). Notification Hubs works great for both enterprise and consumer scenarios. Notification hub passes the notification to the PNS handle and PNS handle is the one who is responsible to deliver the messages to your devices.

    Let me know if you have any queries or concerns.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful