Ajay
Ajay

Reputation: 485

Configure Kafka consumer acknowledgement mode for Spring Boot Kafka project

I'm using Spring Boot version 1.5.2.RELEASE along with Spring Kafka version 1.1.2.RELEASE. Via the application.properties file I do see available options (spring.kafka.consumer.*) to configure Kafka Consumer.

What I'm not able to find though is a way to configure the acknowledgement mode.

Upvotes: 0

Views: 2440

Answers (2)

Ajay
Ajay

Reputation: 485

spring.kafka.listener.ack-mode=

Upvotes: 2

wthamira
wthamira

Reputation: 2248

You can use Spring Cloud Stream Kafka Binder to streaming messages. In that case

<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-stream-binder-kafka</artifactId>
</dependency>

and configure consumer like this.

spring.cloud.stream.kafka.bindings.<channelName>.consumer..

and producer like this

spring.cloud.stream.kafka.bindings.<channelName>.producer..

to more detail follow this or this video

Upvotes: 0

Related Questions