Skip to content

Commit

Permalink
Fix typo at KafkaProducerException
Browse files Browse the repository at this point in the history
  • Loading branch information
bky373 committed Apr 28, 2024
1 parent 4c29de6 commit 1471cb5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ future.whenComplete((result, ex) -> {
`SendResult` has two properties, a `ProducerRecord` and `RecordMetadata`.
See the Kafka API documentation for information about those objects.

The `Throwable` can be cast to a `KafkaProducerException`; its `failedProducerRecord` property contains the failed record.
The `Throwable` can be cast to a `KafkaProducerException`; its `producerRecord` property contains the failed record.

If you wish to block the sending thread to await the result, you can invoke the future's `get()` method; using the method with a timeout is recommended.
If you have set a `linger.ms`, you may wish to invoke `flush()` before waiting or, for convenience, the template has a constructor with an `autoFlush` parameter that causes the template to `flush()` on each send.
Expand Down

0 comments on commit 1471cb5

Please sign in to comment.