Skip to content

Commit 80f8c9c

Browse files
garyrussellartembilan
authored andcommitted
GH-1473: Remove Unnecessary Deprecated Interfaces
See #1473 See #1480 Migration interfaces to assist moving to `CompletableFuture` have been removed from 2.4.x due to Boot auto configuration issues. Therefore, these interfaces never existed in a released version of 2.4.x.
1 parent f073c5f commit 80f8c9c

File tree

9 files changed

+8
-194
lines changed

9 files changed

+8
-194
lines changed

spring-amqp/src/main/java/org/springframework/amqp/core/AsyncAmqpTemplate2.java

-32
This file was deleted.

spring-rabbit-stream/src/main/java/org/springframework/rabbit/stream/producer/RabbitStreamOperations2.java

-34
This file was deleted.

spring-rabbit-stream/src/main/java/org/springframework/rabbit/stream/producer/RabbitStreamTemplate2.java

-38
This file was deleted.

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/AsyncRabbitTemplate2.java

-65
This file was deleted.

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/CorrelationData.java

-11
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,6 @@ public CompletableFuture<Confirm> getFuture() {
9494
return this.future;
9595
}
9696

97-
/**
98-
* Return a future to check the success/failure of the publish operation.
99-
* @return the future.
100-
* @since 2.4.7
101-
* @deprecated as of 3.0, in favor of {@link #getFuture()}.
102-
*/
103-
@Deprecated
104-
public CompletableFuture<Confirm> getCompletableFuture() {
105-
return this.future;
106-
}
107-
10897
/**
10998
* Get the returned message and metadata, if any. Guaranteed to be populated before
11099
* the future is set.

src/reference/asciidoc/amqp.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4677,7 +4677,7 @@ Version 2.0 introduced variants of these methods (`convertSendAndReceiveAsType`)
46774677
You must configure the underlying `RabbitTemplate` with a `SmartMessageConverter`.
46784678
See <<json-complex>> for more information.
46794679

4680-
The `AsyncRabbitTemplate2` (added to assist with migration to this release) is now deprecated in favor of `AsyncRabbitTemplate` which now returns `CompletableFuture` s instead of `ListenableFuture` s.
4680+
IMPORTANT: Starting with version 3.0, the `AsyncRabbitTemplate` methods now return `CompletableFuture` s instead of `ListenableFuture` s.
46814681

46824682
[[remoting]]
46834683
===== Spring Remoting with AMQP

src/reference/asciidoc/appendix.adoc

-5
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ Support remoting using Spring Framework’s RMI support is deprecated and will b
3434
The `Jackson2JsonMessageConverter` can now determine the charset from the `contentEncoding` header.
3535
See <<json-message-converter>> for more information.
3636

37-
==== AsyncRabbitTemplate
38-
39-
The `AsyncRabbitTemplate` is deprecated in favor of `AsyncRabbitTemplate2` which returns `CompletableFuture` s instead of `ListenableFuture` s.
40-
See <<async-template>> for more information.
41-
4237
==== Message Converter Changes
4338

4439
The `Jackson2JsonMessageConverter` can now determine the charset from the `contentEncoding` header.

src/reference/asciidoc/stream.adoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ The `RabbitStreamTemplate` provides a subset of the `RabbitTemplate` (AMQP) func
1616
----
1717
public interface RabbitStreamOperations extends AutoCloseable {
1818
19-
ListenableFuture<Boolean> send(Message message);
19+
ConvertableFuture<Boolean> send(Message message);
2020
21-
ListenableFuture<Boolean> convertAndSend(Object message);
21+
ConvertableFuture<Boolean> convertAndSend(Object message);
2222
23-
ListenableFuture<Boolean> convertAndSend(Object message, @Nullable MessagePostProcessor mpp);
23+
ConvertableFuture<Boolean> convertAndSend(Object message, @Nullable MessagePostProcessor mpp);
2424
25-
ListenableFuture<Boolean> send(com.rabbitmq.stream.Message message);
25+
ConvertableFuture<Boolean> send(com.rabbitmq.stream.Message message);
2626
2727
MessageBuilder messageBuilder();
2828
@@ -67,7 +67,7 @@ The `ProducerCustomizer` provides a mechanism to customize the producer before i
6767

6868
Refer to the https://rabbitmq.github.io/rabbitmq-stream-java-client/stable/htmlsingle/[Java Client Documentation] about customizing the `Environment` and `Producer`.
6969

70-
IMPORTANT: In version 2.4.7 `RabbitStreamOperations2` and `RabbitStreamTemplate2` were added to assist migration to this version; `RabbitStreamOperations2` and `RabbitStreamTemplate2` are now deprecated in favor of `RabbitStreamOperations` and `RabbitStreamTemplate` respectively.
70+
IMPORTANT: Starting with version 3.0, the method return types are `CompletableFuture` instead of `ListenableFuture`.
7171

7272
==== Receiving Messages
7373

src/reference/asciidoc/whats-new.adoc

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ The remoting feature (using RMI) is no longer supported.
1313

1414
==== AsyncRabbitTemplate
1515

16-
The `AsyncRabbitTemplate2`, which was added in 2.4.7 to aid migration to this release, is deprecated in favor of `AsyncRabbitTemplate`.
17-
The `AsyncRabbitTemplate` now returns `CompletableFuture` s instead of `ListenableFuture` s.
16+
IMPORTANT: The `AsyncRabbitTemplate` now returns `CompletableFuture` s instead of `ListenableFuture` s.
1817
See <<async-template>> for more information.
1918

2019
==== Stream Support Changes
2120

22-
`RabbitStreamOperations2` and `RabbitStreamTemplate2` have been deprecated in favor of `RabbitStreamOperations` and `RabbitStreamTemplate` respectively.
21+
IMPORTANT: `RabbitStreamOperations` and `RabbitStreamTemplate` methods now return `CompletableFuture` instead of `ListenableFuture`.
2322

2423
Super streams and single active consumers thereon are now supported.
2524

0 commit comments

Comments
 (0)