[Messenger] Add a redis stream transport#30917
Merged
fabpot merged 2 commits intosymfony:masterfrom Apr 27, 2019
Merged
Conversation
e355a4e to
62b159c
Compare
Contributor
|
Needs |
jderusse
reviewed
Apr 6, 2019
lyrixx
reviewed
Apr 6, 2019
src/Symfony/Component/Messenger/Tests/Transport/RedisExt/ConnectionTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Transport/RedisExt/ConnectionTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Transport/RedisExt/ConnectionTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Transport/RedisExt/ConnectionTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Transport/RedisExt/Fixtures/long_receiver.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Transport/RedisExt/RedisExtIntegrationTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Transport/RedisExt/RedisExtIntegrationTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Transport/RedisExt/RedisExtIntegrationTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Transport/RedisExt/RedisExtIntegrationTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Tests/Transport/RedisExt/RedisExtIntegrationTest.php
Outdated
Show resolved
Hide resolved
62b159c to
e0d5932
Compare
jewome62
reviewed
Apr 6, 2019
src/Symfony/Component/Messenger/Tests/Transport/RedisExt/ConnectionTest.php
Outdated
Show resolved
Hide resolved
781ae29 to
580fdb9
Compare
36 tasks
cba457c to
52d3d68
Compare
chalasr
requested changes
Apr 21, 2019
src/Symfony/Component/Messenger/Transport/RedisExt/Connection.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Messenger/Transport/RedisExt/Connection.php
Outdated
Show resolved
Hide resolved
97af470 to
a4cceee
Compare
a4cceee to
4461d36
Compare
Contributor
Author
|
@chalasr thank you for your review. did fix it and register the factory in the framework bundle. |
chalasr
requested changes
Apr 25, 2019
src/Symfony/Component/Messenger/Transport/RedisExt/RedisSender.php
Outdated
Show resolved
Hide resolved
Member
|
Adding a test in as for amqp would be nice. |
d0b63af to
4ed23bd
Compare
4ed23bd to
ff0b855
Compare
chalasr
approved these changes
Apr 26, 2019
fabpot
approved these changes
Apr 27, 2019
Member
|
Thank you @alexander-schranz. |
fabpot
added a commit
that referenced
this pull request
Apr 27, 2019
…ander-schranz) This PR was merged into the 4.3-dev branch. Discussion ---------- [Messenger] Add a redis stream transport | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | Yes | Fixed tickets | #28681 | License | MIT | Doc PR | symfony/symfony-docs#11341 As discussed in #28681 this will refractor @soyuka implementation of redis using the redis stream features so we don't need to handle parking the messages ourself and redis is doing it for us. Some interesting links about streams: - https://redis.io/topics/streams-intro - https://brandur.org/redis-streams ``` +-----------R | GET | -> XREADGROUP +-----------+ | | handleMessage V +-----------+ No | failed? |---------------------------+ +-----------+ | | | | Yes | V | +-----------+ No | | retry? |---------------------------+ +-----------+ | | | | Yes | V V +-----------R +-----------R | REJECT | -> XDEL | ACK | -> XACK +-----------+ +-----------+ ``` **GET**: Will use `XREADGROUP` to read the one message from the stream **REJECT**: Reject will just remove the message with `XDEL` from the stream as adding it back to the stream is handled by symfony worker itself **ACK**: Will use the `XACK` Method to ack the message for the specific group The sender will still be simple by calling the `XADD` redis function. #EU-FOSSA Commits ------- ff0b855 Refractor redis transport using redis streams 7162d2e Implement redis transport
Contributor
|
Nice work thanks @alexander-schranz ! |
Contributor
Author
|
@soyuka thank you for initial work! |
Merged
wouterj
added a commit
to symfony/symfony-docs
that referenced
this pull request
May 11, 2019
…chranz) This PR was submitted for the master branch but it was squashed and merged into the 4.3 branch instead (closes #11341). Discussion ---------- Add documentation for the Redis transport This will add documentation how to configure and using the redis transport with the messenger component. symfony/symfony#30917 #EUFOSSA Commits ------- c22fade Add documentation for the Redis transport
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in #28681 this will refractor @soyuka implementation of redis using the redis stream features so we don't need to handle parking the messages ourself and redis is doing it for us.
Some interesting links about streams:
GET: Will use
XREADGROUPto read the one message from the streamREJECT: Reject will just remove the message with
XDELfrom the stream as adding it back to the stream is handled by symfony worker itselfACK: Will use the
XACKMethod to ack the message for the specific groupThe sender will still be simple by calling the
XADDredis function.#EU-FOSSA