Sorry my bad..my kafka docker instance was down.. thanks
On 4 April 2016 at 10:09, Ratha v <vijayara...@gmail.com> wrote: > > Hi all; > I'm getting above exception when i try to produce simple string messages > using kafka 0.9.01 version. I could not produce messages now. > > The warning i get is; > > buffer.memory = 33554432 > > timeout.ms = 30000 > > key.serializer = class > org.apache.kafka.common.serialization.StringSerializer > > sasl.kerberos.service.name = null > > sasl.kerberos.ticket.renew.jitter = 0.05 > > ssl.keystore.type = JKS > > ssl.trustmanager.algorithm = PKIX > > block.on.buffer.full = false > > ssl.key.password = null > > max.block.ms = 60000 > > sasl.kerberos.min.time.before.relogin = 60000 > > connections.max.idle.ms = 540000 > > ssl.truststore.password = null > > max.in.flight.requests.per.connection = 5 > > metrics.num.samples = 2 > > client.id = > > ssl.endpoint.identification.algorithm = null > > ssl.protocol = TLS > > request.timeout.ms = 30000 > > ssl.provider = null > > ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1] > > acks = all > > batch.size = 16384 > > ssl.keystore.location = null > > receive.buffer.bytes = 32768 > > ssl.cipher.suites = null > > ssl.truststore.type = JKS > > security.protocol = PLAINTEXT > > retries = 0 > > max.request.size = 1048576 > > value.serializer = class > org.apache.kafka.common.serialization.StringSerializer > > ssl.truststore.location = null > > ssl.keystore.password = null > > ssl.keymanager.algorithm = SunX509 > > metrics.sample.window.ms = 30000 > > partitioner.class = class > org.apache.kafka.clients.producer.internals.DefaultPartitioner > > send.buffer.bytes = 131072 > > linger.ms = 1 > > > *2016-04-04_10:07:52.551 WARN o.a.k.c.producer.ProducerConfig - The > configuration serializer.class = > org.apache.kafka.common.serialization.StringSerializer was supplied but > isn't a known config.* > > 2016-04-04_10:07:52.553 INFO o.a.kafka.common.utils.AppInfoParser - Kafka > version : 0.9.0.1 > > 2016-04-04_10:07:52.553 INFO o.a.kafka.common.utils.AppInfoParser - Kafka > commitId : 23c69d62a0cabf06 > > > Here is my sample producer; > > package org.test; > > import java.io.IOException; > import java.util.Properties; > > import org.apache.kafka.clients.producer.KafkaProducer; > import org.apache.kafka.clients.producer.ProducerRecord; > > > public class Producer { > > private void generateMessgaes() throws IOException { > String topic = "LOB_TOPIC"; > > Properties props = new Properties(); > props.put("bootstrap.servers", "xxx:9092"); > props.put("acks", "all"); > props.put("retries", 0); > props.put("batch.size", 16384); > props.put("linger.ms", 1); > props.put("buffer.memory", 33554432); > props.put("key.serializer", > "org.apache.kafka.common.serialization.StringSerializer"); > props.put("value.serializer", > "org.apache.kafka.common.serialization.StringSerializer"); > props.put("serializer.class", > "org.apache.kafka.common.serialization.StringSerializer"); > > > KafkaProducer<String, String> producer = null; > try { > producer = new KafkaProducer<>(props); > for (int i = 0; i < 10; i++) { > producer.send(new ProducerRecord<String, String>(topic, "test msg")); > } > > } catch (Exception e) { > e.printStackTrace(); > System.out.println("Error in publishing messages to the topic : " + topic); > > } finally { > producer.close(); > } > } > > public static void main(String[] args) throws IOException { > > Producer producer = new Producer(); > producer.generateMessgaes(); > System.out.println("$$$$$"); > } > } > > > Thanks > -- > -Ratha > http://vvratha.blogspot.com/ > -- -Ratha http://vvratha.blogspot.com/