We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccf38dc commit 574e467Copy full SHA for 574e467
messenger.rst
@@ -712,6 +712,10 @@ states to prevent information and/or memory leakage.
712
However, certain Symfony services, such as the Monolog
713
:ref:`fingers crossed handler <logging-handler-fingers_crossed>`, leak by design.
714
That's why Symfony automatically resets the service container between two messages.
715
+If a service is not stateless and you want to reset its properties after each message, then
716
+the service must implement :class:`Symfony\\Contracts\\Service\\ResetInterface` where you can reset the
717
+properties in the ``reset()`` method.
718
+
719
If you don't want to reset the container, add the ``--no-reset`` option when
720
running the ``messenger:consume`` command.
721
0 commit comments