diff --git a/README.md b/README.md index b2485c7..e80a8cd 100644 --- a/README.md +++ b/README.md @@ -26,12 +26,14 @@ Manages schema registries through Infrastructure as Code a Java Properties file for client configuration (optional) -r, --registry= schema registry endpoint, overwrites 'schema. - registry.url' from properties + registry.url' from properties, can also be a + list of urls separated by comma -v, --verbose enable verbose logging -V, --version Print version information and exit. Commands: help Displays help information about the specified command - plan validate and plan schema changes, can be used to see all pending changes + plan validate and plan schema changes, can be used to see all pending + changes apply applies the state to the given schema registry dump prints the current state ``` diff --git a/build.gradle.kts b/build.gradle.kts index 9c77eac..cbe4e16 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ plugins { } group = "dev.domnikl" -version = "1.0.0" +version = "1.1.0" repositories { mavenCentral() diff --git a/src/main/kotlin/dev/domnikl/schema_registry_gitops/CLI.kt b/src/main/kotlin/dev/domnikl/schema_registry_gitops/CLI.kt index 2de814c..92f49e1 100644 --- a/src/main/kotlin/dev/domnikl/schema_registry_gitops/CLI.kt +++ b/src/main/kotlin/dev/domnikl/schema_registry_gitops/CLI.kt @@ -29,7 +29,7 @@ class CLI : Callable { @CommandLine.Option( names = ["-r", "--registry"], - description = ["schema registry endpoint, overwrites 'schema.registry.url' from properties"], + description = ["schema registry endpoint, overwrites 'schema.registry.url' from properties, can also be a list of urls separated by comma"], scope = CommandLine.ScopeType.INHERIT ) var baseUrl: String? = null diff --git a/src/main/kotlin/dev/domnikl/schema_registry_gitops/Factory.kt b/src/main/kotlin/dev/domnikl/schema_registry_gitops/Factory.kt index 391754e..c7fbb95 100644 --- a/src/main/kotlin/dev/domnikl/schema_registry_gitops/Factory.kt +++ b/src/main/kotlin/dev/domnikl/schema_registry_gitops/Factory.kt @@ -6,6 +6,7 @@ import dev.domnikl.schema_registry_gitops.state.Dumper import dev.domnikl.schema_registry_gitops.state.Persistence import io.confluent.kafka.schemaregistry.avro.AvroSchemaProvider import io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient +import io.confluent.kafka.schemaregistry.client.rest.RestService import io.confluent.kafka.schemaregistry.json.JsonSchemaProvider import io.confluent.kafka.schemaregistry.protobuf.ProtobufSchemaProvider import org.slf4j.LoggerFactory @@ -26,7 +27,7 @@ class Factory { private val cachedClient by lazy { CachedSchemaRegistryClient( - listOf(config.baseUrl), + RestService(config.baseUrl), 100, listOf(AvroSchemaProvider(), ProtobufSchemaProvider(), JsonSchemaProvider()), config.toMap(),