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:
ea9b7c9
)
Vorlage
spring/spring-consumer--kafkalistener--vorlage---2023-06-signal
author
Kai Moritz
<kai@juplo.de>
Sat, 12 Nov 2022 22:10:09 +0000
(23:10 +0100)
committer
Kai Moritz
<kai@juplo.de>
Thu, 15 Jun 2023 18:54:31 +0000
(20:54 +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
fe0479f
..
e9ce220
100644
(file)
--- a/
src/main/java/de/juplo/kafka/SimpleConsumer.java
+++ b/
src/main/java/de/juplo/kafka/SimpleConsumer.java
@@
-17,17
+17,11
@@
public class SimpleConsumer
private String id;
private long consumed = 0;
- @KafkaListener(topics = "${simple.consumer.topic}")
private void handleRecord(
- @Header(KafkaHeaders.RECEIVED_TOPIC)
String topic,
- @Header(KafkaHeaders.RECEIVED_PARTITION_ID)
Integer partition,
- @Header(KafkaHeaders.OFFSET)
Long offset,
- @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY)
String key,
- @Payload
String value)
{
consumed++;