Closed
Description
At https://symfony.com/doc/current/mercure.html#subscribing it is described how to subscribe to multiple topics:
const eventSource = new EventSource("{{ mercure(['topic1', 'topic2']) }}");
But when looking at the received data, how is it possible to know which is coming from topic1 and which from topic2?
At https://stackoverflow.com/a/71905295/1668200 it is suggested to use Update()
s fifth argument $type
, and in JavaScript add multiple event listeners to EventSource
. Is this really the recommended way? If yes, then the recommendation would be to use the (more or less) same string for $topic
and $type
?