use of com.google.protobuf.TextFormat.Printer in project ksql by confluentinc.
the class RecordFormatter method newProtobufDeserializer.
private static Deserializer<?> newProtobufDeserializer(final SchemaRegistryClient srClient) {
final Printer printer = TextFormat.printer();
final KafkaProtobufDeserializer<?> inner = new KafkaProtobufDeserializer<>(srClient);
return (topic, data) -> {
final Message msg = inner.deserialize(topic, data);
if (msg == null) {
return null;
}
return printer.shortDebugString(msg);
};
}
Aggregations