Spring kafka not validating the payload
sanurani2020 opened this issue · 2 comments
I've tried both @Valid and @validated. I've tried adding a MethodValidationPostProcessor bean. I've tried adding a Validator to the KafkaListenerEndpointRegistrar (as per the EnableKafka javadoc):
But no matter what I try, I can still pass invalid requests in and they process without error.
Any help will be appreciated.
@KafkaListener( topics = "${spring.tradeweb.kafka.topic}")
public void onMessage(@Valid @payload List> records) {
logger.info("received TradewebMessage='{}'", records.size());
List messageList = new ArrayList<>();
Using Spring boot 2.0.5 and kafka 2.1.10
Seems unrelated to this repository. Any indication that what you're trying to do works with other Kafka setups but not with this one?
My apologies for posting here , was preparing to post in kafak dev community.