public void configure()

in java/json/src/main/java/com/microsoft/azure/schemaregistry/kafka/json/KafkaJsonDeserializer.java [52:72]


    public void configure(Map<String, ?> props, boolean isKey) {
        this.config = new KafkaJsonDeserializerConfig((Map<String, Object>) props);

        TokenCredential tokenCredential;
        tokenCredential = this.config.getCredential();
        if (tokenCredential == null && this.config.createDefaultAzureCredential()) {
            tokenCredential = new DefaultAzureCredentialBuilder().build();
        } else {
            throw new RuntimeException(
            "TokenCredential not created for serializer. "
            + "Please provide a TokenCredential in config or set "
            + "\"use.azure.credential\" to true."
            );
        }

        this.client = new SchemaRegistryClientBuilder()
        .fullyQualifiedNamespace(this.config.getSchemaRegistryUrl())
        .credential(tokenCredential)
        .clientOptions(new ClientOptions().setApplicationId("java-json-kafka-des-1.0"))
        .buildClient();
    }