It depends on the subscription type you are using. Each behaves differently in this scenario
d
David Wang
08/14/2023, 8:50 PM
What about the exclusive subscription type?
d
David K
08/14/2023, 8:56 PM
Using the exclusive subscription type, this scenario could happen. You might want to consider using the key-shared subscription type, which does handle this scenario in a seamless manner by detecting the addition of a new partition, halting the consumption of messages and reassigning the partitions to different consumers in the group.
d
David Wang
08/14/2023, 8:57 PM
Interesting. I thought that only happened when consumers are added!
d
David K
08/14/2023, 9:16 PM
In general, the addition of a partition doesn’t impact key assignment to the consumers unless the producers are using the round-robin mapping strategy. Do you know which strategy your producers are using?
d
David Wang
08/14/2023, 9:18 PM
Do you mean the MessageRoutingMode? It's using the RoundRobinPartition policy, but I did not think there's a difference between RoundRobinPartition or SinglePartition if a partition key is specified.