Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add optional parameter prefetching for AMQP connection #30671

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

Merged
merged 1 commit into from
Mar 28, 2019

Conversation

f2r
Copy link
Contributor

@f2r f2r commented Mar 24, 2019

Add prefetching connection parameter to setup channel prefetch count.

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

When setting up AMQP transport connection, it can be interesting to configure prefetching on a channel, which is not currently possible.

@weaverryan weaverryan mentioned this pull request Mar 24, 2019
36 tasks
Copy link
Contributor

@sroze sroze left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@stof
Copy link
Member

stof commented Mar 26, 2019

The diff seems a mess. Are you sure that your feature branch is based on master ?

fabpot added a commit that referenced this pull request Mar 26, 2019
…etup` (dmaicher)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] rename `auto-setup` amqp option into `auto_setup`

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

See #30671 (comment)

Commits
-------

6263e48 [Messenger] rename `auto-setup` amqp option into `auto_setup`
Copy link
Member

@fabpot fabpot left a comment

Choose a reason for hiding this comment

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

Left a minor comment. Also, can you squash the commits?

@sroze
Copy link
Contributor

sroze commented Mar 28, 2019

Thank you @f2r.

@sroze sroze merged commit 47777ee into symfony:master Mar 28, 2019
sroze added a commit that referenced this pull request Mar 28, 2019
…on (fbouchery)

This PR was merged into the 4.3-dev branch.

Discussion
----------

Add optional parameter `prefetching` for AMQP connection

Add prefetching connection parameter to setup channel prefetch count.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

When setting up AMQP transport connection, it can be interesting to configure prefetching on a channel, which is not currently possible.

Commits
-------

47777ee Add optional parameter `prefetching` in connection configuration, to setup channel prefetch count
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
@fabpot fabpot mentioned this pull request May 9, 2019
@Tobion
Copy link
Contributor

Tobion commented Jul 13, 2019

I'm pretty sure this prefetch option is useless. Symfony messenger uses amqp basic.get which is syncronous and does not support prefetch. See https://www.rabbitmq.com/confirms.html

The QoS prefetch setting has no effect on messages fetched using the basic.get ("pull API"), even in manual confirmation mode.

@f2r have you seen any impact using this option?

@githoober
Copy link

@Tobion, @f2r I can confirm the prefetch_count does not have any effect on a number of messages a consumer receives. This flag is useless.

@lyrixx
Copy link
Member

lyrixx commented Dec 29, 2020

IMHO, we should revert this PR since it does not work and can be misleading

@fabpot
Copy link
Member

fabpot commented Dec 29, 2020

If we think this should be reverted, let's create a PR.

@f2r
Copy link
Contributor Author

f2r commented Dec 29, 2020

@Tobion, @f2r I can confirm the prefetch_count does not have any effect on a number of messages a consumer receives. This flag is useless.

I missed @Tobion's comment, sorry!
I confirm, this flag is useless.

It was part of a larger submission that brought @weaverryan to make changes in Messenger (mainly, "retry" process) and so I removed it from my code. That was all that was left and it was linked to my proposal of using "basic.consume".

@f2r f2r deleted the prefetching branch December 29, 2020 09:37
@lyrixx
Copy link
Member

lyrixx commented Dec 29, 2020

Does someone wanna work on it?

@f2r
Copy link
Contributor Author

f2r commented Dec 29, 2020

Does someone wanna work on it?

Work on what ?

@lyrixx
Copy link
Member

lyrixx commented Dec 29, 2020

Reverting this PR

@jderusse
Copy link
Member

see #39660

chalasr added a commit that referenced this pull request Jan 2, 2021
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Messenger] Deprecate option prefetch_count

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | no
| Deprecations? | yesno
| Tickets       | -
| License       | MIT
| Doc PR        | -

Revert #30671

Commits
-------

5b55097 Deprecate option prefetch_count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.