Revert "reduce cost of resilience4j metrics"

This reverts commit 8e429e267f.
This commit is contained in:
Jon Chambers
2025-08-28 09:36:19 -04:00
committed by Jon Chambers
parent 89c7521be0
commit d33761f107
2 changed files with 8 additions and 35 deletions

View File

@@ -32,6 +32,14 @@ import org.whispersystems.textsecuregcm.util.ResilienceUtil;
/**
* Adds a circuit breaker to every Netty {@link Channel} that gets created, so that a single unhealthy shard does not
* impact all cluster operations.
* <p>
* For metrics to be registered, users <em>must</em> create a synthetic {@link ClusterTopologyChangedEvent} after the
* initial connection. For example:
* <pre>
* clusterClient.connect();
* clusterClient.getResources().eventBus().publish(
* new ClusterTopologyChangedEvent(Collections.emptyList(), clusterClient.getPartitions().getPartitions()));
* </pre>
*/
public class LettuceShardCircuitBreaker implements NettyCustomizer {