diff --git a/messenger.rst b/messenger.rst index 0f1eba49a9f..06ad586407d 100644 --- a/messenger.rst +++ b/messenger.rst @@ -2254,6 +2254,20 @@ on a case-by-case basis via the :class:`Symfony\\Component\\Messenger\\Stamp\\Se provides that control. See `SymfonyCasts' message serializer tutorial`_ for details. +Closing connection +~~~~~~~~~~~~~~~~~~ + +When using a transport that requires a connection, you can close it using +the :method:`Symfony\\Component\\Messenger\\Transport\\CloseableTransportInterface::close` +method to allow free resources for long-running processes. + +This interface is implemented by the following transports: AmazonSqs, Amqp and Redis. +If you want to close a Doctrine connection, this can be achieved :ref:`using middleware `. + +.. versionadded:: 7.3 + + The ``CloseableTransportInterface`` and ``close`` method were introduced in Symfony 7.3. + Running Commands And External Processes ---------------------------------------