You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #51687 [Messenger] Add support for multiple Redis Sentinel hosts (digilist)
This PR was merged into the 6.4 branch.
Discussion
----------
[Messenger] Add support for multiple Redis Sentinel hosts
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | n/a
| License | MIT
| Doc PR | n/a
Similar to #47003 which added support for multiple Redis Sentinel hosts for the Cache component, this PR adds support for multiple Sentinel hosts for the Messenger component.
This PR is inspired by the implementation in the cache component and works very similar. A DSN could look like this: `redis:?host[localhost:26377]&host[localhost:26379]&sentinel_master=db`.
I changed the Sentinel host environment variable for the ingegration to an invalid host at. As a result I noticed that Relay also fails in such case and so I expanded my earlier changes from #51598 to also ignore unreachable hosts with the Relay extension.
Commits
-------
3380518 [Messenger] Add support for multiple Redis Sentinel hosts
} while (++$hostIndex < \count($hosts) && !$address);
237
237
238
238
if (isset($params['redis_sentinel']) && !$address) {
239
-
thrownewInvalidArgumentException(sprintf('Failed to retrieve master information from sentinel "%s".', $params['redis_sentinel']));
239
+
thrownewInvalidArgumentException(sprintf('Failed to retrieve master information from sentinel "%s".', $params['redis_sentinel']), previous: $redisException ?? null);
if (!$address = $sentinelClient->getMasterAddrByName($sentinelMaster)) {
100
-
thrownewInvalidArgumentException(sprintf('Failed to retrieve master information from master name "%s" and address "%s:%d".', $sentinelMaster, $host, $port));
} while (++$hostIndex < \count($hosts) && !$address);
118
+
119
+
if (!$address) {
120
+
thrownewInvalidArgumentException(sprintf('Failed to retrieve master information from sentinel "%s".', $sentinelMaster), previous: $redisException ?? null);
0 commit comments