The nng_mqtt_msg_alloc()
function allocates a new message with body length size
and stores the result in msgp.
Messages allocated with this function contain a body and optionally a header and proto_data.
They are used with receive and transmit functions.