Bugfix: Follow the live topics over one connection
Description
The real-time client opened a connection to the hub for every topic. A browser keeps only six connections per host open over HTTP/1.1, and a manager's team tab of the dashboard follows six topics, so the requests of its widgets waited forever and the team presence stopped updating. A page now follows all its topics over one connection; every update carries its topic as the event type.
A component that subscribed while the page still waited for the token of the topics before it also started a second token request. When the older one answered last, the connection was opened with a token that lacked the newest topic. The client now uses only the answer to its latest request.
Impact
Live updates and the requests of a page no longer compete for connections, however many widgets it shows. Updates
published through Mercure set the event type to their topic; a client of the hub other than the
real-time client listens for that type instead of message.