-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Messenger] Added SQS Messenger docs #14391
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
34bacb5
Update user_provider.rst
abdel-ben c3df056
minor #14339 Update user_provider.rst (abdel-ben)
wouterj cb0c526
Remove Michelle from the CARE team
Nyholm 98fd3cf
minor #14403 Remove Michelle from the CARE team (Nyholm)
wouterj 4bdb8f8
Merge branch '4.4' into 5.1
wouterj 9dd75a9
feat: add amazon sqs to docs
Simperfit 47dbe33
Added SQS Messenger docs
Nyholm 689df8c
cs
Nyholm d2fdd03
syntax
Nyholm f56ddd3
Syntax fix
Nyholm 5fa1465
Typo
Nyholm d198bb7
minor
Nyholm 7d530ac
Typos
Nyholm cf4331b
Sort alphabetically
Nyholm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,12 +29,6 @@ of them at once by emailing **[email protected]**: | |
* *Twitter*: `@EmilieLorenzo <https://twitter.com/EmilieLorenzo>`_ | ||
* *SymfonyConnect*: `emilielorenzo <https://connect.symfony.com/profile/emilielorenzo>`_ | ||
|
||
* **Michelle Sanver** | ||
|
||
* *E-mail*: michelle [at] liip.ch | ||
* *Twitter*: `@michellesanver <https://twitter.com/michellesanver>`_ | ||
* *SymfonyConnect*: `michellesanver <https://connect.symfony.com/profile/michellesanver>`_ | ||
|
||
* **Tobias Nyholm** | ||
|
||
* *E-mail*: tobias.nyholm [at] gmail.com | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1151,6 +1151,72 @@ during a request:: | |
:class:`Symfony\\Bundle\\FrameworkBundle\\Test\\KernelTestCase` | ||
or :class:`Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase`. | ||
|
||
Amazon SQS | ||
~~~~~~~~~~ | ||
|
||
.. versionadded:: 5.1 | ||
|
||
The Amazon SQS transport has been added in Symfony 5.1 | ||
Install it by running: | ||
|
||
.. code-block:: terminal | ||
|
||
$ composer require symfony/amazon-sqs-messenger | ||
|
||
The ``SQS`` transport configuration looks like this: | ||
|
||
.. code-block:: bash | ||
|
||
# .env | ||
MESSENGER_TRANSPORT_DSN=sqs://AKIAIOSFODNN7EXAMPLE:[email protected]/messages | ||
#MESSENGER_TRANSPORT_DSN=sqs://localhost:9494/messages?sslmode=disable | ||
|
||
.. note:: | ||
|
||
The transport will automatically create queues that are needed. This | ||
can be disabled setting the "auto_setup" option to ``false``. | ||
|
||
A number of options can be configured via the DSN or via the ``options`` key | ||
under the transport in ``messenger.yaml``: | ||
|
||
================== ====================================== ====================== | ||
Option Description Default | ||
================== ====================================== ====================== | ||
access_key AWS access key | ||
account Identifier of the AWS account The owner of the credentials | ||
auto_setup Whether the table should be created true | ||
automatically during send / get. | ||
buffer_size Number of messages to prefetch 9 | ||
endpoint Absolute URL to the SQS service https://sqs.eu-west-1.amazonaws.com | ||
poll_timeout Wait for new message duration in 0.1 | ||
seconds | ||
queue_name Name of the queue messages | ||
region Name of the AWS region eu-west-1 | ||
secret_key AWS secret key | ||
visibility_timeout Amount of seconds the message will Queue's configuration | ||
not be visible (`Visibility Timeout`_) | ||
wait_time `Long polling`_ duration in seconds 20 | ||
================== ====================================== ====================== | ||
|
||
.. note:: | ||
|
||
The ``wait_time`` parameter defines the maximum duration Amazon SQS should | ||
wait until a message is available in a queue before sending a response. | ||
It helps reducing the cost of using Amazon SQS by eliminating the number | ||
of empty responses. | ||
|
||
The ``poll_timeout`` parameter defines the duration the receiver should wait | ||
before returning null. It avoids blocking other receivers from being called. | ||
|
||
.. note:: | ||
|
||
If the queue name is suffixed by ``.fifo``, AWS will create a `FIFO queue`_. | ||
Use the stamp :class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\Transport\\AmazonSqsFifoStamp` | ||
to define the ``Message group ID`` and the ``Message deduplication ID``. | ||
|
||
FIFO queues don't support setting a delay per message, a value of ``delay: 0`` | ||
is required in the retry strategy settings. | ||
|
||
Serializing Messages | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
|
@@ -1294,7 +1360,6 @@ by tagging the handler service with ``messenger.message_handler`` | |
'handles' => SmsNotification::class, | ||
]); | ||
|
||
|
||
Possible options to configure with tags are: | ||
|
||
* ``bus`` | ||
|
@@ -1595,7 +1660,6 @@ middleware and *only* include your own: | |
], | ||
]); | ||
|
||
|
||
.. note:: | ||
|
||
If a middleware service is abstract, a different instance of the service will | ||
|
@@ -1724,3 +1788,6 @@ Learn more | |
.. _`streams`: https://redis.io/topics/streams-intro | ||
.. _`Supervisor docs`: http://supervisord.org/ | ||
.. _`SymfonyCasts' message serializer tutorial`: https://symfonycasts.com/screencast/messenger/transport-serializer | ||
.. _`Long polling`: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html | ||
.. _`Visibility Timeout`: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html | ||
.. _`FIFO queue`: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html |
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
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.
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.
We'll make this change while merging, but for your information, the
versionadded
messages are standardized as:XXX was introduced in Symfony N.N.
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.
Thank you.
I leave this unchanged then.