Class KafkaSchemaRegistryClient


  • public class KafkaSchemaRegistryClient
    extends Object
    • Method Detail

      • getSchemaRegistryBaseUrl

        protected String getSchemaRegistryBaseUrl()
      • resetSchemaRegistry

        public void resetSchemaRegistry()
                                 throws Exception
        Deletes registered schemas from the registry.
        Throws:
        Exception
      • registerSchema

        public int registerSchema​(String topic,
                                  String schema)
                           throws Exception
        Register the schema derived from the avro generated class. To get the schema, call getClassSchema() on the Avro generated class. e.g. SendPayment.getClassSchema().toString()
        Parameters:
        topic - the topic name for the event schema being registered
        schema - the schema JSON string
        Returns:
        schemaId the schemaId used to register this Avro schema
        Throws:
        Exception