apache-kafka - kafka中的消费群体有什么需求?

标签 apache-kafka kafka-consumer-api

我不明白Kafka中消费者组的实际用例。 一个分区只能被一个消费者组中的一个消费者读取,因此一个消费者只能读取主题记录的子集。

有人可以帮助解决消费者群体可以提供帮助的任何实际场景吗?

最佳答案

它用于并行处理来自特定主题的事件消息。

Consumers label themselves with a consumer group name, and each record published to a topic is delivered to one consumer instance within each subscribing consumer group. Consumer instances can be in separate processes or on separate machines.

If all the consumer instances have the same consumer group, then the records will effectively be load balanced over the consumer instances.

If all the consumer instances have different consumer groups, then each record will be broadcast to all the consumer processes.

在这里阅读更多内容:

关于apache-kafka - kafka中的消费群体有什么需求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75390937/

相关文章:

java - 为kafka主题配置ACL

java - Apache Storm : storm-kafka-monitor script throws exception

java - 使用 Spring Boot 启动 Kafka 生产者时出错

apache-kafka - Confluent 的 Kafka REST 代理与 Kafka 客户端

java - 卡夫卡 : What is new API for ConsumerConnector in version 0. 11

java - MapR Streams Kafka API 的批量大小问题

java - 使用 Storm Topology 从 Kafka 队列消费数据

mysql - 通过kafka jdbc连接器删除数据库中的记录

apache-kafka - Leader 在控制台 Producer 中不可用 Kafka

apache-kafka - 卡夫卡消费者 : Want to read same message again if not committed previous messages offset and auto commit is disabled