Punter Vicky
Punter Vicky

Reputation: 17042

Spring Boot Microservice Connecting to Kafka

I have a Kafka consumer defined in my microservice. I have deployed 5 instances of my application. I have set concurrency parameter in ConcurrentKafkaListenerContainerFactory to 2. Does this mean there are 2 consumer instances for each app instance or 2 consumer instances for the entire topic that I am connecting to?

Upvotes: 0

Views: 488

Answers (1)

Gary Russell
Gary Russell

Reputation: 174789

It means you have 2 consumers in each app instance; you need at least 10 partitions on the topic so each consumer will be assigned a partition. The app instances don't know about each other.

Upvotes: 1

Related Questions