设置为false清晰的会话标志,我很想念公布值 [英] With the clear session flag set to FALSE, I am missing the published values
问题描述
有没有人有一个合理的解释,为什么尽管我有清除会话flage = FALSE
我没有收到更新的发布的消息,我订阅了,而我没有连接到经纪人?
Is anyone has a logical explanation why despite I have the clear session flage = false
I do not receive the updated published message I am subscribed to while i am not connected to the broker?
随着aorementioned标志设置为false我跑我的应用程序,我不停地发布到主题的一些值(从PC到没有从Android设备到代理券商)。然后我unpluged Android设备FRM的PC的USB,不停地再发布一些值。当我再次插入的USB到PC上,我期望看到我最近发布到该主题的值,但我没有收到任何
With the aorementioned flag set to false I ran my App, And i kept publishing to a topic some values (from the PC to the broker not from the Android device to the broker). And then I unpluged the usb of the Android Device frm the pc, and kept publishing some values again. When I plugged the usb to the pc again, i expected to see the values I recently published to that topic, but I did not receive any.
我要发布的主题是完全相同的题目我很赞同,与的QoS = 1
。
The topic I am publishing to is exactly the topic i am subscribed to, with QoS = 1
.
推荐答案
为了对消息进行排队为不再连接到代理客户端,这些东西必须是真实的:
In order for messages to be queued for a client that is no longer connected to a broker, these things must be true:
- 客户端必须具有与原
干净会议
设置为false 连接 - 客户端必须具有QoS订阅> 0
- 消息到该主题必须已经公布了QoS> 0
- 当客户端重新连接它必须具有相同的
客户端ID
当它断开连接 - 当客户端重新连接它必须具有
干净会议
设置为false
- Client must have originally connected with
clean session
set to false - Client must have subscribed with QoS>0
- Messages to that topic must have been published with QoS>0
- When the client reconnects it must have the same
client id
as when it disconnected - When the client reconnects it must have
clean session
set to false
我敢打赌,你在任一后两个点的失败。
My bet is that you are failing on either of the latter two points.
这篇关于设置为false清晰的会话标志,我很想念公布值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!