- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Looking for an example where using Kryo and Kafka to serialize/deserialize and transfer a POJO
- Labels:
-
Apache Kafka
Created ‎02-17-2016 07:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am having trouble finding an example where someone serializes and deserializes a POJO over a Kafka queue. I can send simple strings across, but when I serialize and send a more complex object, I've been getting BufferUnderflows and ArrayOutOfBoundsExceptions.
Created ‎02-18-2016 08:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The solution that ended up working was to adapt the code I found here:
http://stackoverflow.com/questions/23755976/kafka-writing-custom-serializer
Created ‎02-17-2016 08:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
take a look at this example I'm taking json and serializing it but should be same concept with kryo https://github.com/dbist/KafkaHBaseBenchmark
MappingConfig.java look at that class
Created ‎02-18-2016 08:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The solution that ended up working was to adapt the code I found here:
http://stackoverflow.com/questions/23755976/kafka-writing-custom-serializer
Created ‎02-18-2016 08:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Adam Doyle I have accepted this as best answer. Thanks for the followup!
