micronaut-projects / micronaut-kafka

Integration between Micronaut and Apache Kafka
Apache License 2.0
83 stars 104 forks source link

New Error Strategy LOG_AND_RESUME_AT_NEXT_RECORD to enable DLQs #1067

Open jdeex opened 3 weeks ago

jdeex commented 3 weeks ago

Feature description

Sometimes Retrying is not an option, you want to skip the message and continue and perhaps let another consumer deal with the failed messages. The documentation currently recommends that for the RESUME_AT_NEXT_RECORD error strategy, but each developer has to code that. There are some issues with that too: #110

It would be great to:

Configuration:

@KafkaListener(
    value = "myGroup",
    errorStrategy = @ErrorStrategy(
        value = ErrorStrategyValue.LOG_AND_RESUME_AT_NEXT_RECORD,
        dlq = "${my.dlq.topic.name}"
    )
)