-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
feat: add amazon sqs to docs #13328
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
feat: add amazon sqs to docs #13328
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -1131,6 +1131,35 @@ 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://guest:guest@sqs.eu-west-3.amazonaws.com/test?region=eu-west-3 | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
.. note:: | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
By default, the transport will automatically create queue that are needed. That can be disabled. | ||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
or
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. First one is better. |
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
The transport has a number of other options, including ways to configure | ||||||||||||||||||||||||||||||||||||||
the exchange, queues binding keys and more. See the documentation on | ||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
:class:`Symfony\\Component\\Messenger\\Transport\\AmazonSqs\\Connection`. | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would define the list of options:
and add the note:
and also add:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. another note:
I actually don't know if this should be in the docs or it is a bug :) |
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
Serializing Messages | ||||||||||||||||||||||||||||||||||||||
~~~~~~~~~~~~~~~~~~~~ | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
|
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.
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.
I would also add an option to debug with local fake sqs
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.
@jderusse Your example with slashes in the password won't work since it will be parsed by
parse_url
. So it would be good to add an example using the options.And add this in the example since at least a lot of AWS secrets have slashes in them:
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.
thanks.
specials char in credentials works but you have to urlencode theme.
indeed my exemple is buggy because of this.
I'd rather keep (and fix) my exemple and add a note about that in the doc. Many people are confused about this.
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.
A lot of AWS keys will have slashes in them, and I also don't like you have to put your AWS credentials in the .env file multiple times since it's in the DSN in the example.
At least mention this in docs so people don't have to find this out.
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.
Agreed. Both ways should be documented.
I like your sample. A little bit more verbose, but avoid missconfiguraiton.
But url_encoding credential is hard to find in the current documentation and should also be documented