Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Looking for an example where using Kryo and Kafka to serialize/deserialize and transfer a POJO

avatar
New Member

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.

1 ACCEPTED SOLUTION

avatar
New Member

The solution that ended up working was to adapt the code I found here:

http://stackoverflow.com/questions/23755976/kafka-writing-custom-serializer

View solution in original post

3 REPLIES 3

avatar
Master Mentor

@Adam Doyle

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

avatar
New Member

The solution that ended up working was to adapt the code I found here:

http://stackoverflow.com/questions/23755976/kafka-writing-custom-serializer

avatar
Master Mentor

@Adam Doyle I have accepted this as best answer. Thanks for the followup!