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 Plain View
Kafka >> mail # user >> SyncProducer vs Producer


+
navneet sharma 2013-01-14, 18:27
+
Jun Rao 2013-01-14, 23:47
Copy link to this message
-
Re: SyncProducer vs Producer
If that is the case:
"Producer is actually the client api that everyone
should be using."

Then why contrib/hadoop-consumer is using SynProducer. Can i modify the
code to use Producer?
Will it have any impact on the system?

Thanks,
Navneet Sharma
On Tue, Jan 15, 2013 at 5:16 AM, Jun Rao <[EMAIL PROTECTED]> wrote:

> Producer is the high level api whereas SyncProducer is the lower level api.
> Producer takes one or more messages and converts them to a request which is
> sent by SyncProducer. Producer is actually the client api that everyone
> should be using.
>
> Thanks,
>
> Jun
>
> On Mon, Jan 14, 2013 at 10:26 AM, navneet sharma <
> [EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I am not able to understand difference between
> > kafka.javaapi.producer.Producer and kafka.javaapi.producer.SyncProducer.
> >
> > Its become even more confusing since Producer expects Generics stating
> > message type whereas SyncProducer doesnt.
> >
> > Also, SyncProducer deals with ByteBufferMessageSet
> >
> > Basically i am trying to push data from Kafka broker to Hadoop HDFS and i
> > am trying to understand contrib/hadoop-consumer code.
> >
> > Any pointers?
> >
> > Thanks,
> > Navneet Sharma
> >
>

 
+
Jun Rao 2013-01-15, 15:26
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