Hi everyone,

I'd like to discuss PIP-504, which proposes a broker option to select the
active Failover consumer in subscription order on non-partitioned topics.

We used a Failover subscription on a single topic to elect a leader among
workers. When we added workers, consistent hashing sometimes moved
leadership away from a healthy worker. We wanted new workers to join as
standbys and take over only when it was their turn.

The proposed setting, nonPartitionedTopicFailoverUseSubscriptionOrder,
defaults to false. When enabled, the first consumer to join stays active
while it remains connected. Standbys take over in join order regardless of
priority, and a reconnecting consumer joins last.

I'd appreciate feedback on the scope and the config name. A broker-wide
setting is simple, but a multi-topic or regex consumer that joins every
topic first can become active on all of them. Would a topic or namespace
policy be more useful for mixed workloads? The PIP also covers a
consequence for leader election: on a persistent topic, a seek or cursor
reset can hand leadership and replay to the next standby.

PIP: https://github.com/apache/pulsar/pull/27767
Implementation: https://github.com/apache/pulsar/pull/27730

Thanks,
Oneby Wang

Reply via email to