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.
The last value could get lost silently on the client-side, even if older values are dropped within the open62541 queue:
open62541/src/callback.rs
Line 147 in c0ee4a3
A
broadcastchannel would be more suitable. For monitoring data values even awatchchannel might be sufficient. It all depends on the use case.Allowing clients to register a custom
FnMutcallback would support all these use cases, without the need for making an opinionated decision. A callback implementation would be independent oftokio, althoughAsyncSubscriptionstill requirestokio.