/** * Register a schema to the Kafka schema registry under the provided input name. This method will change the name * of the schema to the provided name. This is useful because certain services (like Gobblin kafka adaptor and * Camus) get the schema for a topic by querying for the latest schema with the topic name, requiring the topic * name and schema name to match for all topics. This method registers the schema to the schema registry in such a * way that any schema can be written to any topic. * * @param schema {@link org.apache.avro.Schema} to register. * @param name Name of the schema when registerd to the schema registry. This name should match the name * of the topic where instances will be published. * @return schema ID of the registered schema. * @throws SchemaRegistryException if registration failed */ @Override public MD5Digest register(String name, Schema schema) throws SchemaRegistryException { return register(AvroUtils.switchName(schema, name)); }