Skip to content

Commit

Permalink
feat: support registry for primitive types (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
parisni authored Nov 21, 2024
1 parent 9804442 commit 837e337
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,19 @@ public static ConfluentRegistryAvroSerializationSchema<GenericRecord> forGeneric
DEFAULT_IDENTITY_MAP_CAPACITY,
registryConfigs));
}

public static ConfluentRegistryAvroSerializationSchema<Object> forPrimitiveType(
String subject,
Schema schema,
String schemaRegistryUrl,
@Nullable Map<String, ?> registryConfigs) {
return new ConfluentRegistryAvroSerializationSchema<>(
Object.class,
schema,
new CachedSchemaCoderProvider(
subject,
schemaRegistryUrl,
DEFAULT_IDENTITY_MAP_CAPACITY,
registryConfigs));
}
}

0 comments on commit 837e337

Please sign in to comment.