vernemq_dev_api: add has_session/1 function#13
Conversation
Allow checking if a given SubscriberID has an existing session
|
Hi Riccardo :)
|
|
Hi @ioolkos! If the device has a session and it's currently offline, it will get the data when it reconnects, but if the device doesn't have any session, I want the call to fail informing the user that the delivery can't be guaranteed (in the future we could have an internal mechanism to handle this case). So what I'm interested in is "If I publish with I'm not 100% sure what I've done here is enough or it should be something more like what happens here https://github.com/vernemq/vernemq/blob/master/apps/vmq_server/src/vmq_reg.erl#L186 I've tested locally and for a simple case it works (returns |
|
...and, as usual (rubberduck 🦆), by describing the problem I've probably found the solution: Does it make sense @ioolkos? If that returns |
Allow checking if a given SubscriberID has an existing session