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

Skip to content

[Messenger][AmqpExt] Allow disabling the auto-setup of the connection #26956

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
Apr 17, 2018

Conversation

sroze
Copy link
Contributor

@sroze sroze commented Apr 16, 2018

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

Allow disabling the auto-setup of the AMQP connection. Especially useful when the messages are published to another system (see #26937)

@davidbarratt
Copy link

What happens if you attempt to publish to a non-existent exchange? I assume it will throw an exception? That makes sense to me since that's the same behavior that happens if you attempt to publish to a non-existent vhost.

@sroze
Copy link
Contributor Author

sroze commented Apr 17, 2018

When you publish to a non-existent exchange, RabbitMq would not tell you anything, unfortunately. It would not throw an exception, so that's why we actually setup when debug. On the other hand, it does throw an exception when consuming a message, that's why we handle this specific case and do the setup automatically :)

@davidbarratt
Copy link

Could we have an option to setup the exchange, but not the queue?

@sroze
Copy link
Contributor Author

sroze commented Apr 17, 2018

I wouldn't go in this direction. If we do, we also need to be able to select if we bind the queue or not for example. I'd argue that either you use the automated configuration or you go ahead with your own.

@davidbarratt
Copy link

hmm, I guess it's fine. If there aren't any applications listening.. then it doesn't matter if the message falls out of the tubes.

@sroze sroze force-pushed the allow-to-disable-auto-setup branch from b99b069 to b3039fa Compare April 17, 2018 16:52
@sroze sroze merged commit b3039fa into symfony:master Apr 17, 2018
sroze added a commit that referenced this pull request Apr 17, 2018
… connection (sroze)

This PR was squashed before being merged into the 4.1-dev branch (closes #26956).

Discussion
----------

[Messenger][AmqpExt] Allow disabling the auto-setup of the connection

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

Allow disabling the auto-setup of the AMQP connection. Especially useful when the messages are published to another system (see #26937)

Commits
-------

b3039fa [Messenger][AmqpExt] Allow disabling the auto-setup of the connection
@sroze sroze deleted the allow-to-disable-auto-setup branch April 17, 2018 16:53
@vasilvestre
Copy link

How to use it ?
amqp://rabbitmq:rabbitmq@rabbitmq:5672/%2f/messages?auto-setup:true and
amqp://rabbitmq:rabbitmq@rabbitmq:5672/%2f/messages?auto-setup=true seem to do not work

@davidbarratt
Copy link

amqp://rabbitmq:rabbitmq@rabbitmq:5672/%2f/messages?auto-setup=false

since the default is true

@vasilvestre
Copy link

I tried it right now and I have an error
Exchange messages do not exist
Isn't this parameter supposed to create it ?

@davidbarratt
Copy link

If you disabled auto-setup, then no.

@sroze
Copy link
Contributor Author

sroze commented Mar 27, 2019

Note that in 4.3 (#30702), it is renamed to auto_setup for consistency.

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.

5 participants