Merged
Conversation
* Import an `AmqpDefaultConfiguration` from the `@EnableAmqp` with convenient infrastructure beans * Make a default `Client` bean based on the `ClientOptions` built from the `@EnableAmqp` attributes * Mark `AmqpDefaultConfiguration.protonClient()` bean as `@Conditional` and skip its registration when any `Client` bean is already present in the target project configuration * Make `Client` injection into the `SingleAmqpConnectionFactory` as optional, and resolve single `Client` from the `BeanFactory` on demand internally * Change `AmqpClientTests` and `AmqpMessageListenerContainerTests` configurations to rely this or other way on the `@EnableAmqp` * Document the `@EnableAmqp` feature
5fc3951 to
7ef0904
Compare
artembilan
commented
Jan 14, 2026
* Add `AmqpClientTests.protonClientNotFromEnableAmqp()` to verify that `AmqpDefaultConfiguration.OnMissingClientBeanCondition` works
cppwfs
requested changes
Jan 14, 2026
Contributor
cppwfs
left a comment
There was a problem hiding this comment.
Great addition!
Just my usual annoying comments.
...g-amqp-client/src/main/java/org/springframework/amqp/client/SingleAmqpConnectionFactory.java
Show resolved
Hide resolved
spring-amqp-client/src/main/java/org/springframework/amqp/client/config/EnableAmqp.java
Outdated
Show resolved
Hide resolved
...qp-client/src/main/java/org/springframework/amqp/client/config/AmqpDefaultConfiguration.java
Outdated
Show resolved
Hide resolved
Member
Author
Stop it, please! 😸 |
* Remove redundant ctor for the `AmqpDefaultConfiguration.OnMissingClientBeanCondition` * Rework a bit confusing sentences in the docs
cppwfs
approved these changes
Jan 14, 2026
Contributor
cppwfs
left a comment
There was a problem hiding this comment.
LGTM
Thanks for the fixes and the great new feature!
Member
Author
|
Thank you for quick turnaround! I wanted to give this for you to review as quickly as possible and with some simpler scope. |
Contributor
|
My pleasure! And that sounds awesome! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AmqpDefaultConfigurationfrom the@EnableAmqpwith convenient infrastructure beansClientbean based on theClientOptionsbuilt from the@EnableAmqpattributesAmqpDefaultConfiguration.protonClient()bean as@Conditionaland skip its registration when anyClientbean is already present in the target project configurationClientinjection into theSingleAmqpConnectionFactoryas optional, and resolve singleClientfrom theBeanFactoryon demand internallyAmqpClientTestsandAmqpMessageListenerContainerTestsconfigurations to rely this or other way on the@EnableAmqp@EnableAmqpfeature