Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # user >> produce / consume json to kafka


Copy link to this message
-
Re: produce / consume json to kafka
A json payload can be seen from several perspectives:

- as some kind of object (e.g. jackson  JSonNode)
- as a string
- a byte array

Imho all depends on what "perspective" you are using.

Assuming that you are not working directly with byte arrays (in this case
you could write a simple Byte array encoder / decoder) you can create

- a String encoder / decoder (I don't remember if kafka dist already has
this)
- a little bit more complex Json encoder / decoder that handles the
serialization (byte array to object and viceversa) behind the scenes.

Best,
Andrea
On 23 Jun 2013 13:08, "Oleg Ruchovets" <[EMAIL PROTECTED]> wrote:

> Hi ,
>     I need to produce/consume json to/from  Kafka.
>
> Can you please point me on example how to do it.
> I am using java and kafka 0.7.2
>
> Thanks
> Oleg.
>

 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB