<build>
<plugins>
- <plugin>
- <groupId>pl.project13.maven</groupId>
- <artifactId>git-commit-id-plugin</artifactId>
- </plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
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++;