Skip to content

Add AMPS support entry #14250

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 1 commit into from
Sep 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions messenger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,12 @@ options.
AMQP Transport
~~~~~~~~~~~~~~

.. versionadded:: 5.2

Starting from Symfony 5.2, the AMQP transport can handle AMQPS DSN.
Be aware that using it without using CA certificate can throw an exception.
Copy link
Member

Choose a reason for hiding this comment

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

This sentence isn't really helpful. How do I set this CA certificate? We should either not mention it (and rely on Symfony to throw an exception that will educate the user on what to do next) or fully show how to use amps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added an entry about it, wdyt ?

An alternative is to use AMQP DSN and specify the port to use.

.. versionadded:: 5.1

Starting from Symfony 5.1, the AMQP transport has moved to a separate package.
Expand All @@ -860,7 +866,13 @@ The ``amqp`` transport configuration looks like this:
# .env
MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages

# or use the AMQPS protocol
MESSENGER_TRANSPORT_DSN=amqps://guest:guest@localhost/%2f/messages


To use Symfony's built-in AMQP transport, you need the AMQP PHP extension.
If you want to use TLS/SSL encrypted AMQP you must provide a CA certificate. You need to set it using ``amqp.cacert = /etc/ssl/certs`` (path depends on your system) in your ``php.ini`` file or by setting the ``cacert`` parameter (e.g ``amqps://localhost?cacert=/etc/ssl/certs/``)
By default TLS/SSL encrypted AMQP uses port 5671. You can overwrite this behavior by setting the ``port`` parameter (e.g. ``amqps://localhost?cacert=/etc/ssl/certs/&port=12345``).

.. note::

Expand Down