Is there a way to set Relay::OPT_CLIENT_TRACKING flag in the Relay\Cluster constructor? #161
-
|
Hi, I have tested the new option <?php
use Relay\Relay;
use Relay\Cluster;
$relayCluster = new Cluster(
'my-relay-cluster-client',
[
'redis-cluster:6374'
],
5,
5,
true,
);
$relayCluster->setOption(Relay::OPT_CLIENT_TRACKING, false);This code will generate a single tracked connection, but any additional connections based on I think this is because the constructor causes the initial connection to be created before user can set the option on the next line. Is there any way to pass |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
We don't have these documented in the stubs (which I'll fix), but you should be able to pass these into cluster |
Beta Was this translation helpful? Give feedback.




Yeah, Relay will connect and enable client tracking on
Relay\Cluster::__construct(). You should then be able to disable client tracking at any point and Relay will switch to a different connection without tracking enabled.We need to update the logic to account for disabling tracking before any connection is made. The fix shouldn't be too difficult.