diff --git a/spring-cloud-stream-binders/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaMessageChannelBinder.java b/spring-cloud-stream-binders/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaMessageChannelBinder.java index c34f6322c..a0b67975f 100644 --- a/spring-cloud-stream-binders/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaMessageChannelBinder.java +++ b/spring-cloud-stream-binders/spring-cloud-stream-binder-kafka/src/main/java/org/springframework/cloud/stream/binder/kafka/KafkaMessageChannelBinder.java @@ -38,6 +38,7 @@ import org.apache.kafka.common.serialization.ByteArraySerializer; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.cloud.stream.binder.AbstractBinder; +import org.springframework.cloud.stream.binder.Binder; import org.springframework.cloud.stream.binder.BinderException; import org.springframework.cloud.stream.binder.BinderHeaders; import org.springframework.cloud.stream.binder.BinderPropertyKeys; @@ -92,35 +93,7 @@ import kafka.utils.ZkUtils; import scala.collection.Seq; /** - * A binder that uses Kafka as the underlying middleware. The general implementation mapping between XD concepts - * and Kafka concepts is as follows: - * A binder that uses Kafka as the underlying middleware. - * The general implementation mapping between XD concepts and Kafka concepts is as follows: - *
| Stream definition | Kafka topic | Kafka partitions | Notes | - *
|---|---|---|---|
| foo = "http | log" | foo.0 | 1 partition | 1 producer, 1 consumer | - *
| foo = "http | log", log.count=x | foo.0 | x partitions | 1 producer, x consumers with static - * group 'springXD', achieves queue semantics | - *
| foo = "http | log", log.count=x + XD partitioning | still 1 topic 'foo.0' | x partitions + use key - * computed by XD | 1 producer, x consumers with static group 'springXD', achieves queue semantics | - *
| foo = "http | log", log.count=x, concurrency=y | foo.0 | x*y partitions | 1 producer, x XD - * consumers, each with y threads | - *
| foo = "http | log", log.count=0, x actual log containers | foo.0 | 10(configurable) - * partitions | 1 producer, x XD consumers. Can't know the number of partitions beforehand, so decide a number - * that better be greater than number of containers | - *