projects
/
demos
/
kafka
/
training
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5be01a7
)
Asciidoc-Tags entfernt
author
Kai Moritz
<kai@juplo.de>
Tue, 2 Aug 2022 19:04:16 +0000
(21:04 +0200)
committer
Kai Moritz
<kai@juplo.de>
Tue, 2 Aug 2022 19:04:16 +0000
(21:04 +0200)
src/main/java/de/juplo/kafka/SimpleConsumer.java
patch
|
blob
|
history
diff --git
a/src/main/java/de/juplo/kafka/SimpleConsumer.java
b/src/main/java/de/juplo/kafka/SimpleConsumer.java
index
03a9e6a
..
ef8d7e3
100644
(file)
--- a/
src/main/java/de/juplo/kafka/SimpleConsumer.java
+++ b/
src/main/java/de/juplo/kafka/SimpleConsumer.java
@@
-46,14
+46,11
@@
public class SimpleConsumer
log.info("{} - Subscribing to topic test", id);
consumer.subscribe(Arrays.asList("test"));
- // tag::loop[]
while (running)
{
ConsumerRecords<String, String> records =
consumer.poll(Duration.ofSeconds(1));
- // Do something with the data...
- // end::loop[]
log.info("{} - Received {} messages", id, records.count());
for (ConsumerRecord<String, String> record : records)
{
@@
-68,9
+65,7
@@
public class SimpleConsumer
record.value()
);
}
- // tag::loop[]
}
- // end::loop[]
}
catch(Exception e)
{