@Override
  public MessageSerializer getSerializer() {
    return serializer;
  }
This implementation gzips and then Base64 encodes the message before writing it out.
This MessageEncoder will break the backward compatibility for hive replication v1 which uses webhcat endpoints.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/messaging/json/gzip/GzipJSONMessageEncoder.java