Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

GH-35 Updated for compatibility with SpringBoot 2.4.0 #53

Merged
merged 4 commits into from
Mar 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

**Spring MultiRabbit** is a library to enable multiple RabbitMQ brokers in SpringBoot applications. The modules are:
* **spring-multirabbit** - the main module, that provides the auto-configuration feature;
* **spring-multirabbit-integration** - a module to test integration with Spring;
* **spring-multirabbit-example-java** - an example project in Java;
* **spring-multirabbit-example-kotlin** - an example project in Kotlin;
* **spring-multirabbit-extension-example** - an example project of how to extend spring-multirabbit;
Expand All @@ -14,8 +13,9 @@
To use the library, the project must:
1. Be a SpringBoot project annotated with **@EnableRabbit**, as usual;
2. Import the library **spring-multirabbit**;
3. Provide configuration for additional brokers in the new path **spring.multirabbitmq.connections**. All
attributes available for **spring.rabbitmq** can be used in **spring.multirabbitmq.connections**.
3. Enable MultiRabbit by setting **spring.multirabbitmq.enabled=true**. By default, MultiRabbit is disabled.
3. Provide configuration for additional brokers under **spring.multirabbitmq.connections**. All
attributes available for **spring.rabbitmq** can be used under **spring.multirabbitmq.connections**.
4. Change the container factory context when using non-default connections:
1. For ```RabbitTemplate```, use ```SimpleResourceHolder.bind()``` and ```SimpleResourceHolder.unbind()```;
2. For ```@RabbitListener```, define the ```containerFactory``` or leave it blank for the default connection.
Expand Down Expand Up @@ -54,6 +54,7 @@ spring:
host: 10.0.0.10
port: 5672
multirabbitmq:
enabled: true
connections:
connectionNameA:
host: 200.10.10.10
Expand Down Expand Up @@ -131,6 +132,7 @@ any of the connections under **spring.multirabbitmq.connections**, the connectio
```yaml
spring:
multirabbitmq:
enabled: true
connections:
connectionNameA:
host: localhost
Expand All @@ -147,6 +149,7 @@ the default connection.
```yaml
spring:
multirabbitmq:
enabled: true
defaultConnection: connectionNameA
connections:
connectionNameA:
Expand All @@ -165,6 +168,7 @@ spring:
host: localhost
port: 5672
multirabbitmq:
enabled: true
connections:
connectionNameA:
host: localhost
Expand All @@ -184,6 +188,7 @@ spring:
host: localhost
port: 5672
multirabbitmq:
enabled: true
connections:
connectionNameA:
defaultConnection: true
Expand Down
2 changes: 1 addition & 1 deletion oss-checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
<!-- <module name="HiddenField"/> -->
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MagicNumber"/>
<!-- <module name="MagicNumber"/> -->
<module name="MissingSwitchDefault"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
Expand Down
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.free-now.multirabbit</groupId>
<artifactId>spring-multirabbit-parent</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Spring MultiRabbit</name>
Expand All @@ -28,7 +28,6 @@

<modules>
<module>spring-multirabbit</module>
<module>spring-multirabbit-integration</module>
<module>spring-multirabbit-examples/spring-multirabbit-example-java</module>
<module>spring-multirabbit-examples/spring-multirabbit-example-kotlin</module>
<module>spring-multirabbit-examples/spring-multirabbit-extension-example</module>
Expand All @@ -38,7 +37,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<springboot.version>2.3.9.RELEASE</springboot.version>
<springboot.version>2.4.0</springboot.version>
</properties>

<scm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.9.RELEASE</version>
<version>2.4.0</version>
<relativePath />
</parent>

<groupId>com.free-now.multirabbit</groupId>
<artifactId>spring-multirabbit-example-java</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Spring MultiRabbit Example for Java</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ spring:
host: localhost
port: 5672
multirabbitmq:
enabled: true
connections:
connectionNameA:
host: localhost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.9.RELEASE</version>
<version>2.4.0</version>
<relativePath />
</parent>

<groupId>com.free-now.multirabbit</groupId>
<artifactId>spring-multirabbit-example-kotlin</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Spring MultiRabbit Example for Kotlin</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ spring:
host: localhost
port: 5672
multirabbitmq:
enabled: true
connections:
connectionNameA:
host: localhost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.9.RELEASE</version>
<version>2.4.0</version>
<relativePath />
</parent>

<groupId>com.free-now.multirabbit</groupId>
<artifactId>spring-multirabbit-extended-example-java</artifactId>
<version>2.3.1-SNAPSHOT</version>
<version>2.4.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Spring MultiRabbit Extension Example</name>
Expand Down
78 changes: 0 additions & 78 deletions spring-multirabbit-integration/pom.xml

This file was deleted.

This file was deleted.

Loading