Closed sanurani2020 closed 4 years ago
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.
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