Summary
The Node.js client does not support cluster-level failover — the ability for a Pulsar client to automatically switch from a primary cluster to a secondary cluster when the primary becomes unavailable.
Context
The Java client has supported this since Pulsar 2.10 (May 2022) via AutoClusterFailover and ControlledClusterFailover, both built on the ServiceUrlProvider abstraction. The .NET client (Pulsar.Client) has also independently implemented equivalent functionality via IServiceInfoProvider. The Node.js client wraps the C++ library, which also does not yet support cluster-level failover (tracked in apache/pulsar-client-cpp#568). Once the C++ client adds AutoClusterFailover support, this issue tracks surfacing it in the Node.js ClientConfig.
Proposed API
interface AutoClusterFailoverConfig {
primary: string;
secondary: string[];
failoverDelayMs?: number; // default: 30000
switchBackDelayMs?: number; // default: 60000
checkIntervalMs?: number; // default: 30000
secondaryAuthentication?: { [serviceUrl: string]: AuthenticationConfig };
}
interface ClientConfig {
serviceUrl?: string;
serviceUrlProvider?: AutoClusterFailoverConfig;
// ... existing properties ...
}
Depends On
Use Case
Deploying Pulsar with geo-replication across multiple AWS regions and needing producer clients to automatically failover to a secondary cluster when their local cluster becomes unavailable, without requiring DNS-level failover or application-level detection logic.
Summary
The Node.js client does not support cluster-level failover — the ability for a Pulsar client to automatically switch from a primary cluster to a secondary cluster when the primary becomes unavailable.
Context
The Java client has supported this since Pulsar 2.10 (May 2022) via
AutoClusterFailoverandControlledClusterFailover, both built on theServiceUrlProviderabstraction. The .NET client (Pulsar.Client) has also independently implemented equivalent functionality viaIServiceInfoProvider. The Node.js client wraps the C++ library, which also does not yet support cluster-level failover (tracked in apache/pulsar-client-cpp#568). Once the C++ client adds AutoClusterFailover support, this issue tracks surfacing it in the Node.jsClientConfig.Proposed API
Depends On
Use Case
Deploying Pulsar with geo-replication across multiple AWS regions and needing producer clients to automatically failover to a secondary cluster when their local cluster becomes unavailable, without requiring DNS-level failover or application-level detection logic.