@@ -1074,6 +1074,12 @@ a table named ``messenger_messages``.
1074
1074
Or, to create the table yourself, set the ``auto_setup `` option to ``false `` and
1075
1075
:ref: `generate a migration <doctrine-creating-the-database-tables-schema >`.
1076
1076
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
+
1077
1083
The transport has a number of options:
1078
1084
1079
1085
================== ===================================== ======================
@@ -1093,11 +1099,28 @@ auto_setup Whether the table should be created
1093
1099
automatically during send / get. true
1094
1100
================== ===================================== ======================
1095
1101
1096
- .. caution ::
1102
+ .. versionadded :: 5.1
1097
1103
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
+ ======================= ========================================== ======================
1101
1124
1102
1125
Beanstalkd Transport
1103
1126
~~~~~~~~~~~~~~~~~~~~
@@ -1971,3 +1994,4 @@ Learn more
1971
1994
.. _`Long polling` : https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html
1972
1995
.. _`Visibility Timeout` : https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
1973
1996
.. _`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