graham-macdonald-simplisafe opened a new issue, #479:
URL: https://github.com/apache/pulsar-client-node/issues/479
**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**
- apache/pulsar-client-cpp#568 (C++ client cluster-level failover support)
**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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]