Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@Tobion
Copy link
Contributor

@TobionTobion commentedJun 14, 2019
edited
Loading

QA
Branch?4.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PRsymfony/symfony-docs#...

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[Messenger] Adding final routing key to delay queue name #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 plainamqp:// which is a valid URI that parse_url cannot handle when you want to pass all parameters as options

* * loop_sleep: Amount of micro-seconds to wait if no message are available (Default: 200000)
* * prefetch_count: set channel prefetch count
*/
publicfunction__construct(array$connectionOptions,array$exchangeOptions,array$queuesOptions,AmqpFactory$amqpFactory =null)
Copy link
ContributorAuthor

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 tofromDsn because the constructor does have different parameters for different options (exchange, queue). So the options doc there makes no sense.

* * 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")
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

outdated default

* * exchange_name: Name of the exchange to be used for the retried messages (Default: "retry")
* * exchange_name: Name of the exchange to be used for the retried messages (Default: "delay")
* * 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)
Copy link
ContributorAuthor

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
@TobionTobionforce-pushed thefix-messenger-retry-with-non-fanout-exchange branch frome9a587f to0f15306CompareJune 14, 2019 00:31
@TobionTobion requested a review fromweaverryanJune 14, 2019 00:32
@TobionTobion merged commit0f15306 intosymfony:4.3Jun 14, 2019
Tobion added a commit that referenced this pull requestJun 14, 2019
…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     <!-- 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 || 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 optionsCommits-------0f15306 [Messenger] fix delay delivery for non-fanout exchanges
@TobionTobion deleted the fix-messenger-retry-with-non-fanout-exchange branchJune 14, 2019 19:26
@fabpotfabpot mentioned this pull requestJun 26, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@weaverryanweaverryanAwaiting requested review from weaverryan

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@Tobion@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp