R
R
Roman2016-06-06 10:38:37
Backend
Roman, 2016-06-06 10:38:37

How to correctly implement a subscription on the site via websocket?

Social network with lots of chats. Implemented a subscription inside the room, it turns out that in order to receive messages from all rooms, you need to subscribe to all available active user rooms.
Or subscribe to the room if it is open and make one general subscription to which all rooms will write that a message has arrived in such and such a room and render it with some kind of beacon on the page.
Or, in general, make only one connection from the page, and on the backend already filter which events this user should receive and which not, on the page all events are processed depending on the page

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question