2024-09-25 06:31:13 发布
网友
我编写的代码的输出是
on_publish ('Connected', '0') ('message received ', 'test1234') ('message topic=', u'paho/test')
代码如下:
将对subscribe和publish的调用移动到on_connect回调中,然后在尝试订阅主题和发布消息之前,可以确保连接成功。在
subscribe
publish
on_connect
如果经纪人出了问题,其他任何事情都会失败。在
将对
subscribe
和publish
的调用移动到on_connect
回调中,然后在尝试订阅主题和发布消息之前,可以确保连接成功。在如果经纪人出了问题,其他任何事情都会失败。在
相关问题 更多 >
编程相关推荐