简体   繁体   English

云中的卡夫卡消费者

[英]Kafka consumers in the cloud

I am using spring kafka consumers which are wrapped in a spring boot app and deployed as microservices in pivotal cloud foundry. 我正在使用包装在spring boot应用程序中并作为微服务部署在关键云铸造厂中的spring kafka消费者。 I am deploying 15 instances of the application & 15 kafka partitions. 我正在部署15个应用程序实例和15个kafka分区。 Since most of these instances starts up one by one , will there be multiple rebalancing performed? 由于这些实例中的大多数实例都是一个接一个地启动的,是否会执行多次重新平衡? What is recommended way to deploying kafka consumers in cloud? 在云端部署kafka用户的推荐方法是什么?

The new 0.11 client has a new property group.initial.rebalance.delay.ms see Notable changes in 0.11.0.0 . 新的0.11客户端有一个新的属性group.initial.rebalance.delay.ms 见0.11.0.0显着的变化

A new config, group.initial.rebalance.delay.ms , was introduced. 引入了新配置group.initial.rebalance.delay.ms This config specifies the time, in milliseconds, that the GroupCoordinator will delay the initial consumer rebalance. 此配置指定GroupCoordinator将延迟初始消费者重新平衡的时间(以毫秒为单位)。 The rebalance will be further delayed by the value of group.initial.rebalance.delay.ms as new members join the group, up to a maximum of max.poll.interval.ms . 重新平衡将由的值进一步延迟group.initial.rebalance.delay.ms作为新成员加入该组,最多的max.poll.interval.ms The default value for this is 3 seconds. 缺省值为3秒。 During development and testing it might be desirable to set this to 0 inorder to not delay test execution time. 在开发和测试过程中,可能希望将此值设置为0,以便不延迟测试执行时间。

We are in the process of adding support for the 0.11 client. 我们正在增加对0.11客户端的支持。 Currently it's planned for the 2.0 Spring for Apache Kafka release, but we are considering a 1.3 release with a subset of the 2.0 features, together with support for 0.11. 目前,它计划在Apache Kafka的2.0 Spring发行版中使用,但我们正在考虑1.3发行版,其中包含2.0功能的一部分,并支持0.11。

You could try using the new client with an older spring-kafka; 您可以尝试将新客户端与旧版spring-kafka结合使用; it may work but, of course, you won't get 0.11 features such as transactions and Headers . 它可能会起作用,但是,当然,您将不会获得诸如交易和标Headers类的0.11功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM