-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Support Redis Cluster #40155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
00976ee
to
078b5c4
Compare
src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Bridge/Redis/Transport/Connection.php
Outdated
Show resolved
Hide resolved
8d6de3a
to
35fa491
Compare
This is a temporary fix until symfony/symfony#40155 is merged
139e9cc
to
85889d3
Compare
I have rebased the code on the latest commits of the |
This is a temporary fix until symfony/symfony#40155 is merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Hey. I really like this feature. Well done.
Im not saying your format is better or worse, Im just saying we should be consistent. |
if (!$this->ready) { | ||
$this->redis = $this->initializer->__invoke($this->redis); | ||
$this->ready = true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Im missing something, but can you tell me why this was changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's because the signature of the initializer has changed (this is fine because this is internal)
85889d3
to
04530fb
Compare
Thank you @nesk. |
This PR was merged into the 5.3-dev branch. Discussion ---------- [Messenger] Document DSN format for Redis Cluster Document Redis Cluster support for the Messenger component. Related to symfony/symfony#40155 Commits ------- 243d84b [Messenger] Document DSN format for Redis Cluster
This PR brings support for Redis Cluster in the Messenger component:
RedisCluster
object when instanciating theConnection
class, which brings support for Redis Cluster without any friction.config/packages/messenger.yaml
.Instanciating
Connection
with aRedisCluster
object:Configuring a Redis Cluster from YAML:
This format allows to define multiple hosts for a Redis Cluster and still contains valid URLs. Custom configuration is still supported, it can be specified on only one of the URLs in the DSN (see
lazy
above). If the user provides multiple configurations on different URLs, they are simply merged with the following code and if an option is defined multiple times then the latest takes precedence (seemultipleConfig
above).I understand the way the DSN is handled could not suit you. Please, if you close this PR only for the DSN part, just tell me and I will make a new PR with only the first commit.