astarte-platform/astarte-message-hub

Missing calls to Astarte handler `run` function

sorru94 opened this issue · 0 comments

The Astarte handler run function is not called within the AstarteMessageHub.
I propose two different approaches:

  • Exposing a run function for the AstarteMessageHub, containing a call to the run function of the Astarte handler. This function however would need to be called in a separate thread due to its blocking nature. This would require the clone trait to be implemented for the AstarteMessageHub struct.
  • Starting a separate tokio task within the initialization function of the AstarteMessageHub in which to call the run function.