From ac0e462ed23409b6bdf65a3a1426101ef478e178 Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Tue, 28 Sep 2021 18:07:44 -0400 Subject: [PATCH] Doc clarification for Kafka Streams binder prefix Polishing the docs Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/1134 --- docs/src/main/asciidoc/kafka-streams.adoc | 2 ++ docs/src/main/asciidoc/overview.adoc | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/src/main/asciidoc/kafka-streams.adoc b/docs/src/main/asciidoc/kafka-streams.adoc index fb24721e8..ba59cf39d 100644 --- a/docs/src/main/asciidoc/kafka-streams.adoc +++ b/docs/src/main/asciidoc/kafka-streams.adoc @@ -2048,6 +2048,8 @@ For common configuration options and properties pertaining to binder, refer to t ==== Kafka Streams Binder Properties The following properties are available at the binder level and must be prefixed with `spring.cloud.stream.kafka.streams.binder.` +Any Kafka binder provided properties re-used in Kafka Streams binder must be prefixed with `spring.cloud.stream.kafka.streams.binder` instead of `spring.cloud.stream.kafka.binder`. +The only exception to this rule is when defining the Kafka bootstrap server property in which case either prefix works. configuration:: Map with a key/value pair containing properties pertaining to Apache Kafka Streams API. diff --git a/docs/src/main/asciidoc/overview.adoc b/docs/src/main/asciidoc/overview.adoc index 541193c02..55e6d401e 100644 --- a/docs/src/main/asciidoc/overview.adoc +++ b/docs/src/main/asciidoc/overview.adoc @@ -448,18 +448,18 @@ Default: none (the binder-wide default of -1 is used). useTopicHeader:: Set to `true` to override the default binding destination (topic name) with the value of the `KafkaHeaders.TOPIC` message header in the outbound message. If the header is not present, the default binding destination is used. -Default: `false`. + +Default: `false`. recordMetadataChannel:: The bean name of a `MessageChannel` to which successful send results should be sent; the bean must exist in the application context. The message sent to the channel is the sent message (after conversion, if any) with an additional header `KafkaHeaders.RECORD_METADATA`. The header contains a `RecordMetadata` object provided by the Kafka client; it includes the partition and offset where the record was written in the topic. - -`ResultMetadata meta = sendResultMsg.getHeaders().get(KafkaHeaders.RECORD_METADATA, RecordMetadata.class)` - -Failed sends go the producer error channel (if configured); see <>. -Default: null + +`ResultMetadata meta = sendResultMsg.getHeaders().get(KafkaHeaders.RECORD_METADATA, RecordMetadata.class)` ++ +Failed sends go the producer error channel (if configured); see <>. ++ +Default: null. NOTE: The Kafka binder uses the `partitionCount` setting of the producer as a hint to create a topic with the given partition count (in conjunction with the `minPartitionCount`, the maximum of the two being the value being used). Exercise caution when configuring both `minPartitionCount` for a binder and `partitionCount` for an application, as the larger value is used.