@Override
    public byte[] serialize(String topic, String data) {
        if (data == null)
            return null;
        else
            return data.getBytes(encoding);
    }
String encoding defaults to UTF8 and can be customized by setting the property key.serializer.encoding,
 value.serializer.encoding or serializer.encoding. The first two take precedence over the last.
clients/src/main/java/org/apache/kafka/common/serialization/StringSerializer.java