When a sensor driver publishes an FoiEvent for a new FOI, the sensorhub node registers the feature asynchronously. However, there is no way for the sensor to find out when the asynchronous registration is complete. If the sensor immediately emits a DataEvent for the new feature, it will often fail with an "Unknown FOI" exception.
Should handleEvent(...) call .get() on the CompletableFuture returned by register?
When a sensor driver publishes an
FoiEvent
for a new FOI, the sensorhub node registers the feature asynchronously. However, there is no way for the sensor to find out when the asynchronous registration is complete. If the sensor immediately emits aDataEvent
for the new feature, it will often fail with an "Unknown FOI" exception.Should
handleEvent(...)
call.get()
on theCompletableFuture
returned byregister
?