As a general rule of thumb;
-RFC-3164 message format is used with UDP protocol,
-RFC-5424 message format is used with TCP protocol,
-RFC-5425 message format is used with TCP protocol and security-enabled connection.
Note: The maximum message size for UDP is 1024 bytes and when the message size is over 1024 bytes, the messages will be send divided and data loss may occur.