Publisher callback for new subscriber #1850
Replies: 2 comments 1 reply
-
|
@kdkavanagh What are you trying to achieve? |
Beta Was this translation helpful? Give feedback.
-
|
My specific interest here is for the publisher to be notified of a new subscriber and publish a conceptual "hello" message over the stream every time a new subscriber joins. Specifically, it's important for this message to be in the same stream that the subscriber has joined (vs some side-band channel, where a request/response protocol could be implemented), to allow the hello message to be sequenced amongst the other messages flowing thru the stream (It's okay for all other existing consumers of the same stream to receive the hello message, in this case). I could achieve this by having the publisher continually poll a separate stream which new subscribers ping when they join the main stream, but this feels like overkill, especially since I think the media driver already has sufficient info to alert on new subscribers It would also be helpful to have for logging / observability purposes |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any mechanism for a publication to receive a notification that a new subscriber has joined to the stream? Polling
Publication::isConnectedisnt sufficient, as that only indicates that there is 1+ subscribers, rather than the subscriber count or other more-detailed information about the subscribers.I assume that the publisher does have this information under the hood to support flow-control - Wondering if it's exposed in a public API somewhere
Beta Was this translation helpful? Give feedback.
All reactions