|
|
|
@ -63,6 +63,7 @@ public class KafkaController {
|
|
|
|
|
consumer.subscribe(Collections.singletonList(topic));
|
|
|
|
|
ConsumerRecords<String, String> records = consumer.poll(100);
|
|
|
|
|
JSONArray jsonArray=new JSONArray();
|
|
|
|
|
System.out.println("records.count:"+records.count());
|
|
|
|
|
for (ConsumerRecord<String, String> consumerRecord : records) {
|
|
|
|
|
String kfkContent = consumerRecord.value();
|
|
|
|
|
System.out.println(kfkContent);
|
|
|
|
|