thingsboard / thingsboard-gateway

Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
https://thingsboard.io/docs/iot-gateway/what-is-iot-gateway/
Apache License 2.0
1.75k stars 844 forks source link

[BUG] Abnormal rate limit with mqtt #1408

Closed yfPanne closed 5 months ago

yfPanne commented 5 months ago

Describe the bug The gateway has abnormal rate limit when connect to thingsboard by mqtt. It is an logic caused bug, and in fact, it is a problem with the python-client-sdk repository.

Error traceback (If available): The sleep function indicated by the arrow in the diagram below will always be cross-triggered. That means the mqtt-sending rate will always be limited to 10 per second since the function _publish_data always wait_for_publish. image image

Versions (please complete the following information):

imbeacon commented 5 months ago

Hi @yfPanne,

This issue was solved in Python client SDK and it is available in the master branch of the SDK, you can try to use it or it will be also available in the nearest release of SDK.