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
feature #59601 [Messenger] Add keepalive support (silasjoisten)
This PR was squashed before being merged into the 7.3 branch.
Discussion
----------
[Messenger] Add keepalive support
| Q | A
| ------------- | ---
| Branch? | 7.3
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Issues | -
| License | MIT
This Pull Request adds keepalive support to the Doctrine Messenger transport by implementing the keepalive method in the Connection class. This enhancement aligns Doctrine transport with the existing **keepalive** functionality already supported by other Messenger transports, such as Redis and Beanstalkd.
The **keepalive** principle was introduced in Symfony 7.2 to address issues where long-running message processing could lead to premature message timeouts and redelivery. By keeping the message “alive” on the transport layer, the message remains marked as being processed until explicitly acknowledged.
Other transports like Redis and Beanstalkd have already implemented this feature. This PR extends the functionality to the Doctrine transport.
Commits
-------
970c07b [Messenger] Add keepalive support
// Check if the redeliver timeout is smaller than the keepalive interval
292
+
if (null !== $seconds && $this->configuration['redeliver_timeout'] < $seconds) {
293
+
thrownewTransportException(\sprintf('Doctrine redeliver_timeout (%ds) cannot be smaller than the keepalive interval (%ds).', $this->configuration['redeliver_timeout'], $seconds));
0 commit comments