Skip to content

Commit 202a6e5

Browse files
committed
Fix doc for mentioning deprecated ListenableFuture
1 parent de5383f commit 202a6e5

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/sending-messages.adoc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,12 @@ interface OperationsCallback<K, V, T> {
6262

6363
See the https://docs.spring.io/spring-kafka/api/org/springframework/kafka/core/KafkaTemplate.html[Javadoc] for more detail.
6464

65-
IMPORTANT: In version 3.0, the methods that previously returned `ListenableFuture` have been changed to return `CompletableFuture`.
66-
To facilitate the migration, the 2.9 version added a method `usingCompletableFuture()` which provided the same methods with `CompletableFuture` return types; this method is no longer available.
67-
6865
The `sendDefault` API requires that a default topic has been provided to the template.
6966

7067
The API takes in a `timestamp` as a parameter and stores this timestamp in the record.
7168
How the user-provided timestamp is stored depends on the timestamp type configured on the Kafka topic.
7269
If the topic is configured to use `CREATE_TIME`, the user-specified timestamp is recorded (or generated if not specified).
73-
If the topic is configured to use `LOG_APPEND_TIME`, the user-specified timestamp is ignored and the broker adds in the local broker time.
70+
If the topic is configured to use `LOG_APPEND_TIME`, the user-specified timestamp ignored and the broker adds in the local broker time.
7471

7572
The `metrics` and `partitionsFor` methods delegate to the same methods on the underlying https://kafka.apache.org/20/javadoc/org/apache/kafka/clients/producer/Producer.html[`Producer`].
7673
The `execute` method provides direct access to the underlying https://kafka.apache.org/20/javadoc/org/apache/kafka/clients/producer/Producer.html[`Producer`].
@@ -342,8 +339,6 @@ The result is a `CompletableFuture` that is asynchronously populated with the re
342339
The result also has a `sendFuture` property, which is the result of calling `KafkaTemplate.send()`.
343340
You can use this future to determine the result of the send operation.
344341

345-
IMPORTANT: In version 3.0, the futures returned by these methods (and their `sendFuture` properties) have been changed to `CompletableFuture`+++s+++ instead of `ListenableFuture`+++s+++.
346-
347342
If the first method is used, or the `replyTimeout` argument is `null`, the template's `defaultReplyTimeout` property is used (5 seconds by default).
348343

349344
Starting with version 2.8.8, the template has a new method `waitForAssignment`.
@@ -573,8 +568,6 @@ RequestReplyMessageFuture<K, V> sendAndReceive(Message<?> message);
573568

574569
These will use the template's default `replyTimeout`, there are also overloaded versions that can take a timeout in the method call.
575570

576-
IMPORTANT: In version 3.0, the futures returned by these methods (and their `sendFuture` properties) have been changed to `CompletableFuture`+++s+++ instead of `ListenableFuture`+++s+++.
577-
578571
Use the first method if the consumer's `Deserializer` or the template's `MessageConverter` can convert the payload without any additional information, either via configuration or type metadata in the reply message.
579572

580573
Use the second method if you need to provide type information for the return type, to assist the message converter.

0 commit comments

Comments
 (0)