@Test public void testSameSchemaMultipleTopicForKey() throws IOException, RestClientException { SchemaRegistryClient schemaRegistry = new MockSchemaRegistryClient(); ProtobufConverter protobufConverter = new ProtobufConverter(schemaRegistry); protobufConverter.configure(SR_CONFIG, true); assertSameSchemaMultipleTopic(protobufConverter, schemaRegistry, true); }
@Override public void configure(Map<String, ?> configs, boolean isKey) { this.isKey = isKey; ProtobufConverterConfig protobufConverterConfig = new ProtobufConverterConfig(configs); if (schemaRegistry == null) { schemaRegistry = new CachedSchemaRegistryClient( protobufConverterConfig.getSchemaRegistryUrls(), protobufConverterConfig.getMaxSchemasPerSubject(), Collections.singletonList(new ProtobufSchemaProvider()), configs, protobufConverterConfig.requestHeaders() ); } serializer = new Serializer(configs, schemaRegistry); deserializer = new Deserializer(configs, schemaRegistry); protobufData = new ProtobufData(new ProtobufDataConfig(configs)); }
ProtobufConverter implements Converter { @Override public void configure(Map<String, ?> configs, boolean isKey) { this.isKey = isKey; ProtobufConverterConfig protobufConverterConfig = new ProtobufConverterConfig(configs); if (schemaRegistry == null) { schemaRegistry = new CachedSchemaRegistryClient( protobufConverterConfig.getSchemaRegistryUrls(), protobufConverterConfig.getMaxSchemasPerSubject(), Collections.singletonList(new ProtobufSchemaProvider()), configs, protobufConverterConfig.requestHeaders() ); } serializer = new Serializer(configs, schemaRegistry); deserializer = new Deserializer(configs, schemaRegistry); protobufData = new ProtobufData(new ProtobufDataConfig(configs)); } }
ProtobufConverter implements Converter { @Override public void configure(Map<String, ?> configs, boolean isKey) { this.isKey = isKey; ProtobufConverterConfig protobufConverterConfig = new ProtobufConverterConfig(configs); if (schemaRegistry == null) { schemaRegistry = new CachedSchemaRegistryClient( protobufConverterConfig.getSchemaRegistryUrls(), protobufConverterConfig.getMaxSchemasPerSubject(), Collections.singletonList(new ProtobufSchemaProvider()), configs, protobufConverterConfig.requestHeaders() ); } serializer = new Serializer(configs, schemaRegistry); deserializer = new Deserializer(configs, schemaRegistry); protobufData = new ProtobufData(new ProtobufDataConfig(configs)); } ProtobufConverter();  ProtobufConverter(SchemaRegistryClient client); }
ProtobufConverter implements Converter { @Override public void configure(Map<String, ?> configs, boolean isKey) { this.isKey = isKey; ProtobufConverterConfig protobufConverterConfig = new ProtobufConverterConfig(configs); if (schemaRegistry == null) { schemaRegistry = new CachedSchemaRegistryClient( protobufConverterConfig.getSchemaRegistryUrls(), protobufConverterConfig.getMaxSchemasPerSubject(), Collections.singletonList(new ProtobufSchemaProvider()), configs, protobufConverterConfig.requestHeaders() ); } serializer = new Serializer(configs, schemaRegistry); deserializer = new Deserializer(configs, schemaRegistry); protobufData = new ProtobufData(new ProtobufDataConfig(configs)); } ProtobufConverter();  ProtobufConverter(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); }
ProtobufConverter implements Converter { @Override public void configure(Map<String, ?> configs, boolean isKey) { this.isKey = isKey; ProtobufConverterConfig protobufConverterConfig = new ProtobufConverterConfig(configs); if (schemaRegistry == null) { schemaRegistry = new CachedSchemaRegistryClient( protobufConverterConfig.getSchemaRegistryUrls(), protobufConverterConfig.getMaxSchemasPerSubject(), Collections.singletonList(new ProtobufSchemaProvider()), configs, protobufConverterConfig.requestHeaders() ); } serializer = new Serializer(configs, schemaRegistry); deserializer = new Deserializer(configs, schemaRegistry); protobufData = new ProtobufData(new ProtobufDataConfig(configs)); } ProtobufConverter();  ProtobufConverter(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);  }