Reputation: 1
I am using spring-cloud-stream-kafka. I am starting 2 instances of a consumer application with the same group name testGroup consuming messages from a Kafka topic testTopic with single partition, I expected one of the consumer instances to consume messages from the Kafka topic and the other instance to not consume anything since they share the same group name. I am using 0.8.xx version of Kafka client. Here are my properties
spring.cloud.stream.bindings.input.destination=testTopic
spring.cloud.stream.bindings.input.group=testGroup
Any idea what could be happening ?
Upvotes: 0
Views: 517
Reputation: 2400
Right, that is the expected behaviour for 1.0.3/ 0.8 where we use the SimpleConsumer API. You don't need to do that after 1.1 - see http://docs.spring.io/spring-cloud-stream/docs/1.0.3.RELEASE/reference/htmlsingle/index.html#_instance_index_and_instance_count for details.
Upvotes: 1
Reputation: 4179
Which version of Spring Cloud Stream are you using?
I think you are using 1.0.3
version of Spring Cloud Stream which supports Kafka 0.8.xx
version. Anyway, this looks like a bug.
Also, I don't see this issue when using Kafka 0.9 or 0.10 with Spring Cloud Stream 1.1.x.
Upvotes: 0