Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawel Czajka committed Jan 21, 2025
1 parent c96203c commit 455d105
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ class UniversalSchemaRegistryClientFactory extends SchemaRegistryClientFactory {
override type SchemaRegistryClientT = SchemaRegistryClient

override def create(config: SchemaRegistryClientKafkaConfig): SchemaRegistryClientT = {
val maybeUrl = config.kafkaProperties.get("schema.registry.url")
if (maybeUrl.isEmpty) {
EmptySchemaRegistry
} else {
if (maybeUrl.exists(_.endsWith(KafkaUtils.azureEventHubsUrl))) {
AzureSchemaRegistryClientFactory.create(config)
} else {
CachedConfluentSchemaRegistryClientFactory.create(config)
}
config.kafkaProperties.get("schema.registry.url") match {
case None => EmptySchemaRegistry
case Some(url) =>
if (url.endsWith(KafkaUtils.azureEventHubsUrl)) {
AzureSchemaRegistryClientFactory.create(config)
} else {
CachedConfluentSchemaRegistryClientFactory.create(config)
}
}
}

Expand Down

0 comments on commit 455d105

Please sign in to comment.