question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apicurio schema registry with JsonSchemaKafkaSerializer and JsonSchemaKafkaDeserializer not working

See original GitHub issue

I 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:closed
  • Created 2 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
nehasewdacommented, Oct 6, 2021

@EricWittmann

Thank you so very much for the help. It’s working fine now.

1reaction
nehasewdacommented, Oct 6, 2021

@EricWittmann

Can we please reopen the ticket.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found