Skip to content

Commit abdd3c9

Browse files
committed
[Messenger] Keepalive support for Doctrine & Redis
1 parent e6c8e7c commit abdd3c9

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

messenger.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ the message from being redelivered until the worker completes processing it:
555555
556556
.. note::
557557

558-
This option is only available for the following transports: Beanstalkd and AmazonSQS.
558+
This option is only available for the following transports: Beanstalkd, AmazonSQS, Doctrine and Redis.
559559

560560
.. versionadded:: 7.2
561561

@@ -1745,13 +1745,12 @@ in the table.
17451745
The length of time to wait for a response when calling
17461746
``PDO::pgsqlGetNotify``, in milliseconds.
17471747

1748-
The keepalive feature, which prevents messages from being prematurely redelivered during
1749-
long-running processing, updates the ``delivered_at`` timestamp periodically to ensure
1750-
the message is marked as "in progress".
1748+
The Doctrine transport supports the ``--keepalive`` option by periodically updating
1749+
the ``delivered_at`` timestamp to prevent the message from being redelivered.
17511750

17521751
.. versionadded:: 7.3
17531752

1754-
Keepalive support, using the ``--keepalive`` option, was introduced in Symfony 7.3.
1753+
Keepalive support was introduced in Symfony 7.3.
17551754

17561755
Beanstalkd Transport
17571756
~~~~~~~~~~~~~~~~~~~~
@@ -1802,7 +1801,7 @@ The Beanstalkd transport supports the ``--keepalive`` option by using Beanstalkd
18021801
Keepalive support was introduced in Symfony 7.2.
18031802

18041803
The Beanstalkd transport lets you set the priority of the messages being dispatched.
1805-
Use the :class:``Symfony\\Component\\Messenger\\Bridge\\Beanstalkd\\Transport\\BeanstalkdPriorityStamp``
1804+
Use the :class:``Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\BeanstalkdPriorityStamp``
18061805
and pass a number to specify the priority (default = ``1024``; lower numbers mean higher priority)::
18071806

18081807
use App\Message\SomeMessage;
@@ -1951,6 +1950,13 @@ under the transport in ``messenger.yaml``:
19511950
in your case) to avoid memory leaks. Otherwise, all messages will remain
19521951
forever in Redis.
19531952

1953+
The Redis transport supports the ``--keepalive`` option by using Redis's ``XCLAIM``
1954+
command to periodically reset the message's idle time to zero.
1955+
1956+
.. versionadded:: 7.3
1957+
1958+
Keepalive support was introduced in Symfony 7.3.
1959+
19541960
In Memory Transport
19551961
~~~~~~~~~~~~~~~~~~~
19561962

0 commit comments

Comments
 (0)