-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] fix delay delivery for non-fanout exchanges #32035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Messenger] fix delay delivery for non-fanout exchanges #32035
Conversation
* * prefetch_count: set channel prefetch count | ||
*/ | ||
public function __construct(array $connectionOptions, array $exchangeOptions, array $queuesOptions, AmqpFactory $amqpFactory = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the options phpdoc from constructor to fromDsn
because the constructor does have different parameters for different options (exchange, queue). So the options doc there makes no sense.
@@ -81,29 +93,19 @@ class Connection | |||
* * delay: | |||
* * routing_key_pattern: The pattern of the routing key (Default: "delay_%routing_key%_%delay%") | |||
* * queue_name_pattern: Pattern to use to create the queues (Default: "delay_queue_%routing_key%_%delay%") | |||
* * exchange_name: Name of the exchange to be used for the retried messages (Default: "retry") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
outdated default
* * auto_setup: Enable or not the auto-setup of queues and exchanges (Default: true) | ||
* * loop_sleep: Amount of micro-seconds to wait if no message are available (Default: 200000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is in the worker now
also fix dsn parsing of plain amqp:// uri
e9a587f
to
0f15306
Compare
…obion) This PR was merged into the 4.3 branch. Discussion ---------- [Messenger] fix delay delivery for non-fanout exchanges | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Fixes two bugs and outdated phpdoc: 1. When your exchange is not of type fanout, but direct for example, then delivery of delayed (retrying) messages does not work. This is because the delay logics adds a routing key to message. It was fixed if you have a custom routing key in #31355. But if you have no routing key, it still changed the routing key which means the message will not be delivery from your direct exchange to your queue anymore after being in the delay exchange. For fanout, which is the default, it does not matter because the routing key is ignored. 2. also fix dsn parsing of plain `amqp://` which is a valid URI that parse_url cannot handle when you want to pass all parameters as options Commits ------- 0f15306 [Messenger] fix delay delivery for non-fanout exchanges
Fixes two bugs and outdated phpdoc:
amqp://
which is a valid URI that parse_url cannot handle when you want to pass all parameters as options