Created
March 4, 2022 10:40
-
-
Save Daniel-Jacob/aaa2a0f9c440d5e94b81f4e4bc122f9a to your computer and use it in GitHub Desktop.
kafka listener for fixed backoff
This file contains 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
@Component | |
class FixedBackOffKafkaListener { | |
private val log = LoggerFactory.getLogger(FixedBackOffKafkaListener::class.java) | |
@KafkaListener( | |
id = "\${spring.kafka.consumer.group-id}", | |
topics = ["\${topic}"] | |
) | |
fun onReceive(message: String) { | |
log.info("processing message: $message") | |
throw Exception() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment