Legacy Dev Forum Posts

 View Only

Sign Up

Notification Service Usage Guideline

  • 1.  Notification Service Usage Guideline

    Posted 06-05-2025 18:47

    skansakar | 2016-08-01 14:51:14 UTC | #1

    Hi,

    What is the usage guideline on using notification service for application with 100+ users, given that you can only create upto 10 channels?

    Should each channel created, have subscriptions for number of agents?


    tim.smith | 2016-08-01 15:00:49 UTC | #2

    From https://developer.mypurecloud.com/api/rest/v2/notifications/notification_service.html

    USAGE GUIDELINES

    Use these guidelines when using the notification service:

    • Channels remain active for 24 hours. To maintain a subscription longer, resubscribe to the topic.
    • You can create up to 10 channels. Additional channels overwrite existing channels by oldest last used date.
    • Each socket connection has a limit of 1000 subscriptions. A 400 response will be returned when subscribing to more than 1000 topics.

    skansakar | 2016-08-01 15:25:48 UTC | #3

    Hi Tim,

    I have seen this and hence the question. :)

    As I can only create upto 10 channels, it means I cannot have one to one mapping between an agent and a channel. Does this mean, on each channel I should be subscribing to notification for multiple users? (say I have 100 concurrent users, does that mean on each channel I need to subscribe for 10 agents? And if it was 200 concurrent users, each channel would have subscription for 20 users etc?)

    At the moment, I am not sure how this would work. What is the recommendation on channel and notifications for users?


    tim.smith | 2016-08-01 16:51:09 UTC | #4

    You can subscribe to any notifications across any channels in any manner that suits you. When you receive a notification, the topicName property will contain the topic that was subscribed to so you can relate the message to a specific subscription you made.


    skansakar | 2016-08-01 18:15:48 UTC | #5

    So what is the advantage of having 10 channels? Can I simply use a single channel for the whole application?

    If I do use a single channel for the whole application, is there any performance impact of just using a single Channel compared to 10?


    tim.smith | 2016-08-01 18:30:02 UTC | #6

    So what is the advantage of having 10 channels?

    10 is more than 1. :) There's not a set purpose for how to segregate channels. It just allows you to segregate in your application if you want to and can fit in 10 channels.

    Can I simply use a single channel for the whole application?

    As long as you need 1000 or less subscriptions, yes.

    If I do use a single channel for the whole application, is there any performance impact of just using a single Channel compared to 10?

    1 channel with 10 subscriptions should behave the same as 10 channels with 1 subscription each. Each channel requires an open socket, however, so less channels is preferred over more for that reason alone.


    skansakar | 2016-08-01 20:47:23 UTC | #7

    Got it. Thanks for the explanation.

    Would it not be better if there was only 1 socket but behind the scene there were 10 channels and this was all stemless from the client?

    1 channel with 10 subscriptions should behave the same as 10 channels with 1 subscription each. Each channel requires an open socket, however, so less channels is preferred over more for that reason alone.

    I appreciate you have said that it should be the same. However so that this does not cause a bottleneck, is there any benchmarks/stats on the performance report, which can be shared?


    tim.smith | 2016-08-01 21:30:59 UTC | #8

    skansakar, post:7, topic:195
    Would it not be better if there was only 1 socket but behind the scene there were 10 channels and this was all stemless from the client?

    "Better" depends on your context. If you have a single instance of an app and you subscribed to one thing on each channel, you're adding the overhead of 9 sockets for no reason. But there are cases for separating them, like the PureCloud UI. Each instance of the app for the user creates its own channel. This means that if you have the app open in multiple tabs, each instance can manage and receive its own notifications without interfering with other instances that are subscribed to different notifications. Because each instance maintains its own socket, the notifications are necessarily kept separate.

    is there any benchmarks/stats on the performance report, which can be shared?

    I'm not aware of any benchmarks that would provide statistics of using a single channel vs multiple.


    anon64849422 | 2016-11-30 19:56:21 UTC | #9

    Also it would be ideal if we could subscribe with additional filters. example: notify for calls for "connect/disconnected" event etc. Currently notification send tonnes of data which in many cases is completely irrelevant to listener !!


    tim.smith | 2016-11-30 20:00:28 UTC | #10

    Would you mind posting your request and use case in the API Enhancement Requests category? Thanks!


    system | 2017-08-28 19:25:43 UTC | #11


    This post was migrated from the old Developer Forum.

    ref: 195