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

Skip to content

amqp-transport does auto setup for each get/publish message #39605

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

Closed
TheHett opened this issue Dec 22, 2020 · 2 comments · Fixed by #39608
Closed

amqp-transport does auto setup for each get/publish message #39605

TheHett opened this issue Dec 22, 2020 · 2 comments · Fixed by #39608

Comments

@TheHett
Copy link

TheHett commented Dec 22, 2020

Symfony version(s) affected: 5.2

Description
The transport Symfony\Component\Messenger\Bridge\Amqp\Transport\Connection trying to create and declare queues and exchanges for each publish/get message. I suspect it's not necessary, it is enough to do it only once.

https://github.com/symfony/amqp-messenger/blob/a7f681b022f9cfb88febc12face05b12a47232c1/Transport/Connection.php#L422

Possible Solution
I think it's need to add a flag that the setup already done and do not call it again.

Sorry for my english.

@TheHett
Copy link
Author

TheHett commented Dec 22, 2020

This leads to a decrease the performance and an increase the load on rmq.

@fabpot fabpot closed this as completed Jan 1, 2021
fabpot added a commit that referenced this issue Jan 1, 2021
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Messenger] Setup queues once in AMQP

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #39605, Fix #38092, Fix #32172
| License       | MIT
| Doc PR        | -

To ease the setup, this PR also merge setup of exchange AND delayExchange.

/cc @Nyholm

Commits
-------

c2e84c6 Setup queues once in AMQP
@TheHett
Copy link
Author

TheHett commented Jan 1, 2021

Thanks!

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

Successfully merging a pull request may close this issue.

4 participants