Skip to content

Unsubscribing from metrics in the data pipeline #1071

@shsms

Description

@shsms

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:data-pipelineAffects the data pipelinetype:enhancementNew feature or enhancement visitble to users

    Type

    No type

    Projects

    Status

    To do

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions