You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[BUGFIX] Allow to configure RateLimiters in message consumer
This fix adds the missing configuration options for the rate limiters.
A "rate limiter" manages the frequency at which a particular messages,
such as an HTTP request or a login attempt, can occur. Rate limiting
serves as a protective mechanism to prevent services from being
overwhelmed by excessive usage, whether intentional or accidental, thus
ensuring their continued availability. Additionally, it proves
beneficial in regulating internal or outbound processes, such as
limiting the simultaneous processing of messages.
.. include:: /Includes.rst.txt
.. _important-103140-1708522119:
=============================================================================================
Important: #103140 - Allow to configure rate limiters in Message consumer (Symfony Messenger)
=============================================================================================
See :issue:`103140`
Description
===========
This change introduces missing configuration options for Symfony Messenger-based
rate limiters.
A **rate limiter** controls how frequently a specific event (e.g., HTTP request
or login attempt) is allowed to occur. It acts as a safeguard to prevent services from
being overwhelmed — either accidentally or intentionally — thus helping
to maintain their availability.
Rate limiters are also useful for controlling internal or outbound
processes, such as limiting the simultaneous processing of messages.
More information about the rate limiter is available in the
`Symfony Rate Limiter component documentation<https://symfony.com/doc/current/rate_limiter.html>`__.
Usage
=====
Configure a rate limiter per queue
----------------------------------
Rate limiters can be defined in your service configuration
:file:`EXT:yourext/Configuration/Services.yaml`. The name specified
in the settings is resolved to a service tagged with `messenger.rate_limiter`
and the corresponding identifier.
Example Configuration:
.. code-block:: yaml:caption: EXT:yourext/Configuration/Services.yaml:emphasize-lines: 10-12,23-25messenger.rate_limiter.demo:class: 'Symfony\Component\RateLimiter\RateLimiterFactory'arguments:$config:id: 'demo'policy: 'sliding_window'limit: '100'interval: '60 seconds'$storage: '@Symfony\Component\RateLimiter\Storage\InMemoryStorage'tags: - name: 'messenger.rate_limiter'identifier: 'demo'messenger.rate_limiter.default:class: 'Symfony\Component\RateLimiter\RateLimiterFactory'arguments:$config:id: 'default'policy: 'sliding_window'limit: '100'interval: '60 seconds'$storage: '@Symfony\Component\RateLimiter\Storage\InMemoryStorage'tags: - name: 'messenger.rate_limiter'identifier: 'default'
.. index:: PHP-API, ext:core
The text was updated successfully, but these errors were encountered:
ℹ️ View this commit on Github
👥 Authored by Sascha Nowak [email protected]
✔️ Merged by Benni Mack [email protected]
Commit message
[BUGFIX] Allow to configure RateLimiters in message consumer
This fix adds the missing configuration options for the rate limiters.
A "rate limiter" manages the frequency at which a particular messages,
such as an HTTP request or a login attempt, can occur. Rate limiting
serves as a protective mechanism to prevent services from being
overwhelmed by excessive usage, whether intentional or accidental, thus
ensuring their continued availability. Additionally, it proves
beneficial in regulating internal or outbound processes, such as
limiting the simultaneous processing of messages.
Resolves: #103140
Releases: main, 13.4
Change-Id: I248e97fbd2d969986513cfc4f8b3a8ffaab585d4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83052
Reviewed-by: Garvin Hicking [email protected]
Tested-by: Garvin Hicking [email protected]
Tested-by: core-ci [email protected]
Tested-by: Benni Mack [email protected]
Reviewed-by: Benni Mack [email protected]
➕ Added files
13.4.x/Important-103140-AllowToConfigureRateLimiters.rst
The text was updated successfully, but these errors were encountered: