Apicurio schema registry with JsonSchemaKafkaSerializer and JsonSchemaKafkaDeserializer not working
See original GitHub issueI am trying to implement schema registry using kafka streams with JSON serde(Input data is in JSON format). But unable to do so, It’s not even throwing any error when I am publishing data in the input kafka topic. After debugging little more, I found that only the serializer and deserializer(serde) part is causing this issue as the same code is working with primitive serde like String, Integer.
Here is the logic -
Properties set are -
properties.put(AbstractKafkaSerDe.REGISTRY_URL_CONFIG_PARAM,schemaRegUrl);
properties.put(AbstractKafkaSerializer.REGISTRY_ARTIFACT_ID_STRATEGY_CONFIG_PARAM, SimpleTopicIdStrategy.class.getName());
properties.put(AbstractKafkaSerializer.REGISTRY_GLOBAL_ID_STRATEGY_CONFIG_PARAM, GetOrCreateIdStrategy.class.getName());
properties.put(JsonSchemaSerDeConstants.REGISTRY_JSON_SCHEMA_VALIDATION_ENABLED, Boolean.TRUE);
RegistryService service = CompatibleClient.createCompatible(schemaRegUrl);
Serializer<POJO> serializer = new JsonSchemaKafkaSerializer<>(service, true);
Deserializer<POJO> deserializer = new JsonSchemaKafkaDeserializer<>(service, true);
Serde<DataModel> logSerde = Serdes.serdeFrom(serializer, deserializer);
StreamsBuilder builder = new StreamsBuilder();
KStream<String, POJO> input = builder.stream(INPUT_TOPIC, Consumed.with(stringSerde, logSerde));
Not sure what’s missing in the above code as I am not receiving any error while running. Kindly help.
Issue Analytics
- State:
- Created 2 years ago
- Comments:19 (9 by maintainers)
Top Results From Across the Web
Configuring Kafka serializers/deserializers in Java clients
Configure JSON Schema SerDe with Apicurio Registry. Configure Protobuf SerDe with Apicurio ... The setting should not be used with the ID_HANDLER option....
Read more >Allow to configure Jackson ObjectMapper · Issue #2312 · Apicurio ...
Currently this is not possbile for JsonSchemaKafkaSerializer.java and JsonSchemaKafkaDeserializer.java). A workaround is to extend these classes and access ...
Read more >Chapter 8. Configuring Kafka serializers/deserializers in Java ...
Used by serializers and deserializers. Fully-qualified Java classname that implements SchemaResolver . String. io.apicurio.registry.serde.DefaultSchemaResolver ...
Read more >3x7fa93sw - Java - OneCompiler
JsonSchemaKafkaDeserializer; ^ CloudEventJsonSchemaExample2.java:24: error: package io.apicurio.registry.utils.serde does not exist import ...
Read more >How to pass global id in kafka messages for apicurio registry ...
StringSerializer spring.kafka.producer.value-serializer: io.apicurio.registry.serde.jsonschema.JsonSchemaKafkaSerializer ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@EricWittmann
Thank you so very much for the help. It’s working fine now.
@EricWittmann
Can we please reopen the ticket.