Skip to content
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

Add documentation for the Redis transport #11341

Merged
merged 1 commit into from
May 11, 2019

Conversation

alexander-schranz
Copy link
Contributor

@alexander-schranz alexander-schranz commented Apr 7, 2019

This will add documentation how to configure and using the redis transport with the messenger component.

symfony/symfony#30917

#EUFOSSA

@wouterj wouterj added ⭐️ EU-FOSSA Hackathon https://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming Waiting Code Merge Docs for features pending to be merged labels Apr 7, 2019
@wouterj wouterj added this to the next milestone Apr 7, 2019
messenger.rst Show resolved Hide resolved
Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes Redis and sometimes redis is written, we should only use one consistently

messenger.rst Outdated Show resolved Hide resolved
messenger.rst Outdated Show resolved Hide resolved
@alexander-schranz alexander-schranz changed the title Add documentation for the redis transport Add documentation for the Redis transport Apr 18, 2019
symfony-splitter pushed a commit to symfony/messenger 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
-------

ff0b8554ea Refractor redis transport using redis streams
7162d2ec1d Implement redis transport
fabpot added a commit to symfony/symfony 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
@weaverryan weaverryan removed the Waiting Code Merge Docs for features pending to be merged label Apr 27, 2019
@wouterj wouterj changed the base branch from master to 4.3 May 11, 2019 19:19
@wouterj wouterj merged commit c22fade into symfony:4.3 May 11, 2019
wouterj added a commit 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
wouterj added a commit that referenced this pull request May 11, 2019
@wouterj
Copy link
Member

wouterj commented May 11, 2019

Congratz on your code merge and many thanks for providing docs @alexander-schranz! I've added the versionadded directive in daaf7b2, but apart from that this was perfect.

OskarStark added a commit that referenced this pull request May 13, 2019
* 4.3:
  Fix PHP-CS link
  Update serializer.rst
  [#11341] Added versionadded directive
  Add documentation for the Redis transport
  Typo
  Fix usage of StaticJwtProvider
  added a note about testing newer versions of Symfony
  fix indention
symfony-splitter pushed a commit to symfony/messenger that referenced this pull request Jan 28, 2020
…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
-------

ff0b8554ea Refractor redis transport using redis streams
7162d2ec1d Implement redis transport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐️ EU-FOSSA Hackathon https://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming Messenger Status: Reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants