As MQTT.MQTTParam.g_udiMaxPayloadSize and MQTT.MQTTParam.g_udiMaxPacketSize are library parameters, the end user has to set these, we cannot change them using the library. However, we can raise errors if we try to send something too big.
To investigate: what happens when a packet or payload is received which is too big?
In the current version of the MQTT Client library, a received payload too big will Error the MQTTClient without Error Message. Sending a payload too big will result in an Access Violation.
So we should definitely error check the payload is smaller than the g_udiMaxPayloadSize.
Check behaviour of this occurrence (via unit-test) and implement options for mitigation:
Recv buffer should get a separate ticket in SVP phase