Skip to content

服务发生重启后mqtt主题不在订阅,导致设备信息获取不了 #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jinronga opened this issue Aug 21, 2024 · 4 comments

Comments

@jinronga
Copy link

后端服务发生重启后mqtt主题不在订阅,获取不了设备的信息,导致设备在平台也是离线状态。
经过排查遥控器绑定设备时调用:/{device_sn}/binding接口,订阅这些主题
image
后端重启后这些主题就没订阅,一直获取不了设备信息,只能用遥控器重新绑定(再次调用/{device_sn}/binding接口)

我们不可能保证服务百分百不重启。
发现该问题只能用遥控器重新绑定,感觉不太行这也是我经过排查才发现的问题。
我这边按照我的思路完善了一下,规避了这种场景。

@Wu585
Copy link

Wu585 commented Mar 9, 2025

请问如何避免呢

@jinronga
Copy link
Author

jinronga commented Mar 9, 2025

你这边工作也用到了api吗

@Wu585
Copy link

Wu585 commented Mar 10, 2025

是的,我也发现服务重启机场会下线的问题

@jinronga
Copy link
Author

这块我也不清楚我是这么解决的了,反正我按照我得思路解决了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants