flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prateekarora <prateek.arora...@gmail.com>
Subject Re: Getting java.lang.Exception when try to fetch data from Kafka
Date Mon, 25 Apr 2016 17:20:14 GMT
Hi

I have java program  that sending data into kafka topic using kafa client
API (0.8.2)

here is sample to code using to send data in kafka topic :

import org.apache.kafka.clients.producer.Producer;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.clients.producer.ProducerRecord;

ProducerRecord<String, byte[]> imageRecord;
imageRecord = new ProducerRecord<String, byte[]>(streamInfo.topic,
                        Integer.toString(messageKey), imageData);

producer.send(imageRecord);


Regrads
Prateek



--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Getting-java-lang-Exception-when-try-to-fetch-data-from-Kafka-tp6365p6415.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.

Mime
View raw message