Skip to content

Commit c931bb0

Browse files
committed
feature symfony#19055 [Messenger] Add AddFifoStamp middleware for SQS (alexandre-daubois)
This PR was merged into the 6.4 branch. Discussion ---------- [Messenger] Add AddFifoStamp middleware for SQS Fix symfony#19050 Commits ------- 08344a4 [Messenger] Add AddFifoStamp middleware for SQS
2 parents 6bc6ec1 + 08344a4 commit c931bb0

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
@@ -1814,6 +1814,27 @@ The transport has a number of options:
18141814
Use the stamp :class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\Transport\\AmazonSqsFifoStamp`
18151815
to define the ``Message group ID`` and the ``Message deduplication ID``.
18161816

1817+
Another possibility is to enable the
1818+
:class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\Middleware\\AddFifoStampMiddleware`.
1819+
If your message implements
1820+
:class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\MessageDeduplicationAwareInterface`,
1821+
the middleware will automatically add the
1822+
:class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\Transport\\AmazonSqsFifoStamp`
1823+
and set the ``Message deduplication ID``. Additionally, if your message implements the
1824+
:class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\MessageGroupAwareInterface`,
1825+
the middleware will automatically set the ``Message group ID`` of the stamp.
1826+
1827+
You can learn more about middlewares in
1828+
:ref:`the dedicated section <messenger_middleware>`.
1829+
1830+
.. versionadded:: 6.4
1831+
1832+
The
1833+
:class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\Middleware\\AddFifoStampMiddleware`,
1834+
:class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\MessageDeduplicationAwareInterface`
1835+
and :class:`Symfony\\Component\\Messenger\\Bridge\\AmazonSqs\\MessageGroupAwareInterface`
1836+
were introduced in Symfony 6.4.
1837+
18171838
FIFO queues don't support setting a delay per message, a value of ``delay: 0``
18181839
is required in the retry strategy settings.
18191840

@@ -2610,6 +2631,8 @@ are a variety of different stamps for different purposes and they're used intern
26102631
to track information about a message - like the message bus that's handling it
26112632
or if it's being retried after failure.
26122633

2634+
.. _messenger_middleware:
2635+
26132636
Middleware
26142637
~~~~~~~~~~
26152638

0 commit comments

Comments
 (0)