From d8eda70b793d347c006c1b98212f59c9c0914549 Mon Sep 17 00:00:00 2001 From: Eric Bowden Date: Fri, 1 May 2026 10:29:37 -0500 Subject: [PATCH] Retry CreateEgressSubscription if it fails with a RESOURCE_TEMPORARILY_UNAVAILABLE exception (matches Java API). --- src/Adaptive.Cluster/Client/AeronCluster.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Adaptive.Cluster/Client/AeronCluster.cs b/src/Adaptive.Cluster/Client/AeronCluster.cs index 5b06ccd..bafab8d 100644 --- a/src/Adaptive.Cluster/Client/AeronCluster.cs +++ b/src/Adaptive.Cluster/Client/AeronCluster.cs @@ -2244,7 +2244,20 @@ private void CreateEgressSubscription() egressRegistrationId = ctx.AeronClient().AsyncAddSubscription(ctx.EgressChannel(), ctx.EgressStreamId()); } - egressSubscription = ctx.AeronClient().GetSubscription(egressRegistrationId); + try + { + egressSubscription = ctx.AeronClient().GetSubscription(egressRegistrationId); + } + catch (RegistrationException ex) + { + egressRegistrationId = NULL_VALUE; + + if (ErrorCode.RESOURCE_TEMPORARILY_UNAVAILABLE != ex.ErrorCode()) + { + throw; + } + } + if (null != egressSubscription) { egressPoller = new EgressPoller(egressSubscription, FRAGMENT_LIMIT);