mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-09 19:09:03 +00:00
Revert "Rename spring-boot-amqp to spring-boot-rabbitmq"
This reverts commit72b8a6ca05,b820d9feac, andedadf816ab. See gh-49620
This commit is contained in:
@@ -94,6 +94,7 @@ dependencies {
|
||||
implementation(project(path: ":loader:spring-boot-loader-tools"))
|
||||
implementation(project(path: ":module:spring-boot-actuator"))
|
||||
implementation(project(path: ":module:spring-boot-actuator-autoconfigure"))
|
||||
implementation(project(path: ":module:spring-boot-amqp"))
|
||||
implementation(project(path: ":module:spring-boot-cache"))
|
||||
implementation(project(path: ":module:spring-boot-cache-test"))
|
||||
implementation(project(path: ":module:spring-boot-data-cassandra"))
|
||||
@@ -128,7 +129,6 @@ dependencies {
|
||||
implementation(project(path: ":module:spring-boot-micrometer-metrics"))
|
||||
implementation(project(path: ":module:spring-boot-persistence"))
|
||||
implementation(project(path: ":module:spring-boot-r2dbc"))
|
||||
implementation(project(path: ":module:spring-boot-rabbitmq"))
|
||||
implementation(project(path: ":module:spring-boot-restdocs"))
|
||||
implementation(project(path: ":module:spring-boot-reactor-netty"))
|
||||
implementation(project(path: ":module:spring-boot-restclient"))
|
||||
|
||||
+1
-1
@@ -673,7 +673,7 @@ with the `key` listed in the following table:
|
||||
| Always responds with `UP`.
|
||||
|
||||
| `rabbit`
|
||||
| javadoc:org.springframework.boot.rabbitmq.health.RabbitHealthIndicator[]
|
||||
| javadoc:org.springframework.boot.amqp.health.RabbitHealthIndicator[]
|
||||
| Checks that a Rabbit server is up.
|
||||
|
||||
| `redis`
|
||||
|
||||
+2
-2
@@ -125,10 +125,10 @@ The following service connections are currently supported:
|
||||
| javadoc:org.springframework.boot.r2dbc.autoconfigure.R2dbcConnectionDetails[]
|
||||
| Containers named "clickhouse/clickhouse-server", "gvenzl/oracle-free", "gvenzl/oracle-xe", "mariadb", "mssql/server", "mysql", or "postgres"
|
||||
|
||||
| javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails[]
|
||||
| javadoc:org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails[]
|
||||
| Containers named "rabbitmq" with container port 5672 mapped
|
||||
|
||||
| javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails[]
|
||||
| javadoc:org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails[]
|
||||
| Containers named "rabbitmq" with container port 5552 mapped
|
||||
|
||||
| javadoc:org.springframework.boot.data.redis.autoconfigure.DataRedisConnectionDetails[]
|
||||
|
||||
+9
-9
@@ -3,7 +3,7 @@
|
||||
|
||||
The Advanced Message Queuing Protocol (AMQP) is a platform-neutral, wire-level protocol for message-oriented middleware.
|
||||
The Spring AMQP project applies core Spring concepts to the development of AMQP-based messaging solutions.
|
||||
Spring Boot offers several conveniences for working with AMQP through RabbitMQ, including the `spring-boot-starter-rabbitmq` starter.
|
||||
Spring Boot offers several conveniences for working with AMQP through RabbitMQ, including the `spring-boot-starter-amqp` starter.
|
||||
|
||||
|
||||
|
||||
@@ -38,12 +38,12 @@ spring:
|
||||
NOTE: When specifying addresses that way, the `host` and `port` properties are ignored.
|
||||
If the address uses the `amqps` protocol, SSL support is enabled automatically.
|
||||
|
||||
See javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitProperties[] for more of the supported property-based configuration options.
|
||||
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.
|
||||
See javadoc:org.springframework.boot.amqp.autoconfigure.RabbitProperties[] for more of the supported property-based configuration options.
|
||||
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.
|
||||
|
||||
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[].
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
@@ -74,9 +74,9 @@ spring:
|
||||
----
|
||||
|
||||
Retries are disabled by default.
|
||||
You can also customize the javadoc:org.springframework.core.retry.RetryTemplate[] programmatically by declaring a javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitTemplateRetrySettingsCustomizer[] bean.
|
||||
You can also customize the javadoc:org.springframework.core.retry.RetryTemplate[] programmatically by declaring a javadoc:org.springframework.boot.amqp.autoconfigure.RabbitTemplateRetrySettingsCustomizer[] bean.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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[].
|
||||
|
||||
@@ -97,7 +97,7 @@ spring:
|
||||
|
||||
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[].
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ include-code::MyBean[]
|
||||
|
||||
TIP: See javadoc:org.springframework.amqp.rabbit.annotation.EnableRabbit[format=annotation] for more details.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
TIP: It does not matter which container type you chose.
|
||||
Those two beans are exposed by the auto-configuration.
|
||||
@@ -137,7 +137,7 @@ You can enable retries to handle situations where your listener throws an except
|
||||
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.
|
||||
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.
|
||||
By default, retries are disabled.
|
||||
You can also customize the javadoc:org.springframework.core.retry.RetryPolicy[] programmatically by declaring a javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitListenerRetrySettingsCustomizer[] bean.
|
||||
You can also customize the javadoc:org.springframework.core.retry.RetryPolicy[] programmatically by declaring a javadoc:org.springframework.boot.amqp.autoconfigure.RabbitListenerRetrySettingsCustomizer[] bean.
|
||||
|
||||
IMPORTANT: By default, if retries are disabled and the listener throws an exception, the delivery is retried indefinitely.
|
||||
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.
|
||||
|
||||
+5
-5
@@ -173,11 +173,11 @@ javadoc:org.testcontainers.clickhouse.ClickHouseContainer[],
|
||||
javadoc:{url-testcontainers-mariadb-javadoc}/org.testcontainers.mariadb.MariaDBContainer[], javadoc:{url-testcontainers-mssqlserver-javadoc}/org.testcontainers.mssqlserver.MSSQLServerContainer[], javadoc:{url-testcontainers-mysql-javadoc}/org.testcontainers.mysql.MySQLContainer[],
|
||||
javadoc:org.testcontainers.oracle.OracleContainer[OracleContainer (free)], javadoc:{url-testcontainers-oracle-xe-javadoc}/org.testcontainers.containers.OracleContainer[OracleContainer (XE)] or javadoc:{url-testcontainers-postgresql-javadoc}/org.testcontainers.postgresql.PostgreSQLContainer[]
|
||||
|
||||
| javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails[]
|
||||
| javadoc:org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails[]
|
||||
| Containers of type javadoc:{url-testcontainers-rabbitmq-javadoc}/org.testcontainers.rabbitmq.RabbitMQContainer[]
|
||||
|
||||
| javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails[]
|
||||
| Containers of type javadoc:{url-testcontainers-rabbitmq-javadoc}/org.testcontainers.rabbitmq.RabbitMQContainer[] when the `@ServiceConnection` `type` attribute includes javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails[]
|
||||
| javadoc:org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails[]
|
||||
| Containers of type javadoc:{url-testcontainers-rabbitmq-javadoc}/org.testcontainers.rabbitmq.RabbitMQContainer[] when the `@ServiceConnection` `type` attribute includes javadoc:org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails[]
|
||||
|
||||
| javadoc:org.springframework.boot.data.redis.autoconfigure.DataRedisConnectionDetails[]
|
||||
| Containers of type javadoc:com.redis.testcontainers.RedisContainer[] or javadoc:com.redis.testcontainers.RedisStackContainer[], or containers named "redis", "redis/redis-stack" or "redis/redis-stack-server"
|
||||
@@ -188,12 +188,12 @@ javadoc:org.testcontainers.oracle.OracleContainer[OracleContainer (free)], javad
|
||||
|
||||
[TIP]
|
||||
====
|
||||
By default, with the exception of javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails[], all applicable connection details beans will be created for a given javadoc:org.testcontainers.containers.Container[].
|
||||
By default, with the exception of javadoc:org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails[], all applicable connection details beans will be created for a given javadoc:org.testcontainers.containers.Container[].
|
||||
For example, a javadoc:{url-testcontainers-postgresql-javadoc}/org.testcontainers.postgresql.PostgreSQLContainer[] will create both javadoc:org.springframework.boot.jdbc.autoconfigure.JdbcConnectionDetails[] and javadoc:org.springframework.boot.r2dbc.autoconfigure.R2dbcConnectionDetails[].
|
||||
|
||||
If you want to create only a subset of the applicable types, you can use the `type` attribute of javadoc:org.springframework.boot.testcontainers.service.connection.ServiceConnection[format=annotation].
|
||||
|
||||
To create a javadoc:org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails[] bean from a javadoc:{url-testcontainers-rabbitmq-javadoc}/org.testcontainers.rabbitmq.RabbitMQContainer[], you must opt in using the `type` attribute of javadoc:org.springframework.boot.testcontainers.service.connection.ServiceConnection[format=annotation].
|
||||
To create a javadoc:org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails[] bean from a javadoc:{url-testcontainers-rabbitmq-javadoc}/org.testcontainers.rabbitmq.RabbitMQContainer[], you must opt in using the `type` attribute of javadoc:org.springframework.boot.testcontainers.service.connection.ServiceConnection[format=annotation].
|
||||
The container must also expose port 5552, the RabbitMQ streams port.
|
||||
====
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ package org.springframework.boot.docs.messaging.amqp.receiving.custom;
|
||||
|
||||
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
|
||||
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.SimpleRabbitListenerContainerFactoryConfigurer;
|
||||
import org.springframework.boot.amqp.autoconfigure.SimpleRabbitListenerContainerFactoryConfigurer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ package org.springframework.boot.docs.messaging.amqp.receiving.custom
|
||||
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory
|
||||
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory
|
||||
import org.springframework.amqp.rabbit.connection.ConnectionFactory
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.SimpleRabbitListenerContainerFactoryConfigurer
|
||||
import org.springframework.boot.amqp.autoconfigure.SimpleRabbitListenerContainerFactoryConfigurer
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ plugins {
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
}
|
||||
|
||||
description = "Spring Boot RabbitMQ"
|
||||
description = "Spring Boot AMQP"
|
||||
|
||||
dependencies {
|
||||
api(project(":core:spring-boot"))
|
||||
+4
-4
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.docker.compose;
|
||||
package org.springframework.boot.amqp.docker.compose;
|
||||
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails.Address;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails.Address;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
+3
-3
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.docker.compose;
|
||||
package org.springframework.boot.amqp.docker.compose;
|
||||
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails.Address;
|
||||
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails.Address;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
|
||||
+2
-2
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.docker.compose;
|
||||
package org.springframework.boot.amqp.docker.compose;
|
||||
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
|
||||
+4
-4
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.docker.compose;
|
||||
package org.springframework.boot.amqp.docker.compose;
|
||||
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails.Address;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails.Address;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
+3
-3
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.testcontainers;
|
||||
package org.springframework.boot.amqp.testcontainers;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
@@ -30,9 +30,9 @@ import org.springframework.amqp.rabbit.annotation.Queue;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
+3
-3
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.testcontainers;
|
||||
package org.springframework.boot.amqp.testcontainers;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
@@ -30,9 +30,9 @@ import org.springframework.amqp.rabbit.annotation.Queue;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
+7
-7
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.testcontainers;
|
||||
package org.springframework.boot.amqp.testcontainers;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
@@ -31,13 +31,13 @@ import org.testcontainers.rabbitmq.RabbitMQContainer;
|
||||
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.amqp.autoconfigure.EnvironmentBuilderCustomizer;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.amqp.testcontainers.RabbitContainerConnectionDetailsFactory.RabbitMqContainerConnectionDetails;
|
||||
import org.springframework.boot.amqp.testcontainers.RabbitStreamContainerConnectionDetailsFactory.RabbitMqStreamContainerConnectionDetails;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.EnvironmentBuilderCustomizer;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.testcontainers.RabbitContainerConnectionDetailsFactory.RabbitMqContainerConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.testcontainers.RabbitStreamContainerConnectionDetailsFactory.RabbitMqStreamContainerConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
+15
-15
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.testcontainers;
|
||||
package org.springframework.boot.amqp.testcontainers;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
@@ -32,13 +32,13 @@ import org.testcontainers.utility.MountableFile;
|
||||
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.amqp.autoconfigure.EnvironmentBuilderCustomizer;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.amqp.testcontainers.RabbitContainerConnectionDetailsFactory.RabbitMqContainerConnectionDetails;
|
||||
import org.springframework.boot.amqp.testcontainers.RabbitStreamContainerConnectionDetailsFactory.RabbitMqStreamContainerConnectionDetails;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.EnvironmentBuilderCustomizer;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.testcontainers.RabbitContainerConnectionDetailsFactory.RabbitMqContainerConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.testcontainers.RabbitStreamContainerConnectionDetailsFactory.RabbitMqStreamContainerConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.service.connection.PemKeyStore;
|
||||
import org.springframework.boot.testcontainers.service.connection.PemTrustStore;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
@@ -68,9 +68,9 @@ class RabbitStreamWithSslContainerConnectionDetailsFactoryIntegrationTests {
|
||||
|
||||
@Container
|
||||
@ServiceConnection(type = RabbitStreamConnectionDetails.class)
|
||||
@PemTrustStore(certificate = "classpath:org/springframework/boot/rabbitmq/ca.crt")
|
||||
@PemKeyStore(certificate = "classpath:org/springframework/boot/rabbitmq/client.crt",
|
||||
privateKey = "classpath:org/springframework/boot/rabbitmq/client.key")
|
||||
@PemTrustStore(certificate = "classpath:org/springframework/boot/amqp/ca.crt")
|
||||
@PemKeyStore(certificate = "classpath:org/springframework/boot/amqp/client.crt",
|
||||
privateKey = "classpath:org/springframework/boot/amqp/client.key")
|
||||
static final RabbitMQContainer rabbit = getRabbitMqStreamContainer();
|
||||
|
||||
private static RabbitMQContainer getRabbitMqStreamContainer() {
|
||||
@@ -80,15 +80,15 @@ class RabbitStreamWithSslContainerConnectionDetailsFactoryIntegrationTests {
|
||||
container.withCopyToContainer(Transferable.of(enabledPlugins), "/etc/rabbitmq/enabled_plugins");
|
||||
container.withCopyFileToContainer(
|
||||
MountableFile
|
||||
.forClasspathResource("org/springframework/boot/rabbitmq/testcontainers/rabbitmq-stream-ssl.conf"),
|
||||
.forClasspathResource("org/springframework/boot/amqp/testcontainers/rabbitmq-stream-ssl.conf"),
|
||||
"/etc/rabbitmq/rabbitmq.conf");
|
||||
container.withCopyFileToContainer(MountableFile.forClasspathResource("org/springframework/boot/amqp/ca.crt"),
|
||||
"/etc/rabbitmq/ca.crt");
|
||||
container.withCopyFileToContainer(
|
||||
MountableFile.forClasspathResource("org/springframework/boot/rabbitmq/ca.crt"), "/etc/rabbitmq/ca.crt");
|
||||
container.withCopyFileToContainer(
|
||||
MountableFile.forClasspathResource("org/springframework/boot/rabbitmq/server.key"),
|
||||
MountableFile.forClasspathResource("org/springframework/boot/amqp/server.key"),
|
||||
"/etc/rabbitmq/server.key");
|
||||
container.withCopyFileToContainer(
|
||||
MountableFile.forClasspathResource("org/springframework/boot/rabbitmq/server.crt"),
|
||||
MountableFile.forClasspathResource("org/springframework/boot/amqp/server.crt"),
|
||||
"/etc/rabbitmq/server.crt");
|
||||
return container;
|
||||
}
|
||||
+7
-7
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.testcontainers;
|
||||
package org.springframework.boot.amqp.testcontainers;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Duration;
|
||||
@@ -35,13 +35,13 @@ import org.springframework.amqp.core.Queue;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.amqp.autoconfigure.EnvironmentBuilderCustomizer;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.amqp.testcontainers.RabbitContainerConnectionDetailsFactory.RabbitMqContainerConnectionDetails;
|
||||
import org.springframework.boot.amqp.testcontainers.RabbitStreamContainerConnectionDetailsFactory.RabbitMqStreamContainerConnectionDetails;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.EnvironmentBuilderCustomizer;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.testcontainers.RabbitContainerConnectionDetailsFactory.RabbitMqContainerConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.testcontainers.RabbitStreamContainerConnectionDetailsFactory.RabbitMqStreamContainerConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
+7
-7
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.testcontainers;
|
||||
package org.springframework.boot.amqp.testcontainers;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Duration;
|
||||
@@ -35,13 +35,13 @@ import org.springframework.amqp.core.Queue;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.amqp.autoconfigure.EnvironmentBuilderCustomizer;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.amqp.testcontainers.RabbitContainerConnectionDetailsFactory.RabbitMqContainerConnectionDetails;
|
||||
import org.springframework.boot.amqp.testcontainers.RabbitStreamContainerConnectionDetailsFactory.RabbitMqStreamContainerConnectionDetails;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.EnvironmentBuilderCustomizer;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.testcontainers.RabbitContainerConnectionDetailsFactory.RabbitMqContainerConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.testcontainers.RabbitStreamContainerConnectionDetailsFactory.RabbitMqStreamContainerConnectionDetails;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.util.Assert;
|
||||
* @author Moritz Halbritter
|
||||
* @author Andy Wilkinson
|
||||
* @author Phillip Webb
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public abstract class AbstractConnectionFactoryConfigurer<T extends AbstractConnectionFactory> {
|
||||
|
||||
+4
-4
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
@@ -28,8 +28,8 @@ import org.springframework.amqp.rabbit.retry.MessageRecoverer;
|
||||
import org.springframework.amqp.rabbit.retry.RejectAndDontRequeueRecoverer;
|
||||
import org.springframework.amqp.rabbit.support.micrometer.RabbitListenerObservationConvention;
|
||||
import org.springframework.amqp.support.converter.MessageConverter;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitProperties.ListenerRetry;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitProperties.Retry;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitProperties.ListenerRetry;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitProperties.Retry;
|
||||
import org.springframework.boot.retry.RetryPolicySettings;
|
||||
import org.springframework.core.retry.RetryPolicy;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -41,7 +41,7 @@ import org.springframework.util.Assert;
|
||||
* @param <T> the container factory type.
|
||||
* @author Gary Russell
|
||||
* @author Stephane Nicoll
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public abstract class AbstractRabbitListenerContainerFactoryConfigurer<T extends AbstractRabbitListenerContainerFactory<?>> {
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.boot.context.properties.PropertyMapper;
|
||||
* @author Moritz Halbritter
|
||||
* @author Andy Wilkinson
|
||||
* @author Phillip Webb
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class CachingConnectionFactoryConfigurer extends AbstractConnectionFactoryConfigurer<CachingConnectionFactory> {
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import com.rabbitmq.client.ConnectionFactory;
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.rabbitmq.client.ConnectionFactory;
|
||||
* {@link ConnectionFactory} to fine-tune its auto-configuration.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface ConnectionFactoryCustomizer {
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import org.springframework.amqp.rabbit.config.DirectRabbitListenerContainerFactory;
|
||||
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
|
||||
@@ -30,7 +30,7 @@ import org.springframework.boot.context.properties.PropertyMapper;
|
||||
*
|
||||
* @author Gary Russell
|
||||
* @author Stephane Nicoll
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public final class DirectRabbitListenerContainerFactoryConfigurer
|
||||
extends AbstractRabbitListenerContainerFactoryConfigurer<DirectRabbitListenerContainerFactory> {
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import com.rabbitmq.stream.Environment;
|
||||
import com.rabbitmq.stream.EnvironmentBuilder;
|
||||
@@ -25,7 +25,7 @@ import com.rabbitmq.stream.EnvironmentBuilder;
|
||||
* {@link Environment}.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface EnvironmentBuilderCustomizer {
|
||||
+2
-2
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitProperties.Ssl;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitProperties.Ssl;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
import org.springframework.boot.ssl.SslBundles;
|
||||
import org.springframework.util.Assert;
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
|
||||
import org.springframework.amqp.rabbit.config.ContainerCustomizer;
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import com.rabbitmq.client.Channel;
|
||||
import com.rabbitmq.client.impl.CredentialsProvider;
|
||||
@@ -72,7 +72,7 @@ import org.springframework.core.io.ResourceLoader;
|
||||
* @author Moritz Halbritter
|
||||
* @author Andy Wilkinson
|
||||
* @author Scott Frederick
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnClass({ RabbitTemplate.class, Channel.class })
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.util.Assert;
|
||||
* @author Moritz Halbritter
|
||||
* @author Andy Wilkinson
|
||||
* @author Phillip Webb
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public interface RabbitConnectionDetails extends ConnectionDetails {
|
||||
|
||||
+3
-3
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -23,8 +23,8 @@ import com.rabbitmq.client.impl.CredentialsRefreshService;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.amqp.rabbit.connection.RabbitConnectionFactoryBean;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails.Address;
|
||||
import org.springframework.boot.context.properties.PropertyMapper;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails.Address;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
import org.springframework.boot.ssl.SslBundles;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
@@ -44,7 +44,7 @@ import org.springframework.util.unit.DataSize;
|
||||
* @author Andy Wilkinson
|
||||
* @author Phillip Webb
|
||||
* @author Scott Frederick
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class RabbitConnectionFactoryBeanConfigurer {
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import org.springframework.boot.retry.RetryPolicySettings;
|
||||
import org.springframework.core.retry.RetryPolicy;
|
||||
@@ -24,7 +24,7 @@ import org.springframework.core.retry.RetryPolicy;
|
||||
* settings} used by message listeners.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
* @see RetryPolicy
|
||||
*/
|
||||
@FunctionalInterface
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
@@ -53,7 +53,7 @@ import org.springframework.util.unit.DataSize;
|
||||
* @author Lasse Wulff
|
||||
* @author Yanming Zhou
|
||||
* @author Jay Choi
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("spring.rabbitmq")
|
||||
public class RabbitProperties {
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.core.retry.RetryTemplate;
|
||||
* Define the settings of a {@link RetryTemplate}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class RabbitRetryTemplateSettings {
|
||||
|
||||
+4
-4
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import javax.net.ssl.SSLException;
|
||||
|
||||
@@ -27,13 +27,13 @@ import org.jspecify.annotations.Nullable;
|
||||
import org.springframework.amqp.rabbit.config.ContainerCustomizer;
|
||||
import org.springframework.amqp.support.converter.MessageConverter;
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitProperties.Stream;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitProperties.Stream.Ssl;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitProperties.StreamContainer;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.PropertyMapper;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitProperties.Stream;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitProperties.Stream.Ssl;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitProperties.StreamContainer;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
import org.springframework.boot.ssl.SslBundles;
|
||||
import org.springframework.boot.ssl.SslManagerBundle;
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.rabbit.stream.support.converter.StreamMessageConverte
|
||||
* auto-configuration.
|
||||
*
|
||||
* @author Eddú Meléndez
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class RabbitStreamTemplateConfigurer {
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
@@ -45,7 +45,7 @@ import org.springframework.util.CollectionUtils;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @author Yanming Zhou
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class RabbitTemplateConfigurer {
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
* Callback interface that can be used to customize a {@link RabbitTemplate}.
|
||||
*
|
||||
* @author dang zhicairang
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface RabbitTemplateCustomizer {
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.core.retry.RetryTemplate;
|
||||
@@ -24,7 +24,7 @@ import org.springframework.core.retry.RetryTemplate;
|
||||
* {@linkplain RabbitRetryTemplateSettings retry settings} used by {@link RabbitTemplate}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
* @see RabbitTemplateConfigurer
|
||||
* @see RetryTemplate
|
||||
*/
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
|
||||
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
|
||||
@@ -30,7 +30,7 @@ import org.springframework.boot.context.properties.PropertyMapper;
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @author Gary Russell
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public final class SimpleRabbitListenerContainerFactoryConfigurer
|
||||
extends AbstractRabbitListenerContainerFactoryConfigurer<SimpleRabbitListenerContainerFactory> {
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
+4
-4
@@ -14,10 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure.health;
|
||||
package org.springframework.boot.amqp.autoconfigure.health;
|
||||
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.amqp.health.RabbitHealthIndicator;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
@@ -26,15 +28,13 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.health.autoconfigure.contributor.CompositeHealthContributorConfiguration;
|
||||
import org.springframework.boot.health.autoconfigure.contributor.ConditionalOnEnabledHealthIndicator;
|
||||
import org.springframework.boot.health.contributor.HealthContributor;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.health.RabbitHealthIndicator;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
* {@link EnableAutoConfiguration Auto-configuration} for {@link RabbitHealthIndicator}.
|
||||
*
|
||||
* @author Christian Dupuis
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(after = RabbitAutoConfiguration.class)
|
||||
@ConditionalOnClass({ RabbitHealthIndicator.class, RabbitTemplate.class, ConditionalOnEnabledHealthIndicator.class })
|
||||
+1
-1
@@ -18,6 +18,6 @@
|
||||
* Auto-configuration for RabbitMQ health.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.boot.rabbitmq.autoconfigure.health;
|
||||
package org.springframework.boot.amqp.autoconfigure.health;
|
||||
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure.metrics;
|
||||
package org.springframework.boot.amqp.autoconfigure.metrics;
|
||||
|
||||
import com.rabbitmq.client.ConnectionFactory;
|
||||
import com.rabbitmq.client.MetricsCollector;
|
||||
@@ -24,7 +24,7 @@ import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.amqp.rabbit.connection.AbstractConnectionFactory;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.boot.rabbitmq.metrics.RabbitMetrics;
|
||||
import org.springframework.boot.amqp.metrics.RabbitMetrics;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.util.StringUtils;
|
||||
+3
-3
@@ -14,17 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure.metrics;
|
||||
package org.springframework.boot.amqp.autoconfigure.metrics;
|
||||
|
||||
import com.rabbitmq.client.ConnectionFactory;
|
||||
import io.micrometer.core.instrument.MeterRegistry;
|
||||
|
||||
import org.springframework.amqp.rabbit.connection.AbstractConnectionFactory;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.context.annotation.Bean;
|
||||
* {@link ConnectionFactory connection factories}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
afterName = "org.springframework.boot.micrometer.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration",
|
||||
+1
-1
@@ -18,6 +18,6 @@
|
||||
* Auto-configuration for RabbitMQ metrics.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.boot.rabbitmq.autoconfigure.metrics;
|
||||
package org.springframework.boot.amqp.autoconfigure.metrics;
|
||||
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
+1
-1
@@ -18,6 +18,6 @@
|
||||
* Auto-configuration for RabbitMQ.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
+3
-3
@@ -14,17 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.docker.compose;
|
||||
package org.springframework.boot.amqp.docker.compose;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.docker.compose.core.RunningService;
|
||||
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory;
|
||||
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
|
||||
/**
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.docker.compose;
|
||||
package org.springframework.boot.amqp.docker.compose;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
+3
-3
@@ -14,15 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.docker.compose;
|
||||
package org.springframework.boot.amqp.docker.compose;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.docker.compose.core.RunningService;
|
||||
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory;
|
||||
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
|
||||
/**
|
||||
+1
-1
@@ -18,6 +18,6 @@
|
||||
* Support for Docker Compose RabbitMQ service connections.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.boot.rabbitmq.docker.compose;
|
||||
package org.springframework.boot.amqp.docker.compose;
|
||||
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.health;
|
||||
package org.springframework.boot.amqp.health;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.util.Assert;
|
||||
* RabbitMQ messaging system.
|
||||
*
|
||||
* @author Christian Dupuis
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class RabbitHealthIndicator extends AbstractHealthIndicator {
|
||||
|
||||
+1
-1
@@ -18,6 +18,6 @@
|
||||
* Health integration for AMQP and RabbitMQ.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.boot.rabbitmq.health;
|
||||
package org.springframework.boot.amqp.health;
|
||||
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.metrics;
|
||||
package org.springframework.boot.amqp.metrics;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Arnaud Cogoluègnes
|
||||
* @author Stephane Nicoll
|
||||
* @since 4.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public class RabbitMetrics implements MeterBinder {
|
||||
|
||||
+1
-1
@@ -18,6 +18,6 @@
|
||||
* Metrics for AMQP and RabbitMQ.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.boot.rabbitmq.metrics;
|
||||
package org.springframework.boot.amqp.metrics;
|
||||
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.testcontainers;
|
||||
package org.springframework.boot.amqp.testcontainers;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
import org.testcontainers.containers.RabbitMQContainer;
|
||||
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.testcontainers;
|
||||
package org.springframework.boot.amqp.testcontainers;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
import org.testcontainers.rabbitmq.RabbitMQContainer;
|
||||
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;
|
||||
+2
-2
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.testcontainers;
|
||||
package org.springframework.boot.amqp.testcontainers;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
import org.testcontainers.rabbitmq.RabbitMQContainer;
|
||||
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;
|
||||
+1
-1
@@ -18,6 +18,6 @@
|
||||
* Support for testcontainers RabbitMQ service connections.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.boot.rabbitmq.testcontainers;
|
||||
package org.springframework.boot.amqp.testcontainers;
|
||||
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
@@ -0,0 +1,8 @@
|
||||
# Connection Details Factories
|
||||
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
|
||||
org.springframework.boot.amqp.docker.compose.RabbitDockerComposeConnectionDetailsFactory,\
|
||||
org.springframework.boot.amqp.docker.compose.RabbitStreamDockerComposeConnectionDetailsFactory,\
|
||||
org.springframework.boot.amqp.testcontainers.DeprecatedRabbitContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.amqp.testcontainers.RabbitContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.amqp.testcontainers.RabbitStreamContainerConnectionDetailsFactory
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration
|
||||
org.springframework.boot.amqp.autoconfigure.health.RabbitHealthContributorAutoConfiguration
|
||||
org.springframework.boot.amqp.autoconfigure.metrics.RabbitMetricsAutoConfiguration
|
||||
+2
-2
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitConnectionDetails.Address;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitConnectionDetails.Address;
|
||||
import org.springframework.boot.ssl.DefaultSslBundleRegistry;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
|
||||
+8
-8
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Collection;
|
||||
@@ -942,7 +942,7 @@ class RabbitAutoConfigurationTests {
|
||||
void enableSslWithBundle() {
|
||||
this.contextRunner.withUserConfiguration(TestConfiguration.class)
|
||||
.withPropertyValues("spring.rabbitmq.ssl.bundle=test-bundle",
|
||||
"spring.ssl.bundle.jks.test-bundle.keystore.location=classpath:org/springframework/boot/rabbitmq/autoconfigure/test.jks",
|
||||
"spring.ssl.bundle.jks.test-bundle.keystore.location=classpath:org/springframework/boot/amqp/autoconfigure/test.jks",
|
||||
"spring.ssl.bundle.jks.test-bundle.keystore.password=secret")
|
||||
.run((context) -> {
|
||||
com.rabbitmq.client.ConnectionFactory rabbitConnectionFactory = getTargetConnectionFactory(context);
|
||||
@@ -954,9 +954,9 @@ class RabbitAutoConfigurationTests {
|
||||
void enableSslWithKeystoreTypeAndTrustStoreTypeShouldWork() {
|
||||
this.contextRunner.withUserConfiguration(TestConfiguration.class)
|
||||
.withPropertyValues("spring.rabbitmq.ssl.enabled:true",
|
||||
"spring.rabbitmq.ssl.key-store=/org/springframework/boot/rabbitmq/autoconfigure/test.jks",
|
||||
"spring.rabbitmq.ssl.key-store=/org/springframework/boot/amqp/autoconfigure/test.jks",
|
||||
"spring.rabbitmq.ssl.key-store-type=jks", "spring.rabbitmq.ssl.key-store-password=secret",
|
||||
"spring.rabbitmq.ssl.trust-store=/org/springframework/boot/rabbitmq/autoconfigure/test.jks",
|
||||
"spring.rabbitmq.ssl.trust-store=/org/springframework/boot/amqp/autoconfigure/test.jks",
|
||||
"spring.rabbitmq.ssl.trust-store-type=jks", "spring.rabbitmq.ssl.trust-store-password=secret")
|
||||
.run((context) -> assertThat(context).hasNotFailed());
|
||||
}
|
||||
@@ -988,10 +988,10 @@ class RabbitAutoConfigurationTests {
|
||||
void enableSslWithValidStoreAlgorithmShouldWork() {
|
||||
this.contextRunner.withUserConfiguration(TestConfiguration.class)
|
||||
.withPropertyValues("spring.rabbitmq.ssl.enabled:true",
|
||||
"spring.rabbitmq.ssl.key-store=/org/springframework/boot/rabbitmq/autoconfigure/test.jks",
|
||||
"spring.rabbitmq.ssl.key-store=/org/springframework/boot/amqp/autoconfigure/test.jks",
|
||||
"spring.rabbitmq.ssl.key-store-type=jks", "spring.rabbitmq.ssl.key-store-password=secret",
|
||||
"spring.rabbitmq.ssl.key-store-algorithm=PKIX",
|
||||
"spring.rabbitmq.ssl.trust-store=/org/springframework/boot/rabbitmq/autoconfigure/test.jks",
|
||||
"spring.rabbitmq.ssl.trust-store=/org/springframework/boot/amqp/autoconfigure/test.jks",
|
||||
"spring.rabbitmq.ssl.trust-store-type=jks", "spring.rabbitmq.ssl.trust-store-password=secret",
|
||||
"spring.rabbitmq.ssl.trust-store-algorithm=PKIX")
|
||||
.run((context) -> assertThat(context).hasNotFailed());
|
||||
@@ -1001,7 +1001,7 @@ class RabbitAutoConfigurationTests {
|
||||
void enableSslWithInvalidKeyStoreAlgorithmShouldFail() {
|
||||
this.contextRunner.withUserConfiguration(TestConfiguration.class)
|
||||
.withPropertyValues("spring.rabbitmq.ssl.enabled:true",
|
||||
"spring.rabbitmq.ssl.key-store=/org/springframework/boot/rabbitmq/autoconfigure/test.jks",
|
||||
"spring.rabbitmq.ssl.key-store=/org/springframework/boot/amqp/autoconfigure/test.jks",
|
||||
"spring.rabbitmq.ssl.key-store-type=jks", "spring.rabbitmq.ssl.key-store-password=secret",
|
||||
"spring.rabbitmq.ssl.key-store-algorithm=test-invalid-algo")
|
||||
.run((context) -> {
|
||||
@@ -1015,7 +1015,7 @@ class RabbitAutoConfigurationTests {
|
||||
void enableSslWithInvalidTrustStoreAlgorithmShouldFail() {
|
||||
this.contextRunner.withUserConfiguration(TestConfiguration.class)
|
||||
.withPropertyValues("spring.rabbitmq.ssl.enabled:true",
|
||||
"spring.rabbitmq.ssl.trust-store=/org/springframework/boot/rabbitmq/autoconfigure/test.jks",
|
||||
"spring.rabbitmq.ssl.trust-store=/org/springframework/boot/amqp/autoconfigure/test.jks",
|
||||
"spring.rabbitmq.ssl.trust-store-type=jks", "spring.rabbitmq.ssl.trust-store-password=secret",
|
||||
"spring.rabbitmq.ssl.trust-store-algorithm=test-invalid-algo")
|
||||
.run((context) -> {
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+4
-4
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure;
|
||||
package org.springframework.boot.amqp.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
@@ -34,9 +34,9 @@ import org.springframework.amqp.rabbit.config.ContainerCustomizer;
|
||||
import org.springframework.amqp.rabbit.listener.RabbitListenerContainerFactory;
|
||||
import org.springframework.amqp.rabbit.listener.RabbitListenerEndpointRegistry;
|
||||
import org.springframework.amqp.support.converter.MessageConverter;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitStreamConfiguration.PropertiesRabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.autoconfigure.ssl.SslAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitStreamConfiguration.PropertiesRabbitStreamConnectionDetails;
|
||||
import org.springframework.boot.ssl.NoSuchSslBundleException;
|
||||
import org.springframework.boot.ssl.SslBundle;
|
||||
import org.springframework.boot.ssl.SslBundles;
|
||||
@@ -352,7 +352,7 @@ class RabbitStreamConfigurationTests {
|
||||
@Test
|
||||
void whenStreamSslBundleIsConfiguredThenTlsIsUsed() {
|
||||
this.contextRunner.withPropertyValues("spring.rabbitmq.stream.ssl.bundle=test-bundle",
|
||||
"spring.ssl.bundle.jks.test-bundle.keystore.location=classpath:org/springframework/boot/rabbitmq/autoconfigure/test.jks",
|
||||
"spring.ssl.bundle.jks.test-bundle.keystore.location=classpath:org/springframework/boot/amqp/autoconfigure/test.jks",
|
||||
"spring.ssl.bundle.jks.test-bundle.keystore.password=secret")
|
||||
.run((context) -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
@@ -388,7 +388,7 @@ class RabbitStreamConfigurationTests {
|
||||
void whenConnectionDetailsSslBundleIsProvidedThenTlsIsUsedWithoutProperties() {
|
||||
this.contextRunner.withUserConfiguration(CustomConnectionDetails.class)
|
||||
.withPropertyValues(
|
||||
"spring.ssl.bundle.jks.test-bundle.keystore.location=classpath:org/springframework/boot/rabbitmq/autoconfigure/test.jks",
|
||||
"spring.ssl.bundle.jks.test-bundle.keystore.location=classpath:org/springframework/boot/amqp/autoconfigure/test.jks",
|
||||
"spring.ssl.bundle.jks.test-bundle.keystore.password=secret")
|
||||
.run((context) -> {
|
||||
assertThat(context).hasNotFailed();
|
||||
+3
-3
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure.health;
|
||||
package org.springframework.boot.amqp.autoconfigure.health;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.amqp.health.RabbitHealthIndicator;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.health.autoconfigure.contributor.HealthContributorAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.health.RabbitHealthIndicator;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure.metrics;
|
||||
package org.springframework.boot.amqp.autoconfigure.metrics;
|
||||
|
||||
import io.micrometer.core.instrument.MeterRegistry;
|
||||
import io.micrometer.core.instrument.binder.MeterBinder;
|
||||
@@ -22,8 +22,8 @@ import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.micrometer.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.autoconfigure.metrics;
|
||||
package org.springframework.boot.amqp.autoconfigure.metrics;
|
||||
|
||||
import io.micrometer.core.instrument.MeterRegistry;
|
||||
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
|
||||
@@ -22,9 +22,9 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
|
||||
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
|
||||
import org.springframework.boot.amqp.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.micrometer.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.rabbitmq.autoconfigure.RabbitAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.docker.compose;
|
||||
package org.springframework.boot.amqp.docker.compose;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.health;
|
||||
package org.springframework.boot.amqp.health;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.rabbitmq.metrics;
|
||||
package org.springframework.boot.amqp.metrics;
|
||||
|
||||
import com.rabbitmq.client.ConnectionFactory;
|
||||
import io.micrometer.core.instrument.Tags;
|
||||
@@ -28,6 +28,9 @@ dependencies {
|
||||
api(project(":module:spring-boot-activemq")) {
|
||||
transitive = false
|
||||
}
|
||||
api(project(":module:spring-boot-amqp")) {
|
||||
transitive = false
|
||||
}
|
||||
api(project(":module:spring-boot-artemis")) {
|
||||
transitive = false
|
||||
}
|
||||
@@ -211,9 +214,6 @@ dependencies {
|
||||
api(project(":module:spring-boot-r2dbc")) {
|
||||
transitive = false
|
||||
}
|
||||
api(project(":module:spring-boot-rabbitmq")) {
|
||||
transitive = false
|
||||
}
|
||||
api(project(":module:spring-boot-reactor")) {
|
||||
transitive = false
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# Connection Details Factories
|
||||
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
|
||||
org.springframework.boot.rabbitmq.docker.compose.RabbitDockerComposeConnectionDetailsFactory,\
|
||||
org.springframework.boot.rabbitmq.docker.compose.RabbitStreamDockerComposeConnectionDetailsFactory,\
|
||||
org.springframework.boot.rabbitmq.testcontainers.DeprecatedRabbitContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.rabbitmq.testcontainers.RabbitContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.rabbitmq.testcontainers.RabbitStreamContainerConnectionDetailsFactory
|
||||
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
org.springframework.boot.rabbitmq.autoconfigure.RabbitAutoConfiguration
|
||||
org.springframework.boot.rabbitmq.autoconfigure.health.RabbitHealthContributorAutoConfiguration
|
||||
org.springframework.boot.rabbitmq.autoconfigure.metrics.RabbitMetricsAutoConfiguration
|
||||
@@ -2118,6 +2118,7 @@ bom {
|
||||
"spring-boot-activemq",
|
||||
"spring-boot-actuator",
|
||||
"spring-boot-actuator-autoconfigure",
|
||||
"spring-boot-amqp",
|
||||
"spring-boot-artemis",
|
||||
"spring-boot-autoconfigure",
|
||||
"spring-boot-autoconfigure-classic",
|
||||
@@ -2212,7 +2213,6 @@ bom {
|
||||
"spring-boot-pulsar",
|
||||
"spring-boot-quartz",
|
||||
"spring-boot-r2dbc",
|
||||
"spring-boot-rabbitmq",
|
||||
"spring-boot-reactor",
|
||||
"spring-boot-reactor-netty",
|
||||
"spring-boot-restclient",
|
||||
@@ -2238,6 +2238,8 @@ bom {
|
||||
"spring-boot-starter-activemq-test",
|
||||
"spring-boot-starter-actuator",
|
||||
"spring-boot-starter-actuator-test",
|
||||
"spring-boot-starter-amqp",
|
||||
"spring-boot-starter-amqp-test",
|
||||
"spring-boot-starter-artemis",
|
||||
"spring-boot-starter-artemis-test",
|
||||
"spring-boot-starter-aspectj",
|
||||
@@ -2353,8 +2355,6 @@ bom {
|
||||
"spring-boot-starter-quartz-test",
|
||||
"spring-boot-starter-r2dbc",
|
||||
"spring-boot-starter-r2dbc-test",
|
||||
"spring-boot-starter-rabbitmqmq",
|
||||
"spring-boot-starter-rabbitmqmq-test",
|
||||
"spring-boot-starter-reactor-netty",
|
||||
"spring-boot-starter-restclient",
|
||||
"spring-boot-starter-restclient-test",
|
||||
|
||||
+4
-4
@@ -80,6 +80,7 @@ include "core:spring-boot-testcontainers"
|
||||
include "module:spring-boot-activemq"
|
||||
include "module:spring-boot-actuator"
|
||||
include "module:spring-boot-actuator-autoconfigure"
|
||||
include "module:spring-boot-amqp"
|
||||
include "module:spring-boot-artemis"
|
||||
include "module:spring-boot-autoconfigure-classic"
|
||||
include "module:spring-boot-autoconfigure-classic-modules"
|
||||
@@ -166,7 +167,6 @@ include "module:spring-boot-persistence"
|
||||
include "module:spring-boot-pulsar"
|
||||
include "module:spring-boot-quartz"
|
||||
include "module:spring-boot-r2dbc"
|
||||
include "module:spring-boot-rabbitmq"
|
||||
include "module:spring-boot-reactor"
|
||||
include "module:spring-boot-reactor-netty"
|
||||
include "module:spring-boot-restclient"
|
||||
@@ -211,6 +211,8 @@ include "starter:spring-boot-starter-activemq"
|
||||
include "starter:spring-boot-starter-activemq-test"
|
||||
include "starter:spring-boot-starter-actuator"
|
||||
include "starter:spring-boot-starter-actuator-test"
|
||||
include "starter:spring-boot-starter-amqp"
|
||||
include "starter:spring-boot-starter-amqp-test"
|
||||
include "starter:spring-boot-starter-artemis"
|
||||
include "starter:spring-boot-starter-artemis-test"
|
||||
include "starter:spring-boot-starter-aspectj"
|
||||
@@ -329,8 +331,6 @@ include "starter:spring-boot-starter-quartz"
|
||||
include "starter:spring-boot-starter-quartz-test"
|
||||
include "starter:spring-boot-starter-r2dbc"
|
||||
include "starter:spring-boot-starter-r2dbc-test"
|
||||
include "starter:spring-boot-starter-rabbitmq"
|
||||
include "starter:spring-boot-starter-rabbitmq-test"
|
||||
include "starter:spring-boot-starter-reactor-netty"
|
||||
include "starter:spring-boot-starter-restclient"
|
||||
include "starter:spring-boot-starter-restclient-test"
|
||||
@@ -399,6 +399,7 @@ include ":smoke-test:spring-boot-smoke-test-actuator-extension"
|
||||
include ":smoke-test:spring-boot-smoke-test-actuator-log4j2"
|
||||
include ":smoke-test:spring-boot-smoke-test-actuator-noweb"
|
||||
include ":smoke-test:spring-boot-smoke-test-actuator-ui"
|
||||
include ":smoke-test:spring-boot-smoke-test-amqp"
|
||||
include ":smoke-test:spring-boot-smoke-test-ant"
|
||||
include ":smoke-test:spring-boot-smoke-test-artemis"
|
||||
include ":smoke-test:spring-boot-smoke-test-aspectj"
|
||||
@@ -454,7 +455,6 @@ include ":smoke-test:spring-boot-smoke-test-prometheus"
|
||||
include ":smoke-test:spring-boot-smoke-test-property-validation"
|
||||
include ":smoke-test:spring-boot-smoke-test-pulsar"
|
||||
include ":smoke-test:spring-boot-smoke-test-quartz"
|
||||
include ":smoke-test:spring-boot-smoke-test-rabbitmq"
|
||||
include ":smoke-test:spring-boot-smoke-test-reactive-oauth2-client"
|
||||
include ":smoke-test:spring-boot-smoke-test-reactive-oauth2-resource-server"
|
||||
include ":smoke-test:spring-boot-smoke-test-restclient"
|
||||
|
||||
+3
-3
@@ -19,13 +19,13 @@ plugins {
|
||||
id "org.springframework.boot.docker-test"
|
||||
}
|
||||
|
||||
description = "Spring Boot RabbitMQ smoke test"
|
||||
description = "Spring Boot AMQP smoke test"
|
||||
|
||||
dependencies {
|
||||
implementation(project(":starter:spring-boot-starter-rabbitmq"))
|
||||
implementation(project(":starter:spring-boot-starter-amqp"))
|
||||
|
||||
dockerTestImplementation(project(":core:spring-boot-testcontainers"))
|
||||
dockerTestImplementation(project(":starter:spring-boot-starter-rabbitmq-test"))
|
||||
dockerTestImplementation(project(":starter:spring-boot-starter-amqp-test"))
|
||||
dockerTestImplementation(project(":test-support:spring-boot-docker-test-support"))
|
||||
dockerTestImplementation("org.awaitility:awaitility")
|
||||
dockerTestImplementation("org.testcontainers:testcontainers-junit-jupiter")
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package smoketest.rabbitmq;
|
||||
package smoketest.amqp;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
@SpringBootTest
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
@ExtendWith(OutputCaptureExtension.class)
|
||||
class SampleRabbitApplicationSslTests {
|
||||
class SampleAmqpSimpleApplicationSslTests {
|
||||
|
||||
@Container
|
||||
@ServiceConnection
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package smoketest.rabbitmq;
|
||||
package smoketest.amqp;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
@SpringBootTest
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
@ExtendWith(OutputCaptureExtension.class)
|
||||
class SampleRabbitApplicationTests {
|
||||
class SampleAmqpSimpleApplicationTests {
|
||||
|
||||
@Container
|
||||
@ServiceConnection
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package smoketest.rabbitmq;
|
||||
package smoketest.amqp;
|
||||
|
||||
import org.testcontainers.rabbitmq.RabbitMQContainer;
|
||||
import org.testcontainers.utility.DockerImageName;
|
||||
+4
-4
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package smoketest.rabbitmq;
|
||||
package smoketest.amqp;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -30,9 +30,9 @@ import org.springframework.messaging.handler.annotation.Payload;
|
||||
|
||||
@SpringBootApplication
|
||||
@RabbitListener(queues = "foo")
|
||||
public class SampleRabbitApplication {
|
||||
public class SampleAmqpSimpleApplication {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(SampleRabbitApplication.class);
|
||||
private static final Log logger = LogFactory.getLog(SampleAmqpSimpleApplication.class);
|
||||
|
||||
@Bean
|
||||
public Sender mySender() {
|
||||
@@ -55,7 +55,7 @@ public class SampleRabbitApplication {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SampleRabbitApplication.class, args);
|
||||
SpringApplication.run(SampleAmqpSimpleApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package smoketest.rabbitmq;
|
||||
package smoketest.amqp;
|
||||
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user