public class ConfluentSchemaRegistryCoder extends Object implements SchemaCoder
SchemaCoder.SchemaCoderProvider
Constructor and Description |
---|
ConfluentSchemaRegistryCoder(io.confluent.kafka.schemaregistry.client.SchemaRegistryClient schemaRegistryClient)
Creates
SchemaCoder that uses provided SchemaRegistryClient to connect to
schema registry. |
ConfluentSchemaRegistryCoder(String subject,
io.confluent.kafka.schemaregistry.client.SchemaRegistryClient schemaRegistryClient)
Creates
SchemaCoder that uses provided SchemaRegistryClient to connect to
schema registry. |
Modifier and Type | Method and Description |
---|---|
org.apache.avro.Schema |
readSchema(InputStream in) |
void |
writeSchema(org.apache.avro.Schema schema,
OutputStream out) |
public ConfluentSchemaRegistryCoder(String subject, io.confluent.kafka.schemaregistry.client.SchemaRegistryClient schemaRegistryClient)
SchemaCoder
that uses provided SchemaRegistryClient
to connect to
schema registry.schemaRegistryClient
- client to connect schema registrysubject
- subject of schema registry to producepublic ConfluentSchemaRegistryCoder(io.confluent.kafka.schemaregistry.client.SchemaRegistryClient schemaRegistryClient)
SchemaCoder
that uses provided SchemaRegistryClient
to connect to
schema registry.schemaRegistryClient
- client to connect schema registrypublic org.apache.avro.Schema readSchema(InputStream in) throws IOException
readSchema
in interface SchemaCoder
IOException
public void writeSchema(org.apache.avro.Schema schema, OutputStream out) throws IOException
writeSchema
in interface SchemaCoder
IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.