springboot-kafka-avro | simple Spring Boot app that talks to Kafka using Avro | Pub Sub library
kandi X-RAY | springboot-kafka-avro Summary
kandi X-RAY | springboot-kafka-avro Summary
Spring Boot, spring-kafka and Confluent Schema Registry integration example.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Start the downloader
- Downloads a website from a URL
- Publish a user to a Kafka topic
- Sends a user to the Kafka topic
- Starts the Kafka application
- Consume a user message
- The main application
- Filter users input stream
springboot-kafka-avro Key Features
springboot-kafka-avro Examples and Code Snippets
Community Discussions
Trending Discussions on springboot-kafka-avro
QUESTION
I am trying to use the Confluent schema-registry and its working for me following some examples I found in Github (https://github.com/gAmUssA/springboot-kafka-avro).
When consumer and producer shares the same namespace as the model than its working.
When the consumer is in a different project with different namespace but the same class (name and properties wise) than it is not working.
Confluent Avro deserializer can deserialize to GenericData$Record class with the correct values but it cant cast it to the actual object.
I am trying this:
...ANSWER
Answered 2020-Jan-28 at 12:53The problem is that your User class is not an Avro class.
You should be using the Avro Maven / Gradle plugins to generate your classes rather than using Lombok, and the namespaces and full schemas do need to align. The best way I've found to manage that is to develop and release the models entirely separate from the actual kafka code
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install springboot-kafka-avro
You can use springboot-kafka-avro like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the springboot-kafka-avro component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page