From 40cafd498e9a0d78e17d7b89735b964203ed0c10 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Tue, 28 Jan 2025 11:05:30 +0100 Subject: [PATCH] [Messenger] Update docs for keepalive support in doctrine messenger transport closes #20599 --- messenger.rst | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/messenger.rst b/messenger.rst index 217061d302c..727b1fbc39a 100644 --- a/messenger.rst +++ b/messenger.rst @@ -545,12 +545,16 @@ command with the ``--all`` option: The ``--keepalive`` option can be used to prevent messages from being prematurely redelivered during long-running processing. It marks the message as "in progress" -and prevents it from being redelivered until the worker finishes processing it. +and prevents it from being redelivered until the worker finishes processing it: + +.. code-block:: terminal + + php bin/console messenger:consume --keepalive=5 .. note:: This option is only available for supported transports, which are - the Beanstalkd and AmazonSQS transports. + the Doctrine, Beanstalkd and AmazonSQS transports. .. versionadded:: 7.2 @@ -1689,6 +1693,14 @@ in the table. The length of time to wait for a response when calling ``PDO::pgsqlGetNotify``, in milliseconds. +The keepalive feature, which prevents messages from being prematurely redelivered during +long-running processing, updates the ``delivered_at`` timestamp periodically to ensure +the message is marked as "in progress". + +.. versionadded:: 7.3 + + Keepalive support, using the ``--keepalive`` option, was added in Symfony 7.3. + Beanstalkd Transport ~~~~~~~~~~~~~~~~~~~~