I am trying to setup Kafka Consumer using SpringBoot(1.5.9) and Spring-kafka(2.1.0). However when I start my app I get java.lang.NoSuchMethodError: org.springframework.util.Asse
The Spring-kafka 2.1
is based on the Spring Framework 5.0
and that is exactly what you see with that error:
java.lang.NoSuchMethodError: org.springframework.util.Assert.state(ZLjava/util/function/Supplier;)
Spring Framework 4.3
(the foundation for Spring Boot 1.5
) doesn't support Java 8 yet.
You should consider to switch to Spring Boot 2.0
or stick with the Spring Kafka 1.3.2
which is compatible with Boot 1.5
background and can be reconfigured for Apache Kafka 1.0
Client.