@@ -1074,6 +1074,12 @@ a table named ``messenger_messages``.
10741074Or, to create the table yourself, set the ``auto_setup `` option to ``false `` and
10751075:ref: `generate a migration <doctrine-creating-the-database-tables-schema >`.
10761076
1077+ .. caution ::
1078+
1079+ The datetime property of the messages stored in the database uses the
1080+ timezone of the current system. This may cause issues if multiple machines
1081+ with different timezone configuration use the same storage.
1082+
10771083The transport has a number of options:
10781084
10791085================== ===================================== ======================
@@ -1093,11 +1099,28 @@ auto_setup Whether the table should be created
10931099 automatically during send / get. true
10941100================== ===================================== ======================
10951101
1096- .. caution ::
1102+ .. versionadded :: 5.1
10971103
1098- The datetime property of the messages stored in the database uses the
1099- timezone of the current system. This may cause issues if multiple machines
1100- with different timezone configuration use the same storage.
1104+ The ability to leverage PostgreSQL's LISTEN/NOTIFY was introduced
1105+ in Symfony 5.1.
1106+
1107+ When using PostgreSQL, you have access to the following options to leverage
1108+ the `LISTEN/NOTIFY `_ feature. This allow for a more performant approach
1109+ than the default polling behavior of the Doctrine transport because
1110+ PostgreSQL will directly notify the workers when a new message is inserted
1111+ in the table.
1112+
1113+ ======================= ===================================== ======================
1114+ Option Description Default
1115+ ======================= ===================================== ======================
1116+ use_notify Whether to use LISTEN/NOTIFY. true
1117+ check_delayed_interval The interval to check for delayed 1000
1118+ messages, in milliseconds.
1119+ Set to 0 to disable checks.
1120+ get_notify_timeout The length of time to wait for a 0
1121+ response when calling
1122+ ``PDO::pgsqlGetNotify` ``, in milliseconds.
1123+ ======================= ========================================== ======================
11011124
11021125Beanstalkd Transport
11031126~~~~~~~~~~~~~~~~~~~~
@@ -1971,3 +1994,4 @@ Learn more
19711994.. _`Long polling` : https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html
19721995.. _`Visibility Timeout` : https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
19731996.. _`FIFO queue` : https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html
1997+ .. _`LISTEN/NOTIFY` : https://www.postgresql.org/docs/current/sql-notify.html
0 commit comments