How to MQTT publish zero length payload

Hi, I need to publish a zero length mesage but the AT+QMTPUBEX command returns ERROR if I set the payload length to zero. A zero length publish is a common way to acknowldge/remove a retained message on a topic so this is not an ucommon thing to want to do. Is there a way to do this?

Quectel EG21 Revision: EG21GGBR07A09M1G

Why do you need to send null messages? If the module sends null characters, the actual data is still added to the MQTT message header; I suggest that you use some kind of definite string instead of nulls

Thanks for the response. As stated, sending a zero lentgth message is the standard way of clearing a retained MQTT message as defined in the MQTT spec [MQTT-3.3.1-11]. It is not something I want to do, it is something I am required to do. I 've done this before many times with other modems and with other MQTT stacks. See the below articles on the subject of retianed messaqges and how a zero length message is used to clear them. It’s a very common pattern.

Just wondering if there were any thoughts on this please?

Sorry, I didn’t find a specific way to send null