Closed techjourney010 closed 3 years ago
I suggest downgrading to Spring Kafka 2.6.x in your application. We will see if we can get that fixed in the meantime.
Explicitly setting the ackMode
property (RECORD or BATCH) avoids this problem.
spring.cloud.stream.kafka.bindings.input-in-0.consumer.ack-mode=BATCH
ContainerProperties.setAckOnError(boolean) doesn't exist in spring-kafka:2.7.1 and consumer creation tries to invoke it
Spring Cloud Stream project is generated using: start.spring.io
application.yml:
Consumer creation fails at start up
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'inputBindingLifecycle'; nested exception is java.lang.NoSuchMethodError: 'void org.springframework.kafka.listener.ContainerProperties.setAckOnError(boolean)'
Spring boot parent:
<version>2.5.0-SNAPSHOT</version>
Spring cloud:<spring-cloud.version>2020.0.3-SNAPSHOT</spring-cloud.version>
As binder I use Kafka:
and it brings to the project spring-kafka:2.7.1
Starting the app: