samza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raj raj <>
Subject Using json serde with KeyValueStore
Date Sat, 05 Nov 2016 15:09:40 GMT

I am starting out with Samza and my test program is able to read a
message from Kafka. My next task is to write the message to KeyValue
store. The message is formatted as Json in Kafka and I am using json
serde as my msg serde. The incoming message is available to me as a
LinkedHashMap when I call envelope.getMessage(). i.e. serde
automatically converted the json string to a LinkedHashMap.

Now I want to store this to KeyValueStore. Will using a json serde for
stores.test-container.msg.serde automatically convert the
LinkedHashMap to a format suitable for storing in the KeyValueStore?
i.e. the reverse process of what it did when I called

If it is not possible what is the best practice of storing a
LinkedHashMap in KeyStoreValue?

I am pasting the current code I am working with in pastebin for
reference, there isn't much in the code, just the boilerplate stuff. : :

Thanks and Regards,


View raw message