Unsubscribing from metrics in the data pipeline #1071
Labels
part:data-pipeline
Affects the data pipeline
type:enhancement
New feature or enhancement visitble to users
What's needed?
Currently it is only possible to subscribe to metrics from the DataSourcingActor and ResamplingActor, but impossible to unsubscribe. This needs to be supported.
Proposed solution
Track the number of subscriptions received and the number of unsubscribe requests received in both the actors. As soon all subscriptions have received an unsubscribe, the streams can be stopped in these actors. They would also have to unsubscribe from their upstream.
The microgrid client might also have to add support.
We would also have to ensure that the unsubscribe requests are from the original subscribers, and not from once subscriber sending an unsubscribe request twice.
Use cases
Adding this support would be useful, now that we use fallback components, and streams for fallback components can be stopped as soon as the primary components are streaming data again.
If not the CPU overhead could just keep growing over time especially in large locations, as more and more components have intermittent outages.
Alternatives and workarounds
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: