Skip to content

Commit 618bca1

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: [Messenger] Add AddFifoStamp middleware for SQS
2 parents 83c7b24 + c931bb0 commit 618bca1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

messenger.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,6 +1755,27 @@ The transport has a number of options:
17551755
Use the stamp :class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\Transport\\AmazonSqsFifoStamp`
17561756
to define the ``Message group ID`` and the ``Message deduplication ID``.
17571757

1758+
Another possibility is to enable the
1759+
:class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\Middleware\\AddFifoStampMiddleware`.
1760+
If your message implements
1761+
:class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\MessageDeduplicationAwareInterface`,
1762+
the middleware will automatically add the
1763+
:class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\Transport\\AmazonSqsFifoStamp`
1764+
and set the ``Message deduplication ID``. Additionally, if your message implements the
1765+
:class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\MessageGroupAwareInterface`,
1766+
the middleware will automatically set the ``Message group ID`` of the stamp.
1767+
1768+
You can learn more about middlewares in
1769+
:ref:`the dedicated section <messenger_middleware>`.
1770+
1771+
.. versionadded:: 6.4
1772+
1773+
The
1774+
:class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\Middleware\\AddFifoStampMiddleware`,
1775+
:class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\MessageDeduplicationAwareInterface`
1776+
and :class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\MessageGroupAwareInterface`
1777+
were introduced in Symfony 6.4.
1778+
17581779
FIFO queues don't support setting a delay per message, a value of ``delay: 0``
17591780
is required in the retry strategy settings.
17601781

@@ -2523,6 +2544,8 @@ are a variety of different stamps for different purposes and they're used intern
25232544
to track information about a message - like the message bus that's handling it
25242545
or if it's being retried after failure.
25252546

2547+
.. _messenger_middleware:
2548+
25262549
Middleware
25272550
~~~~~~~~~~
25282551

0 commit comments

Comments
 (0)