I get the below exception because I produce from one project and the consumer consumes from another project. How can I fix this. Obviously the packages are not the same. So
You can whitelist your package by changing assessmentAttemptDetailsEntityConsumerFactory()
like this:
@Bean
public ConsumerFactory<String, AssessmentAttemptDetailsEntity> assessmentAttemptDetailsEntityConsumerFactory() {
JsonDeserializer<AssessmentAttemptDetailsEntity>
deserializer = new JsonDeserializer<>();
deserializer.addTrustedPackages("com.lte.assessment.assessments");//your package
return new DefaultKafkaConsumerFactory(config,deserializer);
}