In MQTT-SN the meaning of a “clean session” is extended to the Will feature, i.e. not only the subscriptions are persistent, but also the Will topic and the Will message.
If a client uses Clean=false, Will=false, the gateway uses any stored will topic/msg for a connect. The XXXUPD ones allow the stored to be changed at any time, so the SN client can store its will topic/msg on the gateway instead of remembering it for the next connect. Even a transparent gateway has to store some state per client, and these allow that state to be manipulated. I think it was probably overkill on the part of the spec, but in the context of the spec, it does make sense, and it is pretty easy to implement as you had to store the Will topic and message anyway.
yes, for this sort of transparent gateway, WILLTOPICUPD and
WILLMSGUPD do not make much sense. The only option I can think of
is that the gateway stored that information for the next connect,
but I don't think that's something we want to do.
For an aggregating gateway, like RSMB, it would make sense, because
the firing of the will message is the responsiblity of the gateway.
For your implementation, I think it's fine for the gateway to return
a not supported return code (0x03) for WILLTOPICUPD and WILLMSGUPD.
Ian
On 04/06/2016 08:43 AM, Tomoaki
Yamaguchi wrote:
Hi,
I almost done the coding of MQTT-SN gateway and
start debugging now on.
But, I have no idea how G/W handles WILLTOPICUPD
and WILLMSGUPD.
I don't know G/W should keep Will topic and Will
Message or not.
Those seem use less for G/W. MQTT protocol dose
not have those messages.
if the client wants update those, it's enough to
reconnect with updated will topic or will message.
In what situation we need those messages?
welcome any comments.
tomoaki
At this point G/W does not support WILlTOPICUPD, WILLMSGUPD,
WILLTOPICRESP, WILLMESGRESP,