Right now, QMqttConnection contains code like this (2 locations):
I might be misinterpreting the spec, but:
18.104.22.168 Will Message
The Will Message defines the Application Message that is to be published to the Will Topic as described in Section 22.214.171.124. This field consists of a two byte length followed by the payload for the Will Message expressed as a sequence of zero or more bytes.
It is valid for a PUBLISH Packet to contain a zero length payload.
I think both a regular message as well as a will message can be of zero length, i.e. 'empty'.
Right now, the code ignores empty will messages, these are not send/registered.
The usecase for an empty will message is clearing an earlier set retained message, since clearing a retained message is done by posting an empty one.