client = new RESTRepositoryClient(props.getProperty(ETL_SCHEMA_REGISTRY_URL));
}
@Override
public String register(String topic, Schema schema) {
Subject subject = client.lookup(topic);
if (subject == null) {
subject = client.register(topic, "org.apache.avro.repo.Validator");
}
try {
return subject.register(schema.toString()).getId();
} catch (SchemaValidationException e) {
throw new SchemaRegistryException(e);
}
}