Hi,
I’m trying to setup a Clustered connection using the ConnectionSettings to keep trying to connect to EventStore when the service has gone down.
When I connect to a single instance, the settings are respected the connection keeps retrying for the specified period.
If I then use this same settings object with the clustered connection, it doesn’t respect the settings.
My example code is:
var settings = ConnectionSettings.Create()
.KeepReconnecting()
.SetReconnectionDelayTo(TimeSpan.FromSeconds(10))
.UseConsoleLogger();
//
// Attempt to connect to single (unreachable) IP
//
var singleInstanceConnection = EventStoreConnection.Create(settings, CreateIPEndPoint(1));
singleInstanceConnection.ConnectAsync().Wait();
//
// Attempt to connect to (unreachable) cluster of IPs
//
var clusterSettings = ClusterSettings.Create()
.DiscoverClusterViaGossipSeeds()
.SetGossipSeedEndPoints(GetGossipSeeds())
.Build();
// Connection to cluster appears to ignore settings. Reconnects 10 times then stops.
var clusteredInstanceConnection = EventStoreConnection.Create(settings, clusterSettings);
clusteredInstanceConnection.ConnectAsync().Wait();
Am I missing something here?
Thanks in advance…