Last active
July 26, 2021 04:46
-
-
Save maheshwarLigade/643d1574a5bfb4c1a97ba1681d9f3143 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.techwasti.kafkaex; | |
import io.micronaut.configuration.kafka.annotation.KafkaKey; | |
import io.micronaut.configuration.kafka.annotation.KafkaListener; | |
import io.micronaut.configuration.kafka.annotation.Topic; | |
import io.micronaut.configuration.kafka.annotation.OffsetReset; | |
@KafkaListener(offsetReset = OffsetReset.EARLIEST) | |
public class GreetMessageConsumer { | |
@Topic("greet") | |
public void receive(@KafkaKey String day, String message) { | |
System.out.println("Got Message for the - " + day + " and Message is " + message); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment