【发布时间】:2017-11-22 09:51:10
【问题描述】:
如果订阅者应用程序断开连接一段时间(例如崩溃),是否可以获得所有丢失的事件?
我希望将 clean-session 设置为 true 以获得这种行为,但它不起作用。这是我的代码:
import ibmiotf.application
options = {
"org": "org",
"id": "some-id",
"auth-method": "apikey",
"auth-key": "key",
"auth-token": "token",
"clean-session": False
}
client = ibmiotf.application.Client(options)
client.connect()
client.deviceEventCallback = eventCallback
client.subscribeToDeviceEvents(deviceType="deviceType")
谢谢!
【问题讨论】:
标签: python-3.x mqtt watson-iot