I have multiple consumers all with the same group.id listening for a particular topic. The topic has one partition.
It is my understanding that consumers from the same consumer group (identified by identical group.id) would get messages in a round robin fashion such that a message only is handled by a single consumer. The consumers are running in different Windows Services on different machines.
The consumer is written in C# and based on Confluent's Apache Kafka .NET client.
The configuration looks like:
var config = new Dictionary<string, object>
{
{"group.id", "MyConsumerGroupId"},
{"enable.auto.commit", true},
{"auto.commit.interval.ms", 5000},
{"log.connection.close", false},
{"session.timeout.ms", 30000},
{"heartbeat.interval.ms", 5000},
{"queued.min.messages", 1000},
{"partition.assignment.strategy", "roundrobin"},
{"bootstrap.servers", _kafkaCluster},
{
"default.topic.config", new Dictionary<string, object>
{
{"auto.offset.reset", "largest"}
}
}
};
However I do experience that all consumers gets the same messages. From the consumer I log info about the message received and here I see multiple log entries with same message, topic, offset, and partition.
Is this the expected behaviour?


