是否可以为特定主题而不是全部主题配置num流线程?

问题描述 投票:0回答:1

在我们的应用程序中,我们有多个主题,其中一些主题将创建为16个分区,而某些主题将创建为1个分区。是否有任何spring.cloud.stream.kafka.bindings属性/选项可实现此目的?

apache-kafka apache-kafka-streams spring-cloud-stream spring-cloud-stream-binder-kafka
1个回答
0
投票

有几个可用的分区属性。例如,

spring.cloud.stream.bindings.func-out-0.producer.partitionKeyExpression=payload.id
spring.cloud.stream.bindings.func-out-0.producer.partition

您可以同时获得有关生产者和使用者配置属性的更多信息here

© www.soinside.com 2019 - 2024. All rights reserved.