Fix doc for mentioning deprecated ListenableFuture
This commit is contained in:
@@ -62,15 +62,12 @@ interface OperationsCallback<K, V, T> {
|
||||
|
||||
See the https://docs.spring.io/spring-kafka/api/org/springframework/kafka/core/KafkaTemplate.html[Javadoc] for more detail.
|
||||
|
||||
IMPORTANT: In version 3.0, the methods that previously returned `ListenableFuture` have been changed to return `CompletableFuture`.
|
||||
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.
|
||||
|
||||
The `sendDefault` API requires that a default topic has been provided to the template.
|
||||
|
||||
The API takes in a `timestamp` as a parameter and stores this timestamp in the record.
|
||||
How the user-provided timestamp is stored depends on the timestamp type configured on the Kafka topic.
|
||||
If the topic is configured to use `CREATE_TIME`, the user-specified timestamp is recorded (or generated if not specified).
|
||||
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.
|
||||
If the topic is configured to use `LOG_APPEND_TIME`, the user-specified timestamp ignored and the broker adds in the local broker time.
|
||||
|
||||
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`].
|
||||
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
|
||||
The result also has a `sendFuture` property, which is the result of calling `KafkaTemplate.send()`.
|
||||
You can use this future to determine the result of the send operation.
|
||||
|
||||
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+++.
|
||||
|
||||
If the first method is used, or the `replyTimeout` argument is `null`, the template's `defaultReplyTimeout` property is used (5 seconds by default).
|
||||
|
||||
Starting with version 2.8.8, the template has a new method `waitForAssignment`.
|
||||
@@ -573,8 +568,6 @@ RequestReplyMessageFuture<K, V> sendAndReceive(Message<?> message);
|
||||
|
||||
These will use the template's default `replyTimeout`, there are also overloaded versions that can take a timeout in the method call.
|
||||
|
||||
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+++.
|
||||
|
||||
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.
|
||||
|
||||
Use the second method if you need to provide type information for the return type, to assist the message converter.
|
||||
|
||||
Reference in New Issue
Block a user