PubSubClient - MQTT_MAX_PACKET_SIZE How is it calculated
It is the maximum size of an entire packet.  In publish() this check is done:
if (MQTT_MAX_PACKET_SIZE &lt; MQTT_MAX_HEADER_SIZE + 2+strlen(topic) + plength) {

So the maximum length of a message payload will be
MQTT_MAX_PACKET_SIZE - MQTT_MAX_HEADER_SIZE - 2 - strlen(topic)

MQTT_MAX_HEADER_SIZE is defined as 5, so if you have, for example, a 20 character topic you would have 256 - 5 - 2 - 20 = 229 bytes left for your payload.