Skip to content

Commit b984abb

Browse files
committed
Fixes
1 parent 3352f29 commit b984abb

File tree

1 file changed

+10
-22
lines changed

1 file changed

+10
-22
lines changed

messenger.rst

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -543,14 +543,19 @@ command with the ``--all`` option:
543543

544544
The ``--all`` option was introduced in Symfony 7.1.
545545

546-
The ``--keepalive`` option can be used to prevent messages from being prematurely
547-
redelivered during long-running processing. It marks the message as "in progress"
548-
and prevents it from being redelivered until the worker finishes processing it.
546+
Messages that take a long time to process may be redelivered prematurely because
547+
some transports assume that an unacknowledged message is lost. To prevent this
548+
issue, use the ``--keepalive`` command option to specify an interval (in seconds;
549+
default value = ``5``) at which the message is marked as "in progress". This prevents
550+
the message from being redelivered until the worker completes processing it:
551+
552+
.. code-block:: terminal
553+
554+
$ php bin/console messenger:consume --keepalive
549555
550556
.. note::
551557

552-
This option is only available for supported transports, which are
553-
the Beanstalkd and AmazonSQS transports.
558+
This option is only available for the following transports: Beanstalkd and AmazonSQS.
554559

555560
.. versionadded:: 7.2
556561

@@ -1713,10 +1718,6 @@ The Beanstalkd transport DSN may looks like this:
17131718
17141719
The transport has a number of options:
17151720

1716-
``keepalive`` (default: none)
1717-
The amount of time, in seconds, the consumer can take to process the message
1718-
without considering it timed out.
1719-
17201721
``tube_name`` (default: ``default``)
17211722
Name of the queue
17221723

@@ -1728,10 +1729,6 @@ The transport has a number of options:
17281729
The message time to run before it is put back in the ready queue - in
17291730
seconds.
17301731

1731-
.. versionadded:: 7.2
1732-
1733-
The ``keepalive`` option was introduced in Symfony 7.2.
1734-
17351732
.. _messenger-redis-transport:
17361733

17371734
Redis Transport
@@ -2001,11 +1998,6 @@ The transport has a number of options:
20011998
``endpoint`` (default: ``https://sqs.eu-west-1.amazonaws.com``)
20021999
Absolute URL to the SQS service
20032000

2004-
``keepalive`` (default: none)
2005-
The minimum amount of time, in seconds, the message remains invisible to other
2006-
consumers so you can process it. It's useful to manage long-running tasks or
2007-
delay retries for a given message.
2008-
20092001
``poll_timeout`` (default: ``0.1``)
20102002
Wait for new message duration in seconds
20112003

@@ -2027,10 +2019,6 @@ The transport has a number of options:
20272019
``wait_time`` (default: ``20``)
20282020
`Long polling`_ duration in seconds
20292021

2030-
.. versionadded:: 7.2
2031-
2032-
The ``keepalive`` option was introduced in Symfony 7.2.
2033-
20342022
.. note::
20352023

20362024
The ``wait_time`` parameter defines the maximum duration Amazon SQS should

0 commit comments

Comments
 (0)