eclipse-velocitas / vehicle-app-python-sdk

vehicle-app-python-sdk
Apache License 2.0
7 stars 18 forks source link

[Bug]: App loose connection to MQTT #102

Closed sdvbernd closed 11 months ago

sdvbernd commented 11 months ago

Severity

Medium

What release version, tag or commit-hash did you use?

current

Current Behavior

After some time (~ 5 minutes) it is not possible to publish MQTT-messages to the MQTT-broker anymore. The logs do not show any error. The connection to MQTT-Broker is not generally lost, because the receipt of messages still works.

Example app: https://github.com/SoftwareDefinedVehicle/seat-adjuster

Steps to Reproduce

  1. Start app
  2. Wait some time
  3. Try to publish messages to MQTT-broker

Expected Behavior

The connection must not be lost to publish messages.

Possible Solution

No response

Additional Information

No response

Code of Conduct

BjoernAtBosch commented 11 months ago

Hi Bernd, could give some more insights about this? E.g.:

sdvbernd commented 11 months ago

Hi Bernd, could give some more insights about this? E.g.:

* From where did you try to publish the MQTT messages? (e.g. VSMQTT extension of VS Code or something else)

* Where did you try? (On local machine, code spaces, ...)

Messages are published via an App which runs inside a Kanto-Container on an OWASYS-Box. The MQTT-Broker runs on the same machine... The App was pushed via desired state.

MP91 commented 11 months ago

Hey @sdvbernd I guess I found the issue: https://github.com/eclipse-velocitas/vehicle-app-python-sdk/blob/main/velocitas_sdk/native/mqtt.py#L64

We are just calling loop_start() for the subscription client but not for the publishing client...