@@ -313,6 +313,13 @@ to multiple transports:
313
313
],
314
314
]);
315
315
316
+ .. note ::
317
+
318
+ If you configure routing for both a child and parent class, both rules
319
+ are used. E.g. if you have an ``SmsNotification `` object that extends
320
+ from ``Notification ``, both the routing for ``Notification `` and
321
+ ``SmsNotification `` will be used.
322
+
316
323
Doctrine Entities in Messages
317
324
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
318
325
@@ -1107,6 +1114,12 @@ a table named ``messenger_messages``.
1107
1114
Or, to create the table yourself, set the ``auto_setup `` option to ``false `` and
1108
1115
:ref: `generate a migration <doctrine-creating-the-database-tables-schema >`.
1109
1116
1117
+ .. caution ::
1118
+
1119
+ The datetime property of the messages stored in the database uses the
1120
+ timezone of the current system. This may cause issues if multiple machines
1121
+ with different timezone configuration use the same storage.
1122
+
1110
1123
The transport has a number of options:
1111
1124
1112
1125
================== ===================================== ======================
@@ -1126,11 +1139,28 @@ auto_setup Whether the table should be created
1126
1139
automatically during send / get. true
1127
1140
================== ===================================== ======================
1128
1141
1129
- .. caution ::
1142
+ .. versionadded :: 5.1
1130
1143
1131
- The datetime property of the messages stored in the database uses the
1132
- timezone of the current system. This may cause issues if multiple machines
1133
- with different timezone configuration use the same storage.
1144
+ The ability to leverage PostgreSQL's LISTEN/NOTIFY was introduced
1145
+ in Symfony 5.1.
1146
+
1147
+ When using PostgreSQL, you have access to the following options to leverage
1148
+ the `LISTEN/NOTIFY `_ feature. This allow for a more performant approach
1149
+ than the default polling behavior of the Doctrine transport because
1150
+ PostgreSQL will directly notify the workers when a new message is inserted
1151
+ in the table.
1152
+
1153
+ ======================= ========================================== ======================
1154
+ Option Description Default
1155
+ ======================= ========================================== ======================
1156
+ use_notify Whether to use LISTEN/NOTIFY. true
1157
+ check_delayed_interval The interval to check for delayed 1000
1158
+ messages, in milliseconds.
1159
+ Set to 0 to disable checks.
1160
+ get_notify_timeout The length of time to wait for a 0
1161
+ response when calling
1162
+ ``PDO::pgsqlGetNotify` ``, in milliseconds.
1163
+ ======================= ========================================== ======================
1134
1164
1135
1165
Beanstalkd Transport
1136
1166
~~~~~~~~~~~~~~~~~~~~
@@ -2081,3 +2111,4 @@ Learn more
2081
2111
.. _`Long polling` : https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html
2082
2112
.. _`Visibility Timeout` : https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html
2083
2113
.. _`FIFO queue` : https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html
2114
+ .. _`LISTEN/NOTIFY` : https://www.postgresql.org/docs/current/sql-notify.html
0 commit comments