I'm trying to connect from a java application to Kafka, when I launch the app I get the following message on stdout:
log4j:WARN No such property [host] in kafka.producer.KafkaLog4jAppender.
log4j:WARN No such property [serializer] in kafka.producer.KafkaLog4jAppender.
log4j:WARN No such property [port] in kafka.producer.KafkaLog4jAppender.
Here is my log4.properties as provided in the official quick start:
// define the kafka log4j appender config parameters
log4j.appender.KAFKA=kafka.producer.KafkaLog4jAppender
// REQUIRED: set the hostname of the kafka server
log4j.appender.KAFKA.Host=hadoop-server
// REQUIRED: set the port on which the Kafka server is listening for connections
log4j.appender.KAFKA.Port=9092
// REQUIRED: the topic under which the logger messages are to be posted
log4j.appender.KAFKA.Topic=test
// the serializer to be used to turn an object into a Kafka message. Defaults to kafka.producer.DefaultStringEncoder
log4j.appender.KAFKA.Serializer=kafka.test.AppenderStringSerializer
// do not set the above KAFKA appender as the root appender
log4j.rootLogger=INFO
// set the logger for your package to be the KAFKA appender
What I'm missing? how can I fix it?
In Kafka 0.8 instead of using
try specifiying the broker list, as in
Also, the Serializer property has been changed to SerializerClass