GH-1096: Named components in Kafka Streams

Support KIP-307 in Kafka Streams binder where the input (source)
and output (sink) bindings are customized with user-provided names.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/1096

Resolves #1098
This commit is contained in:
Soby Chacko
2021-07-01 19:35:20 -04:00
committed by Oleg Zhurakousky
parent 5454d54faf
commit 7cae3aa54f
6 changed files with 48 additions and 2 deletions

View File

@@ -1953,12 +1953,17 @@ flag to enable/disable native encoding
+
Default: `true`.
streamPartitionerBeanName:
streamPartitionerBeanName::
Custom outbound partitioner bean name to be used at the consumer.
Applications can provide custom `StreamPartitioner` as a Spring bean and the name of this bean can be provided to the producer to use instead of the default one.
+
Default: See the discussion above on outbound partition support.
producedAs::
Custom name for the sink component to which the processor is producing to.
+
Deafult: `none` (generated by Kafka Streams)
==== Kafka Streams Consumer Properties
The following properties are available for Kafka Streams consumers and must be prefixed with `spring.cloud.stream.kafka.streams.bindings.<binding-name>.consumer.`
@@ -2028,6 +2033,11 @@ Event type header key on each incoming records through this binding.
+
Default: `event_type`
consumedAs::
Custom name for the source component from which the processor is consuming from.
+
Deafult: `none` (generated by Kafka Streams)
==== Special note on concurrency
In Kafka Streams, you can control of the number of threads a processor can create using the `num.stream.threads` property.