@Test public void testSameSchemaMultipleTopicForKey() throws IOException, RestClientException { SchemaRegistryClient schemaRegistry = new MockSchemaRegistryClient(); AvroConverter avroConverter = new AvroConverter(schemaRegistry); avroConverter.configure(SR_CONFIG, true); assertSameSchemaMultipleTopic(avroConverter, schemaRegistry, true); }
@Override public void configure(Map<String, ?> configs, boolean isKey) { this.isKey = isKey; AvroConverterConfig avroConverterConfig = new AvroConverterConfig(configs); if (schemaRegistry == null) { schemaRegistry = new CachedSchemaRegistryClient( avroConverterConfig.getSchemaRegistryUrls(), avroConverterConfig.getMaxSchemasPerSubject(), Collections.singletonList(new AvroSchemaProvider()), configs, avroConverterConfig.requestHeaders() ); } serializer = new Serializer(configs, schemaRegistry); deserializer = new Deserializer(configs, schemaRegistry); avroData = new AvroData(new AvroDataConfig(configs)); }
AvroConverter implements Converter { @Override public void configure(Map<String, ?> configs, boolean isKey) { this.isKey = isKey; AvroConverterConfig avroConverterConfig = new AvroConverterConfig(configs); if (schemaRegistry == null) { schemaRegistry = new CachedSchemaRegistryClient( avroConverterConfig.getSchemaRegistryUrls(), avroConverterConfig.getMaxSchemasPerSubject(), Collections.singletonList(new AvroSchemaProvider()), configs, avroConverterConfig.requestHeaders() ); } serializer = new Serializer(configs, schemaRegistry); deserializer = new Deserializer(configs, schemaRegistry); avroData = new AvroData(new AvroDataConfig(configs)); } }
AvroConverter implements Converter { @Override public void configure(Map<String, ?> configs, boolean isKey) { this.isKey = isKey; AvroConverterConfig avroConverterConfig = new AvroConverterConfig(configs); if (schemaRegistry == null) { schemaRegistry = new CachedSchemaRegistryClient( avroConverterConfig.getSchemaRegistryUrls(), avroConverterConfig.getMaxSchemasPerSubject(), Collections.singletonList(new AvroSchemaProvider()), configs, avroConverterConfig.requestHeaders() ); } serializer = new Serializer(configs, schemaRegistry); deserializer = new Deserializer(configs, schemaRegistry); avroData = new AvroData(new AvroDataConfig(configs)); } AvroConverter();  AvroConverter(SchemaRegistryClient client); }
AvroConverter implements Converter { @Override public void configure(Map<String, ?> configs, boolean isKey) { this.isKey = isKey; AvroConverterConfig avroConverterConfig = new AvroConverterConfig(configs); if (schemaRegistry == null) { schemaRegistry = new CachedSchemaRegistryClient( avroConverterConfig.getSchemaRegistryUrls(), avroConverterConfig.getMaxSchemasPerSubject(), Collections.singletonList(new AvroSchemaProvider()), configs, avroConverterConfig.requestHeaders() ); } serializer = new Serializer(configs, schemaRegistry); deserializer = new Deserializer(configs, schemaRegistry); avroData = new AvroData(new AvroDataConfig(configs)); } AvroConverter();  AvroConverter(SchemaRegistryClient client); @Override void configure(Map<String, ?> configs, boolean isKey); @Override byte[] fromConnectData(String topic, Schema schema, Object value); @Override SchemaAndValue toConnectData(String topic, byte[] value); }
AvroConverter implements Converter { @Override public void configure(Map<String, ?> configs, boolean isKey) { this.isKey = isKey; AvroConverterConfig avroConverterConfig = new AvroConverterConfig(configs); if (schemaRegistry == null) { schemaRegistry = new CachedSchemaRegistryClient( avroConverterConfig.getSchemaRegistryUrls(), avroConverterConfig.getMaxSchemasPerSubject(), Collections.singletonList(new AvroSchemaProvider()), configs, avroConverterConfig.requestHeaders() ); } serializer = new Serializer(configs, schemaRegistry); deserializer = new Deserializer(configs, schemaRegistry); avroData = new AvroData(new AvroDataConfig(configs)); } AvroConverter();  AvroConverter(SchemaRegistryClient client); @Override void configure(Map<String, ?> configs, boolean isKey); @Override byte[] fromConnectData(String topic, Schema schema, Object value); @Override SchemaAndValue toConnectData(String topic, byte[] value);  }