@@ -1789,28 +1789,22 @@ The transport has a number of options:
17891789
17901790 Keepalive support, using the ``--keepalive `` option, was added in Symfony 7.2.
17911791
1792- When using the Beanstalkd transport in Symfony Messenger, you can now set the priority of the messages being dispatched.
1793- This allows you to control the order in which the messages are processed, with lower values indicating higher priority.
1794-
1795- To configure the priority, use the ``Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\BeanstalkdPriorityStamp ``
1796- when dispatching a message:
1797-
1798- .. code-block :: php
1792+ The Beanstalkd transport lets you set the priority of the messages being dispatched.
1793+ Use the ``Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\BeanstalkdPriorityStamp ``
1794+ and pass a number to specify the priority (default = ``1024 ``; lower numbers mean higher priority)::
17991795
18001796 use App\Message\SomeMessage;
18011797 use Symfony\Component\Messenger\Stamp\BeanstalkdPriorityStamp;
18021798
18031799 $this->bus->dispatch(new SomeMessage('some data'), [
1804- new BeanstalkdPriorityStamp(0), // Highest priority
1800+ // 0 = highest priority
1801+ // 2**32 - 1 = lowest priority
1802+ new BeanstalkdPriorityStamp(0),
18051803 ]);
18061804
1807- As defined by the Beanstalkd protocol, the priority value must be an integer between 0 (highest priority) and 2**32 (lowest priority).
1808-
1809- If no priority is specified, the default value ``1024 `` will be used.
1810-
18111805.. versionadded :: 7.3
18121806
1813- ``BeanstalkdPriorityStamp `` support was added in Symfony 7.3.
1807+ ``BeanstalkdPriorityStamp `` support was introduced in Symfony 7.3.
18141808
18151809.. _messenger-redis-transport :
18161810
0 commit comments