Hi,
I wanted to implement a microservice that listens to all operations for all devices in a specific tenant.
I am aware of that one WS connection could be shared when the device are using the same subscription name.
So I tried to implement that but I’m currently confused and stuck by the concepts the SDK is offering me.
Here are my concrete questions:
-
I can create one subscription of type “mo” with a filter “operation”. This subscription is always bound to a source / single device, so there is no option to add multiple sources / devices per subscription, correct? How can I use the same subscription name for multiple devices? Just creating n-requests for each device and the same subscription name? Or should I retrieve the subscription with the same name and just change the source? How can I identify the n subscription if they all share the same name e.g. if I want to unsubscribe?
-
The token that I need is bound to a subscriber ID and a subscription. Is my assumption correct that I just need one token after I created n subscriptions with the same name?
If my assumptions are wrong. How do I re-use the same WS connection for multiple devices? Are there any examples?