We use Spring Kafka together with Spring Boot (all latest versions). We switched handling of Kafka messages into @KafkaHandler annotated methods and expected that @Valid/@Validated together with @Payload will ensure payload validation, but that did not happen. This feature is working for @KafkaListener, should it be also working for @KafkaHandler?
@KafkaListener(...)
@Component
public class NotificationListener {
@KafkaHandler
public void handleV1(@Payload @Valid NotificationV1 notification) {
Thank you.