Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Messenger] expire delay queue and fix auto_setup logic#32631
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| 'routing_key_pattern' =>'delay_%exchange_name%_%routing_key%_%delay%', | ||
| 'exchange_name' =>'delay', | ||
| 'queue_name_pattern' =>'delay_queue_%exchange_name%_%routing_key%_%delay%', | ||
| 'queue_name_pattern' =>'delay_%exchange_name%_%routing_key%_%delay%', |
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.
we need to change the name because of the new x-expire argument which would otherwise cause a precondition failed error on redeclaring. but the name is an implementation detail and should not matter.
| { | ||
| $routingKey =$this->getRoutingKeyForMessage($amqpStamp); | ||
| if ($this->shouldSetup()) { |
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.
delay must ignore the auto_setup option as explained below
| publicfunctionsetup():void | ||
| { | ||
| if (!$this->channel()->isConnected()) { | ||
| $this->clear(); |
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 should also happen when auto_setup is not enabled to reconnect when necessary. so I moved it outside setup()
| } | ||
| $this->exchange()->declareExchange(); | ||
| $this->getDelayExchange()->declareExchange(); |
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.
setup is called from messenger:setup-transports which should also create the delay exchange. this way, auto_setup can actually be disabled successfully even when using delays/retries
75f1f0e to26140f9CompareTobion commentedJul 19, 2019
test failure unrelated |
…obion)This PR was merged into the 4.3 branch.Discussion----------[Messenger] expire delay queue and fix auto_setup logic| Q | A| ------------- | ---| Branch? | 4.3| Bug fix? | yes| New feature? | yes| BC breaks? | no <!-- seehttps://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 |#32588| License | MIT| Doc PR |Tested successfullyCommits-------7aee83a [Messenger] expire delay queue and fix auto_setup logic
…e normal ones by default (Tobion)This PR was merged into the 4.3 branch.Discussion----------[Messenger] make delay exchange and queues durable like the normal ones by default| Q | A| ------------- | ---| Branch? | 4.3| Bug fix? | yes| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| BC breaks? | no <!-- seehttps://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 |#32891| License | MIT| Doc PR |This also imrproves BC of#32631 by only adding the new expiry argument in case the delay queue name was not overwritten using the options. I will remove the checks in 4.4 again. Please merge this PR before releasing the new 4.3 version so that 32631 and this PR are part of one release.Commits-------e5ecda6 [Messenger] make delay exchange and queues durable like the normal ones by default
Uh oh!
There was an error while loading.Please reload this page.
Tested successfully