writeTo method
Writes the message to the supplied stream.
Implementation
@override
void writeTo(MqttByteBuffer messageStream) {
header!.writeTo(variableHeader!.getWriteLength() + payload.getWriteLength(),
messageStream);
variableHeader!.writeTo(messageStream);
payload.writeTo(messageStream);
}