From e79cb7d55ae2431f7021eb906b7d0270edd71b7e Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Mon, 13 May 2019 18:24:17 +0200 Subject: [PATCH] Update documentation --- spring-batch-docs/asciidoc/appendix.adoc | 3 +++ spring-batch-docs/asciidoc/readersAndWriters.adoc | 8 ++++++++ spring-batch-docs/asciidoc/whatsnew.adoc | 8 ++++++++ 3 files changed, 19 insertions(+) diff --git a/spring-batch-docs/asciidoc/appendix.adoc b/spring-batch-docs/asciidoc/appendix.adoc index 23c565ff6..efd883b00 100644 --- a/spring-batch-docs/asciidoc/appendix.adoc +++ b/spring-batch-docs/asciidoc/appendix.adoc @@ -27,6 +27,9 @@ |AmqpItemReader|Given a Spring `AmqpTemplate`, it provides synchronous receive methods. The `receiveAndConvert()` method lets you receive POJO objects. +|KafkaItemReader|An `ItemReader` that reads messages from an Apache Kafka topic. +It can be configured to read messages from multiple partitions of the same topic. +This reader stores message offsets in the execution context to support restart capabilities. |FlatFileItemReader|Reads from a flat file. Includes `ItemStream` and `Skippable` functionality. See link:readersAndWriters.html#flatFileItemReader[`FlatFileItemReader`]. |HibernateCursorItemReader|Reads from a cursor based on an HQL query. See diff --git a/spring-batch-docs/asciidoc/readersAndWriters.adoc b/spring-batch-docs/asciidoc/readersAndWriters.adoc index 292fd9326..05c6cd3fd 100644 --- a/spring-batch-docs/asciidoc/readersAndWriters.adoc +++ b/spring-batch-docs/asciidoc/readersAndWriters.adoc @@ -3054,6 +3054,7 @@ Spring Batch offers the following readers and writers for commonly used messagin * <> * <> * <> +* <> * <> [[amqpItemReader]] @@ -3082,6 +3083,13 @@ The `JmsItemWriter` is an `ItemWriter` for JMS that uses a `JmsTemplate`. The te should have a default destination, which is used to send items in `write(List)`. Spring Batch provides a `JmsItemWriterBuilder` to construct an instance of the `JmsItemWriter`. +[[kafkaItemReader]] +===== `KafkaItemReader` +The `KafkaItemReader` is an `ItemReader` for an Apache Kafka topic. It can be configured +to read messages from multiple partitions of the same topic. It stores message offsets +in the execution context to support restart capabilities. Spring Batch provides a +`KafkaItemReaderBuilder` to construct an instance of the `KafkaItemReader`. + [[kafkaItemWriter]] ===== `KafkaItemWriter` The `KafkaItemWriter` is an `ItemWriter` for Apache Kafka that uses a `KafkaTemplate` to diff --git a/spring-batch-docs/asciidoc/whatsnew.adoc b/spring-batch-docs/asciidoc/whatsnew.adoc index cc6d8b375..15299c40e 100644 --- a/spring-batch-docs/asciidoc/whatsnew.adoc +++ b/spring-batch-docs/asciidoc/whatsnew.adoc @@ -9,6 +9,7 @@ Spring Batch 4.2 adds the following features: * Support for batch metrics with https://micrometer.io[Micrometer] +* Support for reading/writing data from/to https://kafka.apache.org[Apache Kafka] topics * Improved documentation [[whatsNewMetrics]] @@ -24,6 +25,13 @@ supported by Micrometer. For more details about this feature, please refer to the <> chapter. +[[whatsNewKafka]] +=== Apache Kafka item reader/writer + +This release adds a new `KafkaItemReader` and `KafkaItemWriter` to read data from and +write it to Kafka topics. For more details about these new components, please refer +to the https://docs.spring.io/spring-batch/4.2.x/api/index.html[Javadoc]. + [[whatsNewDocs]] === Documentation updates