When using a single partitioned topic, we saw that the first instance of a consumer connected to the topic and the second instance was able to connect but remained in standby. Let’s now take a look at how the Failover Subscription works for a topic with multiple partitions.
When using a Failover Subscription with a topic with multiple partitions, the behavior depends on the number of consumers compared to the number of partitions.
One consumer: The consumer will receive message from all partitions.
Fewer consumers than partitions: Each consumer may receive data from multiple partitions, but data from a single partition will all be routed to the same consumer.
Equal number of consumers and partitions: Each consumer will receive data from exactly one partition.
More consumers than partitions: If there are x number of partitions, x number of consumers will receive data from exactly one partition. Additional consumers will remain idle.
In all cases, message ordering is guaranteed on a per partition basis.