Raj
Raj

Reputation: 1727

How can I a make a bunch of custom exceptions to be a non-retry-able exception?

I'm using spring boot 2.1.7.RELEASE and spring-kafka 2.2.8.RELEASE.And I'm using @KafkaListener annotation to create a consumer and I'm using all default settings for the consumer.

Now my questions

  1. How make a bunch of custom exceptions to be a non-retry-able exception(For example DeserializationException)?

Upvotes: 1

Views: 1303

Answers (1)

Gary Russell
Gary Russell

Reputation: 174494

The ability to classify exceptions to be retryable or not was added to the SeekToCurrentErrorHandler in version 2.3 (boot 2.2).

https://github.com/spring-projects/spring-kafka/issues/983

improved by https://github.com/spring-projects/spring-kafka/issues/1260

And deserialization exceptions are classified as not retryable by default.

Upvotes: 2

Related Questions