Skip to content

Commit d57a81c

Browse files
committed
Revert AMQP 1.0 support
Closes gh-49676
2 parents e927b4c + 5296a5b commit d57a81c

145 files changed

Lines changed: 297 additions & 1875 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

buildSrc/src/main/java/org/springframework/boot/build/context/properties/DocumentConfigurationProperties.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ private void dataMigrationPrefixes(Config prefix) {
171171

172172
private void integrationPrefixes(Config prefix) {
173173
prefix.accept("spring.activemq");
174-
prefix.accept("spring.amqp");
175174
prefix.accept("spring.artemis");
176175
prefix.accept("spring.batch");
177176
prefix.accept("spring.integration");

documentation/spring-boot-docs/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ dependencies {
129129
implementation(project(path: ":module:spring-boot-micrometer-metrics"))
130130
implementation(project(path: ":module:spring-boot-persistence"))
131131
implementation(project(path: ":module:spring-boot-r2dbc"))
132-
implementation(project(path: ":module:spring-boot-rabbitmq"))
133132
implementation(project(path: ":module:spring-boot-restdocs"))
134133
implementation(project(path: ":module:spring-boot-reactor-netty"))
135134
implementation(project(path: ":module:spring-boot-restclient"))

documentation/spring-boot-docs/src/docs/antora/modules/ROOT/pages/redirect.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,13 +1716,13 @@
17161716
* xref:reference:messaging/amqp.adoc#messaging.amqp.rabbitmq[#features.messaging.amqp.rabbit]
17171717
* xref:reference:messaging/amqp.adoc#messaging.amqp.rabbitmq[#messaging.amqp.rabbit]
17181718
* xref:reference:messaging/amqp.adoc#messaging.amqp.rabbitmq[#messaging.amqp.rabbitmq]
1719-
* xref:reference:messaging/amqp.adoc#messaging.amqp.rabbitmq.receiving[#boot-features-using-amqp-receiving]
1720-
* xref:reference:messaging/amqp.adoc#messaging.amqp.rabbitmq.receiving[#features.messaging.amqp.receiving]
1721-
* xref:reference:messaging/amqp.adoc#messaging.amqp.rabbitmq.receiving[#messaging.amqp.receiving]
1722-
* xref:reference:messaging/amqp.adoc#messaging.amqp.rabbitmq.sending-stream[#messaging.amqp.sending-stream]
1723-
* xref:reference:messaging/amqp.adoc#messaging.amqp.rabbitmq.sending[#boot-features-using-amqp-sending]
1724-
* xref:reference:messaging/amqp.adoc#messaging.amqp.rabbitmq.sending[#features.messaging.amqp.sending]
1725-
* xref:reference:messaging/amqp.adoc#messaging.amqp.rabbitmq.sending[#messaging.amqp.sending]
1719+
* xref:reference:messaging/amqp.adoc#messaging.amqp.receiving[#boot-features-using-amqp-receiving]
1720+
* xref:reference:messaging/amqp.adoc#messaging.amqp.receiving[#features.messaging.amqp.receiving]
1721+
* xref:reference:messaging/amqp.adoc#messaging.amqp.receiving[#messaging.amqp.receiving]
1722+
* xref:reference:messaging/amqp.adoc#messaging.amqp.sending-stream[#messaging.amqp.sending-stream]
1723+
* xref:reference:messaging/amqp.adoc#messaging.amqp.sending[#boot-features-using-amqp-sending]
1724+
* xref:reference:messaging/amqp.adoc#messaging.amqp.sending[#features.messaging.amqp.sending]
1725+
* xref:reference:messaging/amqp.adoc#messaging.amqp.sending[#messaging.amqp.sending]
17261726
* xref:reference:messaging/amqp.adoc#messaging.amqp[#boot-features-amqp]
17271727
* xref:reference:messaging/amqp.adoc#messaging.amqp[#features.messaging.amqp]
17281728
* xref:reference:messaging/amqp.adoc#messaging.amqp[#messaging.amqp]

documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/endpoints.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ with the `key` listed in the following table:
673673
| Always responds with `UP`.
674674

675675
| `rabbit`
676-
| javadoc:org.springframework.boot.rabbitmq.health.RabbitHealthIndicator[]
676+
| javadoc:org.springframework.boot.amqp.health.RabbitHealthIndicator[]
677677
| Checks that a Rabbit server is up.
678678

679679
| `redis`

documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ The following service connections are currently supported:
8686
| javadoc:org.springframework.boot.activemq.autoconfigure.ActiveMQConnectionDetails[]
8787
| Containers named "symptoma/activemq" or "apache/activemq-classic"
8888

89-
| javadoc:org.springframework.boot.amqp.autoconfigure.AmqpConnectionDetails[]
90-
| Containers named "rabbitmq"
91-
9289
| javadoc:org.springframework.boot.artemis.autoconfigure.ArtemisConnectionDetails[]
9390
| Containers named "apache/activemq-artemis"
9491

@@ -128,10 +125,10 @@ The following service connections are currently supported:
128125
| javadoc:org.springframework.boot.r2dbc.autoconfigure.R2dbcConnectionDetails[]
129126
| Containers named "clickhouse/clickhouse-server", "gvenzl/oracle-free", "gvenzl/oracle-xe", "mariadb", "mssql/server", "mysql", or "postgres"
130127

131-
| javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails[]
128+
| javadoc:org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails[]
132129
| Containers named "rabbitmq" with container port 5672 mapped
133130

134-
| javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails[]
131+
| javadoc:org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails[]
135132
| Containers named "rabbitmq" with container port 5552 mapped
136133

137134
| javadoc:org.springframework.boot.data.redis.autoconfigure.DataRedisConnectionDetails[]

documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/amqp.adoc

Lines changed: 17 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -3,53 +3,7 @@
33

44
The Advanced Message Queuing Protocol (AMQP) is a platform-neutral, wire-level protocol for message-oriented middleware.
55
The Spring AMQP project applies core Spring concepts to the development of AMQP-based messaging solutions.
6-
Spring Boot offers several conveniences for working with AMQP: generic AMQP 1.0 support is provided by the `spring-boot-starter-amqp` starter while specific RabbitMQ support is available via the `spring-boot-starter-rabbitmq` starter.
7-
8-
9-
10-
[[messaging.amqp.generic]]
11-
== Generic AMQP 1.0 Support
12-
13-
AMQP 1.0 is supported by several brokers and messaging services beyond RabbitMQ, including ActiveMQ, Azure Service Bus, and others.
14-
Spring AMQP provides {url-spring-amqp-docs}/amqp10-client.html[generic support for AMQP 1.0] via `org.springframework.amqp:spring-amqp-client` that is based on the https://github.com/apache/qpid-protonj2/blob/main/protonj2-client/README.md[Qpid ProtonJ2 Client Library].
15-
16-
AMQP configuration is controlled by external configuration properties in `+spring.amqp.*+`.
17-
For example, you might declare the following in your configuration:
18-
19-
[configprops,yaml]
20-
----
21-
spring:
22-
amqp:
23-
host: "localhost"
24-
port: 5672
25-
username: "admin"
26-
password: "secret"
27-
----
28-
29-
To configure javadoc:org.apache.qpid.protonj2.client.ConnectionOptions[connection options] of the auto-configured javadoc:org.springframework.amqp.client.AmqpConnectionFactory[], define a javadoc:org.springframework.boot.amqp.autoconfigure.ConnectionOptionsCustomizer[] bean.
30-
31-
[[messaging.amqp.generic.sending]]
32-
=== Sending a Message
33-
34-
Spring's javadoc:org.springframework.amqp.client.AmqpClient[] is auto-configured, and you can autowire it directly into your own beans, as shown in the following example:
35-
36-
include-code::MyBean[]
37-
38-
If a javadoc:org.springframework.amqp.support.converter.MessageConverter[] bean is defined, it is associated automatically with the auto-configured javadoc:org.springframework.amqp.client.AmqpClient[].
39-
If no such converter is defined and Jackson is available, javadoc:org.springframework.amqp.support.converter.JacksonJsonMessageConverter[] is used.
40-
41-
Client-specific settings can be configured as follows:
42-
43-
[configprops,yaml]
44-
----
45-
spring:
46-
amqp:
47-
client:
48-
default-to-address: "/queues/default_queue"
49-
completion-timeout: "500ms"
50-
----
51-
52-
To further configure the auto-configured javadoc:org.springframework.amqp.client.AmqpClient[], define a javadoc:org.springframework.boot.amqp.autoconfigure.AmqpClientCustomizer[] bean.
6+
Spring Boot offers several conveniences for working with AMQP through RabbitMQ, including the `spring-boot-starter-amqp` starter.
537

548

559

@@ -84,19 +38,19 @@ spring:
8438
NOTE: When specifying addresses that way, the `host` and `port` properties are ignored.
8539
If the address uses the `amqps` protocol, SSL support is enabled automatically.
8640

87-
See javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitProperties[] for more of the supported property-based configuration options.
88-
To configure lower-level details of the RabbitMQ javadoc:com.rabbitmq.client.ConnectionFactory[] that is used by Spring AMQP, define a javadoc:org.springframework.boot.rabbitmq.autoconfigure.ConnectionFactoryCustomizer[] bean.
41+
See javadoc:org.springframework.boot.amqp.autoconfigure.RabbitProperties[] for more of the supported property-based configuration options.
42+
To configure lower-level details of the RabbitMQ javadoc:com.rabbitmq.client.ConnectionFactory[] that is used by Spring AMQP, define a javadoc:org.springframework.boot.amqp.autoconfigure.ConnectionFactoryCustomizer[] bean.
8943

9044
If a javadoc:org.springframework.amqp.rabbit.connection.ConnectionNameStrategy[] bean exists in the context, it will be automatically used to name connections created by the auto-configured javadoc:org.springframework.amqp.rabbit.connection.CachingConnectionFactory[].
9145

92-
To make an application-wide, additive customization to the javadoc:org.springframework.amqp.rabbit.core.RabbitTemplate[], use a javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitTemplateCustomizer[] bean.
46+
To make an application-wide, additive customization to the javadoc:org.springframework.amqp.rabbit.core.RabbitTemplate[], use a javadoc:org.springframework.boot.amqp.autoconfigure.RabbitTemplateCustomizer[] bean.
9347

9448
TIP: See https://spring.io/blog/2010/06/14/understanding-amqp-the-protocol-used-by-rabbitmq/[Understanding AMQP, the protocol used by RabbitMQ] for more details.
9549

9650

9751

98-
[[messaging.amqp.rabbitmq.sending]]
99-
=== Sending a Message
52+
[[messaging.amqp.sending]]
53+
== Sending a Message
10054

10155
Spring's javadoc:org.springframework.amqp.core.AmqpTemplate[] and javadoc:org.springframework.amqp.core.AmqpAdmin[] are auto-configured, and you can autowire them directly into your own beans, as shown in the following example:
10256

@@ -120,16 +74,16 @@ spring:
12074
----
12175

12276
Retries are disabled by default.
123-
You can also customize the javadoc:org.springframework.core.retry.RetryTemplate[] programmatically by declaring a javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitTemplateRetrySettingsCustomizer[] bean.
77+
You can also customize the javadoc:org.springframework.core.retry.RetryTemplate[] programmatically by declaring a javadoc:org.springframework.boot.amqp.autoconfigure.RabbitTemplateRetrySettingsCustomizer[] bean.
12478

125-
If you need to create more javadoc:org.springframework.amqp.rabbit.core.RabbitTemplate[] instances or if you want to override the default, Spring Boot provides a javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitTemplateConfigurer[] bean that you can use to initialize a javadoc:org.springframework.amqp.rabbit.core.RabbitTemplate[] with the same settings as the factories used by the auto-configuration.
79+
If you need to create more javadoc:org.springframework.amqp.rabbit.core.RabbitTemplate[] instances or if you want to override the default, Spring Boot provides a javadoc:org.springframework.boot.amqp.autoconfigure.RabbitTemplateConfigurer[] bean that you can use to initialize a javadoc:org.springframework.amqp.rabbit.core.RabbitTemplate[] with the same settings as the factories used by the auto-configuration.
12680

12781
If there's a bean of type javadoc:org.springframework.amqp.rabbit.support.micrometer.RabbitTemplateObservationConvention[] in the context, it will automatically be configured on the javadoc:org.springframework.amqp.rabbit.core.RabbitTemplate[].
12882

12983

13084

131-
[[messaging.amqp.rabbitmq.sending-stream]]
132-
=== Sending a Message To A Stream
85+
[[messaging.amqp.sending-stream]]
86+
== Sending a Message To A Stream
13387

13488
To send a message to a particular stream, specify the name of the stream, as shown in the following example:
13589

@@ -143,18 +97,18 @@ spring:
14397

14498
If a javadoc:org.springframework.amqp.support.converter.MessageConverter[], javadoc:org.springframework.rabbit.stream.support.converter.StreamMessageConverter[], javadoc:org.springframework.rabbit.stream.producer.ProducerCustomizer[] or javadoc:org.springframework.rabbit.stream.micrometer.RabbitStreamTemplateObservationConvention[] bean is defined, it is associated automatically to the auto-configured javadoc:org.springframework.rabbit.stream.producer.RabbitStreamTemplate[].
14599

146-
If you need to create more javadoc:org.springframework.rabbit.stream.producer.RabbitStreamTemplate[] instances or if you want to override the default, Spring Boot provides a javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamTemplateConfigurer[] bean that you can use to initialize a javadoc:org.springframework.rabbit.stream.producer.RabbitStreamTemplate[] with the same settings as the factories used by the auto-configuration.
100+
If you need to create more javadoc:org.springframework.rabbit.stream.producer.RabbitStreamTemplate[] instances or if you want to override the default, Spring Boot provides a javadoc:org.springframework.boot.amqp.autoconfigure.RabbitStreamTemplateConfigurer[] bean that you can use to initialize a javadoc:org.springframework.rabbit.stream.producer.RabbitStreamTemplate[] with the same settings as the factories used by the auto-configuration.
147101

148102

149103

150-
[[messaging.amqp.rabbitmq.sending-stream.ssl]]
151-
==== SSL
104+
[[messaging.amqp.sending-stream.ssl]]
105+
=== SSL
152106
To use SSL with RabbitMQ Streams, set configprop:spring.rabbitmq.stream.ssl.enabled[] to `true` or set configprop:spring.rabbitmq.stream.ssl.bundle[] to configure the xref:features/ssl.adoc#features.ssl.bundles[SSL bundle] to use.
153107

154108

155109

156-
[[messaging.amqp.rabbitmq.receiving]]
157-
=== Receiving a Message
110+
[[messaging.amqp.receiving]]
111+
== Receiving a Message
158112

159113
When the Rabbit infrastructure is present, any bean can be annotated with javadoc:org.springframework.amqp.rabbit.annotation.RabbitListener[format=annotation] to create a listener endpoint.
160114
If no javadoc:org.springframework.amqp.rabbit.listener.RabbitListenerContainerFactory[] has been defined, a default javadoc:org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory[] is automatically configured and you can switch to a direct container using the configprop:spring.rabbitmq.listener.type[] property.
@@ -166,7 +120,7 @@ include-code::MyBean[]
166120

167121
TIP: See javadoc:org.springframework.amqp.rabbit.annotation.EnableRabbit[format=annotation] for more details.
168122

169-
If you need to create more javadoc:org.springframework.amqp.rabbit.listener.RabbitListenerContainerFactory[] instances or if you want to override the default, Spring Boot provides a javadoc:org.springframework.boot.rabbitmq.autoconfigure.SimpleRabbitListenerContainerFactoryConfigurer[] and a javadoc:org.springframework.boot.rabbitmq.autoconfigure.DirectRabbitListenerContainerFactoryConfigurer[] that you can use to initialize a javadoc:org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory[] and a javadoc:org.springframework.amqp.rabbit.config.DirectRabbitListenerContainerFactory[] with the same settings as the factories used by the auto-configuration.
123+
If you need to create more javadoc:org.springframework.amqp.rabbit.listener.RabbitListenerContainerFactory[] instances or if you want to override the default, Spring Boot provides a javadoc:org.springframework.boot.amqp.autoconfigure.SimpleRabbitListenerContainerFactoryConfigurer[] and a javadoc:org.springframework.boot.amqp.autoconfigure.DirectRabbitListenerContainerFactoryConfigurer[] that you can use to initialize a javadoc:org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory[] and a javadoc:org.springframework.amqp.rabbit.config.DirectRabbitListenerContainerFactory[] with the same settings as the factories used by the auto-configuration.
170124

171125
TIP: It does not matter which container type you chose.
172126
Those two beans are exposed by the auto-configuration.
@@ -183,7 +137,7 @@ You can enable retries to handle situations where your listener throws an except
183137
By default, javadoc:org.springframework.amqp.rabbit.retry.RejectAndDontRequeueRecoverer[] is used, but you can define a javadoc:org.springframework.amqp.rabbit.retry.MessageRecoverer[] of your own.
184138
When retries are exhausted, the message is rejected and either dropped or routed to a dead-letter exchange if the broker is configured to do so.
185139
By default, retries are disabled.
186-
You can also customize the javadoc:org.springframework.core.retry.RetryPolicy[] programmatically by declaring a javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitListenerRetrySettingsCustomizer[] bean.
140+
You can also customize the javadoc:org.springframework.core.retry.RetryPolicy[] programmatically by declaring a javadoc:org.springframework.boot.amqp.autoconfigure.RabbitListenerRetrySettingsCustomizer[] bean.
187141

188142
IMPORTANT: By default, if retries are disabled and the listener throws an exception, the delivery is retried indefinitely.
189143
You can modify this behavior in two ways: Set the `defaultRequeueRejected` property to `false` so that zero re-deliveries are attempted or throw an javadoc:org.springframework.amqp.AmqpRejectAndDontRequeueException[] to signal the message should be rejected.

0 commit comments

Comments
 (0)