Skip to content

Commit

Permalink
#17 allow multiple schema registry urls
Browse files Browse the repository at this point in the history
  • Loading branch information
domnikl committed Dec 20, 2021
1 parent 5ae9640 commit 6b7a49d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ Manages schema registries through Infrastructure as Code
a Java Properties file for client configuration
(optional)
-r, --registry=<baseUrl> 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
```
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
}

group = "dev.domnikl"
version = "1.0.0"
version = "1.1.0"

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/dev/domnikl/schema_registry_gitops/CLI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CLI : Callable<Int> {

@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(),
Expand Down

0 comments on commit 6b7a49d

Please sign in to comment.