Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for RabbitMQ AMQP 1.0 #46608

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

Open
eddumelendez wants to merge 12 commits into spring-projects:main
base: main
Choose a base branch
Loading
from eddumelendez:rabbitmq-amqp

Conversation

Copy link
Contributor

@eddumelendez eddumelendez commented Jul 31, 2025
edited
Loading

  • Add support for RabbitMQ AMQP 1.0
  • Add smoke test for RabbitMQ AMQP 1.0

artembilan reacted with heart emoji artembilan reacted with rocket emoji
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
@eddumelendez eddumelendez changed the title (削除) rabbitmq amqp (削除ここまで) (追記) Add support for Rabbitmq AMQP 1.0 (追記ここまで) Jul 31, 2025
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
@eddumelendez eddumelendez changed the title (削除) Add support for Rabbitmq AMQP 1.0 (削除ここまで) (追記) Add support for RabbitMQ AMQP 1.0 (追記ここまで) Jul 31, 2025
* @author Eddú Meléndez
* @since 4.0.0
*/
@AutoConfiguration
Copy link
Member

@artembilan artembilan Aug 4, 2025

Choose a reason for hiding this comment

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

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) {
Copy link
Member

@artembilan artembilan Aug 4, 2025

Choose a reason for hiding this comment

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

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.

eddumelendez reacted with thumbs up emoji
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
* @since 4.0.0
*/
@AutoConfiguration
@ConditionalOnClass({ RabbitTemplate.class, Channel.class })
@ConditionalOnMissingClass({ "com.rabbitmq.client.amqp.Connection",
"org.springframework.amqp.rabbitmq.client.RabbitAmqpTemplate" })
Copy link
Member

@artembilan artembilan Aug 7, 2025

Choose a reason for hiding this comment

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

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?

Copy link
Contributor Author

@eddumelendez eddumelendez Aug 12, 2025

Choose a reason for hiding this comment

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

Switched to conditional on missing bean

Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
@eddumelendez eddumelendez force-pushed the rabbitmq-amqp branch 2 times, most recently from 05bec25 to 2be167a Compare August 12, 2025 18:21
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

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

LGTM.

Might be some docs also required, but so far this is great.

Thank you!

eddumelendez reacted with thumbs up emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@philwebb philwebb philwebb left review comments

+1 more reviewer

@artembilan artembilan artembilan approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /