Skip to content

AsyncMonitoredItem: mpsc is not suitable for discard_oldest = true #266

Description

@uklotzde

The last value could get lost silently on the client-side, even if older values are dropped within the open62541 queue:

let _unused = tx.try_send(payload);

A broadcast channel would be more suitable. For monitoring data values even a watch channel might be sufficient. It all depends on the use case.

Allowing clients to register a custom FnMut callback would support all these use cases, without the need for making an opinionated decision. A callback implementation would be independent of tokio, although AsyncSubscription still requires tokio.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions