[GH-ISSUE #399] Allow for adding/removing topic subscriptions via single WebSocket #306

Open
opened 2026-05-05 03:59:11 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @mrherman on GitHub (Sep 13, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/399

Currently, you must list all topics to subscribe to when you create a WebSocket. A useful feature would be to allow the client to add/remove subscriptions on an established Web Socket connection. This would allow clients that listen to many topics, especially when not all are known in advance, to use one socket connection instead of many. This has a few usecases:
Allows for better resource management on the client (and server?), since one socket connection and thread can handle multiple topics easily.
Allows for dynamically named topics to be used easily, in particular one-off or topic names that are made after a connection is established.
The ability to unsubscribe topics that aren't needed will ensure the server doesn't have to manage unneeded resources (such as a long list of topic names associated with a web socket), this will be particularly needed if dynamically generated random topic names are frequently used and the server/client are long lived.

Originally created by @mrherman on GitHub (Sep 13, 2022). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/399 Currently, you must list all topics to subscribe to when you create a WebSocket. A useful feature would be to allow the client to add/remove subscriptions on an established Web Socket connection. This would allow clients that listen to many topics, especially when not all are known in advance, to use one socket connection instead of many. This has a few usecases: Allows for better resource management on the client (and server?), since one socket connection and thread can handle multiple topics easily. Allows for dynamically named topics to be used easily, in particular one-off or topic names that are made after a connection is established. The ability to unsubscribe topics that aren't needed will ensure the server doesn't have to manage unneeded resources (such as a long list of topic names associated with a web socket), this will be particularly needed if dynamically generated random topic names are frequently used and the server/client are long lived.
gitea-mirror added the
enhancement
server
labels 2026-05-05 03:59:11 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ntfy#306
No description provided.