use of io.confluent.ksql.serde.SerdeFeature in project ksql by confluentinc.
the class DataGenProducer method getKeySerializer.
private Serializer<GenericKey> getKeySerializer(final LogicalSchema schema) {
final Set<SerdeFeature> supported = keySerializerFactory.format().supportedFeatures();
final SerdeFeatures features = supported.contains(SerdeFeature.UNWRAP_SINGLES) ? SerdeFeatures.of(SerdeFeature.UNWRAP_SINGLES) : SerdeFeatures.of();
final PersistenceSchema persistenceSchema = PersistenceSchema.from(schema.key(), features);
return keySerializerFactory.create(persistenceSchema);
}
Aggregations