Skip to content

feat: add replicateSubscriptionState to ConsumerConfig#482

Merged
shibd merged 1 commit intoapache:masterfrom
shibd:feat/replicate-subscription-state-v2
Apr 22, 2026
Merged

feat: add replicateSubscriptionState to ConsumerConfig#482
shibd merged 1 commit intoapache:masterfrom
shibd:feat/replicate-subscription-state-v2

Conversation

@shibd
Copy link
Copy Markdown
Member

@shibd shibd commented Apr 22, 2026

Motivation

Fixes #478

The ConsumerConfig interface was missing replicateSubscriptionState, which is needed for geo-replication failover scenarios where subscription cursor state should be synchronized across clusters.

Changes

  • Added CFG_REPLICATE_SUBSCRIPTION_STATE constant in src/ConsumerConfig.cc
  • Added handling to pass the config value through to ConsumerConfiguration::setReplicateSubscriptionStateEnabled() on the underlying C++ object
  • Added replicateSubscriptionState?: boolean to the ConsumerConfig TypeScript interface in index.d.ts
  • Added a test case in tests/consumer.test.js to verify the option can be set when creating a consumer

Add support for replicateSubscriptionState option in ConsumerConfig,
which enables geo-replication failover by synchronizing subscription
cursor state across clusters.

Fixes apache#478
@shibd shibd force-pushed the feat/replicate-subscription-state-v2 branch from 78c791f to 6ba48bc Compare April 22, 2026 02:29
@shibd shibd merged commit 7f6756d into apache:master Apr 22, 2026
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add replicateSubscriptionState to ConsumerConfig

1 participant