Add support for RabbitMQ AMQP 1.0#46608
Add support for RabbitMQ AMQP 1.0#46608eddumelendez wants to merge 1 commit intospring-projects:mainfrom
Conversation
77d69d9 to
02ba888
Compare
| * @author Eddú Meléndez | ||
| * @since 4.0.0 | ||
| */ | ||
| @AutoConfiguration |
There was a problem hiding this comment.
I think need to make before = RabbitAutoConfiguration.class and make that one conditional on something missing from this RabbitAmqpAutoConfiguration.
This is an addition to my previous point: the AMQP 1.0 is by default.
If we don't make them conditional on each other, then both protocols are going to be enabled and connected.
Especially, I worry about RabbitAmqpAdmin and RabbitAdmin which are going to handle topology in parallel but in different connections.
I don't think that we need to give a choice to be able to have both protocols in one Spring Boot application.
|
|
||
| private final RabbitProperties properties; | ||
|
|
||
| RabbitAmqpAutoConfiguration(RabbitProperties properties) { |
There was a problem hiding this comment.
I think we need to look into a separate RabbitAmqpProperties abstraction.
Even if some duplication is possible, a bunch of existing properties are not going to be used for AMQP 1.0 at all.
And might cause confusion.
4c79b2e to
6572c36
Compare
| @AutoConfiguration | ||
| @ConditionalOnClass({ RabbitTemplate.class, Channel.class }) | ||
| @ConditionalOnMissingClass({ "com.rabbitmq.client.amqp.Connection", | ||
| "org.springframework.amqp.rabbitmq.client.RabbitAmqpTemplate" }) |
There was a problem hiding this comment.
I don't think this is correct.
We may still have those classes on classpath, but opt-in to use AMQP 0.9.1.
For example, via auto-configuration exclusion for that our new RabbitAmqpAutoConfiguration.
Why not conditional on bean?
There was a problem hiding this comment.
Switched to conditional on missing bean
2be167a to
b3b1d45
Compare
artembilan
left a comment
There was a problem hiding this comment.
LGTM.
Might be some docs also required, but so far this is great.
Thank you!
|
@artembilan and I brainstormed a bit and things should be in a different state than what's been discussed thus far:
Things are a bit blurry at this point given that we can merge this in SB 4.1 at the earliest. By then, Spring AMQP may have support for other brokers so that suggested name above wouldn't work. I've flagged this for team meeting to see what the team thinks. If we want to go with two separate modules, then we might rename the current one |
|
@eddumelendez this is what the conclusion we came to in preparation for the next version of Spring AMQP:
Auto-configuration of both a 0.9 client and a 1.0 client is possible if you add the two modules on the classpath (contrary to what's been discussed during the review). Do you want to explore this option and amend your PR? If not, no worries and please let me know either way. |
|
Thanks for sharing, @snicoll! I'll work on this changes |
|
Heya @eddumelendez, any update for us? If you're still working on it, no worries. I just want to avoid adding a change like that in the RC. |
|
Hi @snicoll, yes, still working on it. Should have an update next week. |
270f6c0 to
4cc9a36
Compare
|
@snicoll Sorry for the delay. PR is updated. |
|
Thanks @eddumelendez. I've rebased and squashed all commits and I've started to look at this. Here are some questions:
My expectation is that things are quite separated with support for 1.0.0 having different concepts. |
|
Hi @snicoll, I have polished the properties and renamed to namespace to |
|
Hi @eddumelendez, there's a bit of back and forth here but this where we're heading:
Would you be willing to squash and rebase your contribution with only a |
* Add support for RabbitMQ AMQP 1.0 * Add smoke test for RabbitMQ AMQP 1.0 Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
5ea02fc to
d01d50d
Compare
|
Hi @snicoll, I've rebased and squash the changes. Thanks for building the foundation to support RabbitMQ AMQP 1.0 |
|
Thanks for the follow-up @eddumelendez - This commit has been incorporated in the feature branch I am working on so I am going to close this in favor of #49857 |
Uh oh!
There was an error while loading. Please reload this page.