Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Kafka 0.9 - New Kafka Producer or the Old One ???

Highlighted

Kafka 0.9 - New Kafka Producer or the Old One ???

Expert Contributor
Hello All - I've Kafka 0.9

and I'm running this command to publish records to Kafka topics -

$KAFKA_HOME/bin/kafka-verifiable-producer.sh --topic mmtopic1 --max-messages 500 --broker-list localhost:9092,localhost:9093,localhost:9094,localhost:9095 --producer.config $KAFKA_HOME/config/producer.properties
Does it use the new Kafka Producer or the Old (Simple or High level) producer ?
Is there a configuration that determines this ?
Also how do i configure this to be Async Producer ?
When i put the following in the config file - it Does Not recognize it.
producer.type=async

Thanks for your help in advance !

3 REPLIES 3

Re: Kafka 0.9 - New Kafka Producer or the Old One ???

Expert Contributor
@mqureshi, @Sriharsha Chintalapani - any ideas on this ?

Re: Kafka 0.9 - New Kafka Producer or the Old One ???

@Karan Alang

In Kafka 0.9 console commands still defaults old producer . You need to make sure you pass --new-producer and --new-consumer to the respective commands to invoke the new clients

Re: Kafka 0.9 - New Kafka Producer or the Old One ???

Expert Contributor

@Sriharsha Chintalapani

- i don't see an option to specify --new-producer OR --new-consumer in the command ..

$KAFKA_HOME/bin/kafka-verifiable-producer.sh  
$KAFKA_HOME/bin/kafka-verifiable-producer.sh --new-producer --num.streams 3 --producer.config $KAFKA_HOME1/config/mmProducer.config --whitelist="mmtopic1" --abort.on.send.failure true --bootstrap.servers localhost:9092,localhost:9093,localhost:9094,localhost:9095
usage: verifiable-producer [-h] --topic TOPIC --broker-list HOST1:PORT1[,HOST2:PORT2[...]] [--max-messages MAX-MESSAGES]
                          [--throughput THROUGHPUT] [--acks ACKS] [--producer.config CONFIG_FILE]
verifiable-producer: error: unrecognized arguments: '--new-producer'

any ideas ?

Don't have an account?
Coming from Hortonworks? Activate your account here