Serialises a record to its normalized JSON message. When the message is larger than
maxEventBytes, truncate shortens the record body so the message stays valid JSON (falling
back to a plain cut only when the other fields alone are too large); drop and error return
undefined.
Serialises a record to its normalized JSON message. When the message is larger than
maxEventBytes,truncateshortens the recordbodyso the message stays valid JSON (falling back to a plain cut only when the other fields alone are too large);dropanderrorreturnundefined.