Call to serialize the all message, returns a ByteData with a serialized message
ByteData serialize(M message);